@elementor/editor-controls 0.19.1 → 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 +27 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +304 -294
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +240 -230
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -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/components/text-field-inner-selection.tsx +4 -3
- 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 +6 -5
- 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 +3 -1
- package/src/controls/font-family-control/font-family-control.tsx +4 -3
- package/src/controls/gap-control.tsx +3 -2
- package/src/controls/image-control.tsx +3 -3
- package/src/controls/link-control.tsx +6 -6
- package/src/controls/linked-dimensions-control.tsx +7 -6
- package/src/controls/select-control.tsx +4 -3
- package/src/controls/stroke-control.tsx +2 -2
- package/src/controls/svg-media-control.tsx +2 -2
- package/src/hooks/use-sync-external-state.tsx +1 -0
- package/src/index.ts +2 -1
- package/src/control-adornments/control-label-with-adornments.tsx +0 -15
- package/src/utils/link-restriction.ts +0 -47
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
|
|
|
@@ -285,7 +285,7 @@ function ControlActions({ children }) {
|
|
|
285
285
|
if (items.length === 0) {
|
|
286
286
|
return children;
|
|
287
287
|
}
|
|
288
|
-
const menuItems = items.map(({ MenuItem
|
|
288
|
+
const menuItems = items.map(({ MenuItem, id }) => /* @__PURE__ */ React7.createElement(MenuItem, { key: id }));
|
|
289
289
|
return /* @__PURE__ */ React7.createElement(FloatingBarContainer, null, /* @__PURE__ */ React7.createElement(UnstableFloatingActionBar, { actions: menuItems }, children));
|
|
290
290
|
}
|
|
291
291
|
|
|
@@ -334,7 +334,8 @@ var ImageMediaControl = createControl(({ mediaTypes = ["image"] }) => {
|
|
|
334
334
|
// src/controls/select-control.tsx
|
|
335
335
|
import * as React9 from "react";
|
|
336
336
|
import { stringPropTypeUtil } from "@elementor/editor-props";
|
|
337
|
-
import {
|
|
337
|
+
import { MenuListItem } from "@elementor/editor-ui";
|
|
338
|
+
import { Select } from "@elementor/ui";
|
|
338
339
|
var SelectControl = createControl(({ options, onChange }) => {
|
|
339
340
|
const { value, setValue } = useBoundProp(stringPropTypeUtil);
|
|
340
341
|
const handleChange = (event) => {
|
|
@@ -352,7 +353,7 @@ var SelectControl = createControl(({ options, onChange }) => {
|
|
|
352
353
|
onChange: handleChange,
|
|
353
354
|
fullWidth: true
|
|
354
355
|
},
|
|
355
|
-
options.map(({ label, ...props }) => /* @__PURE__ */ React9.createElement(
|
|
356
|
+
options.map(({ label, ...props }) => /* @__PURE__ */ React9.createElement(MenuListItem, { key: props.value, ...props, value: props.value ?? "" }, label))
|
|
356
357
|
));
|
|
357
358
|
});
|
|
358
359
|
|
|
@@ -362,7 +363,7 @@ var ImageControl = createControl(
|
|
|
362
363
|
const propContext = useBoundProp(imagePropTypeUtil);
|
|
363
364
|
const { data: allowSvgUpload } = useUnfilteredFilesUpload();
|
|
364
365
|
const mediaTypes = allowSvgUpload ? ["image", "svg"] : ["image"];
|
|
365
|
-
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 }))))));
|
|
366
367
|
}
|
|
367
368
|
);
|
|
368
369
|
|
|
@@ -416,7 +417,8 @@ import { InputAdornment as InputAdornment2 } from "@elementor/ui";
|
|
|
416
417
|
// src/components/text-field-inner-selection.tsx
|
|
417
418
|
import * as React13 from "react";
|
|
418
419
|
import { forwardRef, useId } from "react";
|
|
419
|
-
import {
|
|
420
|
+
import { MenuListItem as MenuListItem2 } from "@elementor/editor-ui";
|
|
421
|
+
import { bindMenu, bindTrigger, Button as Button2, InputAdornment, Menu, TextField as TextField3, usePopupState } from "@elementor/ui";
|
|
420
422
|
var TextFieldInnerSelection = forwardRef(
|
|
421
423
|
({ placeholder, type, value, onChange, endAdornment, startAdornment }, ref) => {
|
|
422
424
|
return /* @__PURE__ */ React13.createElement(
|
|
@@ -459,7 +461,7 @@ var SelectionEndAdornment = ({
|
|
|
459
461
|
...bindTrigger(popupState)
|
|
460
462
|
},
|
|
461
463
|
value.toUpperCase()
|
|
462
|
-
), /* @__PURE__ */ React13.createElement(Menu, { MenuListProps: { dense: true }, ...bindMenu(popupState) }, options.map((option, index) => /* @__PURE__ */ React13.createElement(
|
|
464
|
+
), /* @__PURE__ */ React13.createElement(Menu, { MenuListProps: { dense: true }, ...bindMenu(popupState) }, options.map((option, index) => /* @__PURE__ */ React13.createElement(MenuListItem2, { key: option, onClick: () => handleMenuItemClick(index) }, option.toUpperCase()))));
|
|
463
465
|
};
|
|
464
466
|
|
|
465
467
|
// src/hooks/use-sync-external-state.tsx
|
|
@@ -605,7 +607,7 @@ import { UnstableColorField } from "@elementor/ui";
|
|
|
605
607
|
var ColorControl = createControl(({ propTypeUtil = colorPropTypeUtil, ...props }) => {
|
|
606
608
|
const { value, setValue } = useBoundProp(propTypeUtil);
|
|
607
609
|
const handleChange = (selectedColor) => {
|
|
608
|
-
setValue(selectedColor);
|
|
610
|
+
setValue(selectedColor || null);
|
|
609
611
|
};
|
|
610
612
|
return /* @__PURE__ */ React16.createElement(ControlActions, null, /* @__PURE__ */ React16.createElement(UnstableColorField, { size: "tiny", ...props, value: value ?? "", onChange: handleChange, fullWidth: true }));
|
|
611
613
|
});
|
|
@@ -616,10 +618,10 @@ var StrokeControl = createControl(() => {
|
|
|
616
618
|
const propContext = useBoundProp(strokePropTypeUtil);
|
|
617
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))));
|
|
618
620
|
});
|
|
619
|
-
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)));
|
|
620
622
|
|
|
621
623
|
// src/controls/box-shadow-repeater-control.tsx
|
|
622
|
-
import * as
|
|
624
|
+
import * as React24 from "react";
|
|
623
625
|
import { boxShadowPropTypeUtil, shadowPropTypeUtil } from "@elementor/editor-props";
|
|
624
626
|
import { FormLabel as FormLabel2, Grid as Grid4, UnstableColorIndicator } from "@elementor/ui";
|
|
625
627
|
import { __ as __5 } from "@wordpress/i18n";
|
|
@@ -640,7 +642,7 @@ var PopoverGridContainer = ({
|
|
|
640
642
|
}) => /* @__PURE__ */ React19.createElement(Grid3, { container: true, gap, alignItems, flexWrap }, children);
|
|
641
643
|
|
|
642
644
|
// src/components/repeater.tsx
|
|
643
|
-
import * as
|
|
645
|
+
import * as React23 from "react";
|
|
644
646
|
import { useEffect as useEffect2, useState as useState2 } from "react";
|
|
645
647
|
import { CopyIcon, EyeIcon, EyeOffIcon, PlusIcon, XIcon } from "@elementor/icons";
|
|
646
648
|
import {
|
|
@@ -657,8 +659,30 @@ import {
|
|
|
657
659
|
} from "@elementor/ui";
|
|
658
660
|
import { __ as __4 } from "@wordpress/i18n";
|
|
659
661
|
|
|
660
|
-
// src/
|
|
662
|
+
// src/control-adornments/control-adornments.tsx
|
|
663
|
+
import * as React21 from "react";
|
|
664
|
+
|
|
665
|
+
// src/control-adornments/control-adornments-context.tsx
|
|
661
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";
|
|
662
686
|
import { GripVerticalIcon } from "@elementor/icons";
|
|
663
687
|
import {
|
|
664
688
|
Divider,
|
|
@@ -669,10 +693,10 @@ import {
|
|
|
669
693
|
UnstableSortableProvider
|
|
670
694
|
} from "@elementor/ui";
|
|
671
695
|
var SortableProvider = (props) => {
|
|
672
|
-
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 }));
|
|
673
697
|
};
|
|
674
698
|
var SortableItem = ({ id, children }) => {
|
|
675
|
-
return /* @__PURE__ */
|
|
699
|
+
return /* @__PURE__ */ React22.createElement(
|
|
676
700
|
UnstableSortableItem,
|
|
677
701
|
{
|
|
678
702
|
id,
|
|
@@ -685,16 +709,16 @@ var SortableItem = ({ id, children }) => {
|
|
|
685
709
|
showDropIndication,
|
|
686
710
|
dropIndicationStyle
|
|
687
711
|
}) => {
|
|
688
|
-
return /* @__PURE__ */
|
|
712
|
+
return /* @__PURE__ */ React22.createElement(
|
|
689
713
|
StyledListItem,
|
|
690
714
|
{
|
|
691
715
|
...itemProps,
|
|
692
716
|
style: itemStyle,
|
|
693
717
|
sx: { backgroundColor: isDragOverlay ? "background.paper" : void 0 }
|
|
694
718
|
},
|
|
695
|
-
/* @__PURE__ */
|
|
719
|
+
/* @__PURE__ */ React22.createElement(SortableTrigger, { ...triggerProps, style: triggerStyle }),
|
|
696
720
|
children,
|
|
697
|
-
showDropIndication && /* @__PURE__ */
|
|
721
|
+
showDropIndication && /* @__PURE__ */ React22.createElement(StyledDivider, { style: dropIndicationStyle })
|
|
698
722
|
);
|
|
699
723
|
}
|
|
700
724
|
}
|
|
@@ -724,7 +748,7 @@ var StyledListItem = styled2(ListItem)`
|
|
|
724
748
|
}
|
|
725
749
|
}
|
|
726
750
|
`;
|
|
727
|
-
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" }));
|
|
728
752
|
var StyledDivider = styled2(Divider)`
|
|
729
753
|
height: 0px;
|
|
730
754
|
border: none;
|
|
@@ -816,24 +840,33 @@ var Repeater = ({
|
|
|
816
840
|
});
|
|
817
841
|
});
|
|
818
842
|
};
|
|
819
|
-
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) => {
|
|
820
853
|
const value = items[index];
|
|
821
854
|
if (!value) {
|
|
822
855
|
return null;
|
|
823
856
|
}
|
|
824
|
-
return /* @__PURE__ */
|
|
857
|
+
return /* @__PURE__ */ React23.createElement(SortableItem, { id: key, key: `sortable-${key}` }, /* @__PURE__ */ React23.createElement(
|
|
825
858
|
RepeaterItem,
|
|
826
859
|
{
|
|
827
860
|
bind: String(index),
|
|
828
861
|
disabled: value?.disabled,
|
|
829
|
-
label: /* @__PURE__ */
|
|
830
|
-
startIcon: /* @__PURE__ */
|
|
862
|
+
label: /* @__PURE__ */ React23.createElement(itemSettings.Label, { value }),
|
|
863
|
+
startIcon: /* @__PURE__ */ React23.createElement(itemSettings.Icon, { value }),
|
|
831
864
|
removeItem: () => removeRepeaterItem(index),
|
|
832
865
|
duplicateItem: () => duplicateRepeaterItem(index),
|
|
833
866
|
toggleDisableItem: () => toggleDisableRepeaterItem(index),
|
|
834
867
|
openOnMount: openOnAdd && openItem === key
|
|
835
868
|
},
|
|
836
|
-
(props) => /* @__PURE__ */
|
|
869
|
+
(props) => /* @__PURE__ */ React23.createElement(itemSettings.Content, { ...props, value, bind: String(index) })
|
|
837
870
|
));
|
|
838
871
|
})));
|
|
839
872
|
};
|
|
@@ -852,7 +885,7 @@ var RepeaterItem = ({
|
|
|
852
885
|
const duplicateLabel = __4("Duplicate", "elementor");
|
|
853
886
|
const toggleLabel = disabled ? __4("Show", "elementor") : __4("Hide", "elementor");
|
|
854
887
|
const removeLabel = __4("Remove", "elementor");
|
|
855
|
-
return /* @__PURE__ */
|
|
888
|
+
return /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement(
|
|
856
889
|
UnstableTag,
|
|
857
890
|
{
|
|
858
891
|
label,
|
|
@@ -863,10 +896,10 @@ var RepeaterItem = ({
|
|
|
863
896
|
"aria-label": __4("Open item", "elementor"),
|
|
864
897
|
...bindTrigger2(popoverState),
|
|
865
898
|
startIcon,
|
|
866
|
-
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 })))),
|
|
867
900
|
sx: { backgroundColor: "background.paper" }
|
|
868
901
|
}
|
|
869
|
-
), /* @__PURE__ */
|
|
902
|
+
), /* @__PURE__ */ React23.createElement(
|
|
870
903
|
Popover,
|
|
871
904
|
{
|
|
872
905
|
disablePortal: true,
|
|
@@ -880,7 +913,7 @@ var RepeaterItem = ({
|
|
|
880
913
|
...popoverProps,
|
|
881
914
|
anchorEl: ref
|
|
882
915
|
},
|
|
883
|
-
/* @__PURE__ */
|
|
916
|
+
/* @__PURE__ */ React23.createElement(Box, null, children({ anchorEl }))
|
|
884
917
|
));
|
|
885
918
|
};
|
|
886
919
|
var usePopover = (openOnMount) => {
|
|
@@ -903,7 +936,7 @@ var usePopover = (openOnMount) => {
|
|
|
903
936
|
// src/controls/box-shadow-repeater-control.tsx
|
|
904
937
|
var BoxShadowRepeaterControl = createControl(() => {
|
|
905
938
|
const { propType, value, setValue } = useBoundProp(boxShadowPropTypeUtil);
|
|
906
|
-
return /* @__PURE__ */
|
|
939
|
+
return /* @__PURE__ */ React24.createElement(PropProvider, { propType, value, setValue }, /* @__PURE__ */ React24.createElement(
|
|
907
940
|
Repeater,
|
|
908
941
|
{
|
|
909
942
|
openOnAdd: true,
|
|
@@ -919,13 +952,13 @@ var BoxShadowRepeaterControl = createControl(() => {
|
|
|
919
952
|
}
|
|
920
953
|
));
|
|
921
954
|
});
|
|
922
|
-
var ItemIcon = ({ value }) => /* @__PURE__ */
|
|
955
|
+
var ItemIcon = ({ value }) => /* @__PURE__ */ React24.createElement(UnstableColorIndicator, { size: "inherit", component: "span", value: value.value.color.value });
|
|
923
956
|
var ItemContent = ({ anchorEl, bind }) => {
|
|
924
|
-
return /* @__PURE__ */
|
|
957
|
+
return /* @__PURE__ */ React24.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React24.createElement(Content, { anchorEl }));
|
|
925
958
|
};
|
|
926
959
|
var Content = ({ anchorEl }) => {
|
|
927
960
|
const { propType, value, setValue } = useBoundProp(shadowPropTypeUtil);
|
|
928
|
-
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(
|
|
929
962
|
ColorControl,
|
|
930
963
|
{
|
|
931
964
|
slotProps: {
|
|
@@ -942,7 +975,7 @@ var Content = ({ anchorEl }) => {
|
|
|
942
975
|
}
|
|
943
976
|
}
|
|
944
977
|
}
|
|
945
|
-
)), /* @__PURE__ */
|
|
978
|
+
)), /* @__PURE__ */ React24.createElement(Control2, { bind: "position", label: __5("Position", "elementor"), sx: { overflow: "hidden" } }, /* @__PURE__ */ React24.createElement(
|
|
946
979
|
SelectControl,
|
|
947
980
|
{
|
|
948
981
|
options: [
|
|
@@ -950,14 +983,14 @@ var Content = ({ anchorEl }) => {
|
|
|
950
983
|
{ label: __5("Outset", "elementor"), value: null }
|
|
951
984
|
]
|
|
952
985
|
}
|
|
953
|
-
))), /* @__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)))));
|
|
954
987
|
};
|
|
955
988
|
var Control2 = ({
|
|
956
989
|
label,
|
|
957
990
|
bind,
|
|
958
991
|
children,
|
|
959
992
|
sx
|
|
960
|
-
}) => /* @__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))));
|
|
961
994
|
var ItemLabel = ({ value }) => {
|
|
962
995
|
const { position, hOffset, vOffset, blur, spread } = value.value;
|
|
963
996
|
const { size: blurSize = "", unit: blurUnit = "" } = blur?.value || {};
|
|
@@ -971,7 +1004,7 @@ var ItemLabel = ({ value }) => {
|
|
|
971
1004
|
blurSize + blurUnit,
|
|
972
1005
|
spreadSize + spreadUnit
|
|
973
1006
|
].join(" ");
|
|
974
|
-
return /* @__PURE__ */
|
|
1007
|
+
return /* @__PURE__ */ React24.createElement("span", { style: { textTransform: "capitalize" } }, positionLabel, ": ", sizes);
|
|
975
1008
|
};
|
|
976
1009
|
var initialShadow = {
|
|
977
1010
|
$$type: "shadow",
|
|
@@ -1001,11 +1034,11 @@ var initialShadow = {
|
|
|
1001
1034
|
};
|
|
1002
1035
|
|
|
1003
1036
|
// src/controls/toggle-control.tsx
|
|
1004
|
-
import * as
|
|
1037
|
+
import * as React26 from "react";
|
|
1005
1038
|
import { stringPropTypeUtil as stringPropTypeUtil5 } from "@elementor/editor-props";
|
|
1006
1039
|
|
|
1007
1040
|
// src/components/control-toggle-button-group.tsx
|
|
1008
|
-
import * as
|
|
1041
|
+
import * as React25 from "react";
|
|
1009
1042
|
import {
|
|
1010
1043
|
styled as styled3,
|
|
1011
1044
|
ToggleButton,
|
|
@@ -1029,7 +1062,7 @@ var ControlToggleButtonGroup = ({
|
|
|
1029
1062
|
const handleChange = (_, newValue) => {
|
|
1030
1063
|
onChange(newValue);
|
|
1031
1064
|
};
|
|
1032
|
-
return /* @__PURE__ */
|
|
1065
|
+
return /* @__PURE__ */ React25.createElement(
|
|
1033
1066
|
StyledToggleButtonGroup,
|
|
1034
1067
|
{
|
|
1035
1068
|
justify,
|
|
@@ -1044,7 +1077,7 @@ var ControlToggleButtonGroup = ({
|
|
|
1044
1077
|
}
|
|
1045
1078
|
},
|
|
1046
1079
|
items.map(
|
|
1047
|
-
({ 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(
|
|
1048
1081
|
ToggleButton,
|
|
1049
1082
|
{
|
|
1050
1083
|
key: buttonValue,
|
|
@@ -1053,7 +1086,7 @@ var ControlToggleButtonGroup = ({
|
|
|
1053
1086
|
size,
|
|
1054
1087
|
fullWidth
|
|
1055
1088
|
},
|
|
1056
|
-
/* @__PURE__ */
|
|
1089
|
+
/* @__PURE__ */ React25.createElement(Content3, { size })
|
|
1057
1090
|
)
|
|
1058
1091
|
)
|
|
1059
1092
|
);
|
|
@@ -1080,7 +1113,7 @@ var ToggleControl = createControl(
|
|
|
1080
1113
|
fullWidth,
|
|
1081
1114
|
size
|
|
1082
1115
|
};
|
|
1083
|
-
return exclusive ? /* @__PURE__ */
|
|
1116
|
+
return exclusive ? /* @__PURE__ */ React26.createElement(
|
|
1084
1117
|
ControlToggleButtonGroup,
|
|
1085
1118
|
{
|
|
1086
1119
|
...toggleButtonGroupProps,
|
|
@@ -1088,7 +1121,7 @@ var ToggleControl = createControl(
|
|
|
1088
1121
|
onChange: setValue,
|
|
1089
1122
|
exclusive: true
|
|
1090
1123
|
}
|
|
1091
|
-
) : /* @__PURE__ */
|
|
1124
|
+
) : /* @__PURE__ */ React26.createElement(
|
|
1092
1125
|
ControlToggleButtonGroup,
|
|
1093
1126
|
{
|
|
1094
1127
|
...toggleButtonGroupProps,
|
|
@@ -1101,7 +1134,7 @@ var ToggleControl = createControl(
|
|
|
1101
1134
|
);
|
|
1102
1135
|
|
|
1103
1136
|
// src/controls/number-control.tsx
|
|
1104
|
-
import * as
|
|
1137
|
+
import * as React27 from "react";
|
|
1105
1138
|
import { numberPropTypeUtil } from "@elementor/editor-props";
|
|
1106
1139
|
import { TextField as TextField4 } from "@elementor/ui";
|
|
1107
1140
|
var isEmptyOrNaN = (value) => value === null || value === void 0 || value === "" || Number.isNaN(Number(value));
|
|
@@ -1123,7 +1156,7 @@ var NumberControl = createControl(
|
|
|
1123
1156
|
const formattedValue = shouldForceInt ? +parseInt(eventValue) : Number(eventValue);
|
|
1124
1157
|
setValue(Math.min(Math.max(formattedValue, min), max));
|
|
1125
1158
|
};
|
|
1126
|
-
return /* @__PURE__ */
|
|
1159
|
+
return /* @__PURE__ */ React27.createElement(ControlActions, null, /* @__PURE__ */ React27.createElement(
|
|
1127
1160
|
TextField4,
|
|
1128
1161
|
{
|
|
1129
1162
|
size: "tiny",
|
|
@@ -1139,11 +1172,20 @@ var NumberControl = createControl(
|
|
|
1139
1172
|
);
|
|
1140
1173
|
|
|
1141
1174
|
// src/controls/equal-unequal-sizes-control.tsx
|
|
1142
|
-
import * as
|
|
1175
|
+
import * as React29 from "react";
|
|
1143
1176
|
import { useId as useId2, useRef } from "react";
|
|
1144
1177
|
import { sizePropTypeUtil as sizePropTypeUtil2 } from "@elementor/editor-props";
|
|
1145
|
-
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";
|
|
1146
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
|
|
1147
1189
|
var isEqualSizes = (propValue, items) => {
|
|
1148
1190
|
const values = Object.values(propValue);
|
|
1149
1191
|
if (values.length !== items.length) {
|
|
@@ -1197,7 +1239,7 @@ function EqualUnequalSizesControl({
|
|
|
1197
1239
|
return splitEqualValue() ?? null;
|
|
1198
1240
|
};
|
|
1199
1241
|
const isMixed = !!multiSizeValue;
|
|
1200
|
-
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(
|
|
1201
1243
|
ToggleButton2,
|
|
1202
1244
|
{
|
|
1203
1245
|
size: "tiny",
|
|
@@ -1208,7 +1250,7 @@ function EqualUnequalSizesControl({
|
|
|
1208
1250
|
"aria-label": tooltipLabel
|
|
1209
1251
|
},
|
|
1210
1252
|
icon
|
|
1211
|
-
))))), /* @__PURE__ */
|
|
1253
|
+
))))), /* @__PURE__ */ React29.createElement(
|
|
1212
1254
|
Popover2,
|
|
1213
1255
|
{
|
|
1214
1256
|
disablePortal: true,
|
|
@@ -1223,19 +1265,20 @@ function EqualUnequalSizesControl({
|
|
|
1223
1265
|
},
|
|
1224
1266
|
...bindPopover2(popupState),
|
|
1225
1267
|
slotProps: {
|
|
1268
|
+
// eslint-disable-next-line react-compiler/react-compiler
|
|
1226
1269
|
paper: { sx: { mt: 0.5, width: controlRef.current?.getBoundingClientRect().width } }
|
|
1227
1270
|
}
|
|
1228
1271
|
},
|
|
1229
|
-
/* @__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] }))))
|
|
1230
1273
|
));
|
|
1231
1274
|
}
|
|
1232
|
-
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 })))));
|
|
1233
1276
|
|
|
1234
1277
|
// src/controls/linked-dimensions-control.tsx
|
|
1235
|
-
import * as
|
|
1278
|
+
import * as React30 from "react";
|
|
1236
1279
|
import { dimensionsPropTypeUtil, sizePropTypeUtil as sizePropTypeUtil3 } from "@elementor/editor-props";
|
|
1237
1280
|
import { DetachIcon, LinkIcon, SideBottomIcon, SideLeftIcon, SideRightIcon, SideTopIcon } from "@elementor/icons";
|
|
1238
|
-
import { Grid as Grid6, Stack as
|
|
1281
|
+
import { Grid as Grid6, Stack as Stack8, ToggleButton as ToggleButton3, Tooltip as Tooltip4 } from "@elementor/ui";
|
|
1239
1282
|
import { __ as __7 } from "@wordpress/i18n";
|
|
1240
1283
|
var LinkedDimensionsControl = createControl(
|
|
1241
1284
|
({
|
|
@@ -1267,7 +1310,7 @@ var LinkedDimensionsControl = createControl(
|
|
|
1267
1310
|
const LinkedIcon = isLinked ? LinkIcon : DetachIcon;
|
|
1268
1311
|
const linkedLabel = __7("Link %s", "elementor").replace("%s", tooltipLabel);
|
|
1269
1312
|
const unlinkedLabel = __7("Unlink %s", "elementor").replace("%s", tooltipLabel);
|
|
1270
|
-
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(
|
|
1271
1314
|
ToggleButton3,
|
|
1272
1315
|
{
|
|
1273
1316
|
"aria-label": isLinked ? unlinkedLabel : linkedLabel,
|
|
@@ -1277,36 +1320,36 @@ var LinkedDimensionsControl = createControl(
|
|
|
1277
1320
|
sx: { marginLeft: "auto" },
|
|
1278
1321
|
onChange: onLinkToggle
|
|
1279
1322
|
},
|
|
1280
|
-
/* @__PURE__ */
|
|
1281
|
-
))), /* @__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(
|
|
1282
1325
|
Control3,
|
|
1283
1326
|
{
|
|
1284
1327
|
bind: "block-start",
|
|
1285
|
-
startIcon: /* @__PURE__ */
|
|
1328
|
+
startIcon: /* @__PURE__ */ React30.createElement(SideTopIcon, { fontSize: "tiny" }),
|
|
1286
1329
|
isLinked,
|
|
1287
1330
|
extendedValues
|
|
1288
1331
|
}
|
|
1289
|
-
))), /* @__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(
|
|
1290
1333
|
Control3,
|
|
1291
1334
|
{
|
|
1292
1335
|
bind: "inline-end",
|
|
1293
|
-
startIcon: isSiteRtl ? /* @__PURE__ */
|
|
1336
|
+
startIcon: isSiteRtl ? /* @__PURE__ */ React30.createElement(SideLeftIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React30.createElement(SideRightIcon, { fontSize: "tiny" }),
|
|
1294
1337
|
isLinked,
|
|
1295
1338
|
extendedValues
|
|
1296
1339
|
}
|
|
1297
|
-
)))), /* @__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(
|
|
1298
1341
|
Control3,
|
|
1299
1342
|
{
|
|
1300
1343
|
bind: "block-end",
|
|
1301
|
-
startIcon: /* @__PURE__ */
|
|
1344
|
+
startIcon: /* @__PURE__ */ React30.createElement(SideBottomIcon, { fontSize: "tiny" }),
|
|
1302
1345
|
isLinked,
|
|
1303
1346
|
extendedValues
|
|
1304
1347
|
}
|
|
1305
|
-
))), /* @__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(
|
|
1306
1349
|
Control3,
|
|
1307
1350
|
{
|
|
1308
1351
|
bind: "inline-start",
|
|
1309
|
-
startIcon: isSiteRtl ? /* @__PURE__ */
|
|
1352
|
+
startIcon: isSiteRtl ? /* @__PURE__ */ React30.createElement(SideRightIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React30.createElement(SideLeftIcon, { fontSize: "tiny" }),
|
|
1310
1353
|
isLinked,
|
|
1311
1354
|
extendedValues
|
|
1312
1355
|
}
|
|
@@ -1320,13 +1363,13 @@ var Control3 = ({
|
|
|
1320
1363
|
extendedValues
|
|
1321
1364
|
}) => {
|
|
1322
1365
|
if (isLinked) {
|
|
1323
|
-
return /* @__PURE__ */
|
|
1366
|
+
return /* @__PURE__ */ React30.createElement(SizeControl, { startIcon, extendedValues });
|
|
1324
1367
|
}
|
|
1325
|
-
return /* @__PURE__ */
|
|
1368
|
+
return /* @__PURE__ */ React30.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React30.createElement(SizeControl, { startIcon, extendedValues }));
|
|
1326
1369
|
};
|
|
1327
1370
|
|
|
1328
1371
|
// src/controls/font-family-control/font-family-control.tsx
|
|
1329
|
-
import * as
|
|
1372
|
+
import * as React31 from "react";
|
|
1330
1373
|
import { useEffect as useEffect3, useRef as useRef2, useState as useState3 } from "react";
|
|
1331
1374
|
import { stringPropTypeUtil as stringPropTypeUtil6 } from "@elementor/editor-props";
|
|
1332
1375
|
import { ChevronDownIcon, SearchIcon, TextIcon, XIcon as XIcon2 } from "@elementor/icons";
|
|
@@ -1338,10 +1381,10 @@ import {
|
|
|
1338
1381
|
IconButton as IconButton2,
|
|
1339
1382
|
InputAdornment as InputAdornment3,
|
|
1340
1383
|
Link,
|
|
1341
|
-
ListSubheader,
|
|
1342
1384
|
MenuList,
|
|
1385
|
+
MenuSubheader,
|
|
1343
1386
|
Popover as Popover3,
|
|
1344
|
-
Stack as
|
|
1387
|
+
Stack as Stack9,
|
|
1345
1388
|
styled as styled4,
|
|
1346
1389
|
TextField as TextField5,
|
|
1347
1390
|
Typography as Typography2,
|
|
@@ -1388,16 +1431,16 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1388
1431
|
setSearchValue("");
|
|
1389
1432
|
popoverState.close();
|
|
1390
1433
|
};
|
|
1391
|
-
return /* @__PURE__ */
|
|
1434
|
+
return /* @__PURE__ */ React31.createElement(React31.Fragment, null, /* @__PURE__ */ React31.createElement(
|
|
1392
1435
|
UnstableTag2,
|
|
1393
1436
|
{
|
|
1394
1437
|
variant: "outlined",
|
|
1395
1438
|
label: fontFamily,
|
|
1396
|
-
endIcon: /* @__PURE__ */
|
|
1439
|
+
endIcon: /* @__PURE__ */ React31.createElement(ChevronDownIcon, { fontSize: "tiny" }),
|
|
1397
1440
|
...bindTrigger3(popoverState),
|
|
1398
1441
|
fullWidth: true
|
|
1399
1442
|
}
|
|
1400
|
-
), /* @__PURE__ */
|
|
1443
|
+
), /* @__PURE__ */ React31.createElement(
|
|
1401
1444
|
Popover3,
|
|
1402
1445
|
{
|
|
1403
1446
|
disablePortal: true,
|
|
@@ -1406,7 +1449,7 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1406
1449
|
...bindPopover3(popoverState),
|
|
1407
1450
|
onClose: handleClose
|
|
1408
1451
|
},
|
|
1409
|
-
/* @__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(
|
|
1410
1453
|
TextField5,
|
|
1411
1454
|
{
|
|
1412
1455
|
fullWidth: true,
|
|
@@ -1415,10 +1458,10 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1415
1458
|
placeholder: __8("Search", "elementor"),
|
|
1416
1459
|
onChange: handleSearch,
|
|
1417
1460
|
InputProps: {
|
|
1418
|
-
startAdornment: /* @__PURE__ */
|
|
1461
|
+
startAdornment: /* @__PURE__ */ React31.createElement(InputAdornment3, { position: "start" }, /* @__PURE__ */ React31.createElement(SearchIcon, { fontSize: SIZE2 }))
|
|
1419
1462
|
}
|
|
1420
1463
|
}
|
|
1421
|
-
)), /* @__PURE__ */
|
|
1464
|
+
)), /* @__PURE__ */ React31.createElement(Divider2, null), filteredFontFamilies.length > 0 ? /* @__PURE__ */ React31.createElement(
|
|
1422
1465
|
FontList,
|
|
1423
1466
|
{
|
|
1424
1467
|
fontListItems: filteredFontFamilies,
|
|
@@ -1426,7 +1469,7 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1426
1469
|
handleClose,
|
|
1427
1470
|
fontFamily
|
|
1428
1471
|
}
|
|
1429
|
-
) : /* @__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(
|
|
1430
1473
|
Typography2,
|
|
1431
1474
|
{
|
|
1432
1475
|
variant: "subtitle2",
|
|
@@ -1437,16 +1480,16 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1437
1480
|
justifyContent: "center"
|
|
1438
1481
|
}
|
|
1439
1482
|
},
|
|
1440
|
-
/* @__PURE__ */
|
|
1441
|
-
/* @__PURE__ */
|
|
1483
|
+
/* @__PURE__ */ React31.createElement("span", null, "\u201C"),
|
|
1484
|
+
/* @__PURE__ */ React31.createElement(
|
|
1442
1485
|
"span",
|
|
1443
1486
|
{
|
|
1444
1487
|
style: { maxWidth: "80%", overflow: "hidden", textOverflow: "ellipsis" }
|
|
1445
1488
|
},
|
|
1446
1489
|
searchValue
|
|
1447
1490
|
),
|
|
1448
|
-
/* @__PURE__ */
|
|
1449
|
-
)), /* @__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(
|
|
1450
1493
|
Link,
|
|
1451
1494
|
{
|
|
1452
1495
|
color: "secondary",
|
|
@@ -1482,10 +1525,11 @@ var FontList = ({ fontListItems, setFontFamily, handleClose, fontFamily }) => {
|
|
|
1482
1525
|
() => {
|
|
1483
1526
|
virtualizer.scrollToIndex(fontListItems.findIndex((item) => item.value === fontFamily));
|
|
1484
1527
|
},
|
|
1528
|
+
// eslint-disable-next-line react-compiler/react-compiler
|
|
1485
1529
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1486
1530
|
[fontFamily]
|
|
1487
1531
|
);
|
|
1488
|
-
return /* @__PURE__ */
|
|
1532
|
+
return /* @__PURE__ */ React31.createElement(
|
|
1489
1533
|
Box2,
|
|
1490
1534
|
{
|
|
1491
1535
|
ref: containerRef,
|
|
@@ -1495,7 +1539,7 @@ var FontList = ({ fontListItems, setFontFamily, handleClose, fontFamily }) => {
|
|
|
1495
1539
|
width: 220
|
|
1496
1540
|
}
|
|
1497
1541
|
},
|
|
1498
|
-
/* @__PURE__ */
|
|
1542
|
+
/* @__PURE__ */ React31.createElement(
|
|
1499
1543
|
StyledMenuList,
|
|
1500
1544
|
{
|
|
1501
1545
|
role: "listbox",
|
|
@@ -1511,8 +1555,8 @@ var FontList = ({ fontListItems, setFontFamily, handleClose, fontFamily }) => {
|
|
|
1511
1555
|
const isSelected = selectedItem?.value === item.value;
|
|
1512
1556
|
const tabIndexFallback = !selectedItem ? 0 : -1;
|
|
1513
1557
|
if (item.type === "category") {
|
|
1514
|
-
return /* @__PURE__ */
|
|
1515
|
-
|
|
1558
|
+
return /* @__PURE__ */ React31.createElement(
|
|
1559
|
+
MenuSubheader,
|
|
1516
1560
|
{
|
|
1517
1561
|
key: virtualRow.key,
|
|
1518
1562
|
style: {
|
|
@@ -1522,7 +1566,7 @@ var FontList = ({ fontListItems, setFontFamily, handleClose, fontFamily }) => {
|
|
|
1522
1566
|
item.value
|
|
1523
1567
|
);
|
|
1524
1568
|
}
|
|
1525
|
-
return /* @__PURE__ */
|
|
1569
|
+
return /* @__PURE__ */ React31.createElement(
|
|
1526
1570
|
"li",
|
|
1527
1571
|
{
|
|
1528
1572
|
key: virtualRow.key,
|
|
@@ -1589,13 +1633,13 @@ var useDebounce = (fn, delay) => {
|
|
|
1589
1633
|
};
|
|
1590
1634
|
|
|
1591
1635
|
// src/controls/url-control.tsx
|
|
1592
|
-
import * as
|
|
1636
|
+
import * as React32 from "react";
|
|
1593
1637
|
import { urlPropTypeUtil } from "@elementor/editor-props";
|
|
1594
1638
|
import { TextField as TextField6 } from "@elementor/ui";
|
|
1595
1639
|
var UrlControl = createControl(({ placeholder }) => {
|
|
1596
1640
|
const { value, setValue } = useBoundProp(urlPropTypeUtil);
|
|
1597
1641
|
const handleChange = (event) => setValue(event.target.value);
|
|
1598
|
-
return /* @__PURE__ */
|
|
1642
|
+
return /* @__PURE__ */ React32.createElement(ControlActions, null, /* @__PURE__ */ React32.createElement(
|
|
1599
1643
|
TextField6,
|
|
1600
1644
|
{
|
|
1601
1645
|
size: "tiny",
|
|
@@ -1608,8 +1652,9 @@ var UrlControl = createControl(({ placeholder }) => {
|
|
|
1608
1652
|
});
|
|
1609
1653
|
|
|
1610
1654
|
// src/controls/link-control.tsx
|
|
1611
|
-
import * as
|
|
1655
|
+
import * as React34 from "react";
|
|
1612
1656
|
import { useMemo, useState as useState4 } from "react";
|
|
1657
|
+
import { getAncestorWithAnchorTag, getDescendantWithAnchorTag } from "@elementor/editor-elements";
|
|
1613
1658
|
import {
|
|
1614
1659
|
booleanPropTypeUtil,
|
|
1615
1660
|
linkPropTypeUtil,
|
|
@@ -1620,12 +1665,12 @@ import {
|
|
|
1620
1665
|
import { httpService as httpService2 } from "@elementor/http";
|
|
1621
1666
|
import { MinusIcon, PlusIcon as PlusIcon2 } from "@elementor/icons";
|
|
1622
1667
|
import { useSessionStorage } from "@elementor/session";
|
|
1623
|
-
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";
|
|
1624
1669
|
import { debounce as debounce2 } from "@elementor/utils";
|
|
1625
1670
|
import { __ as __9 } from "@wordpress/i18n";
|
|
1626
1671
|
|
|
1627
1672
|
// src/components/autocomplete.tsx
|
|
1628
|
-
import * as
|
|
1673
|
+
import * as React33 from "react";
|
|
1629
1674
|
import { forwardRef as forwardRef2 } from "react";
|
|
1630
1675
|
import { XIcon as XIcon3 } from "@elementor/icons";
|
|
1631
1676
|
import {
|
|
@@ -1651,7 +1696,7 @@ var Autocomplete = forwardRef2((props, ref) => {
|
|
|
1651
1696
|
const muiWarningPreventer = allowCustomValues || !!value?.toString()?.length;
|
|
1652
1697
|
const isOptionEqualToValue = muiWarningPreventer ? void 0 : () => true;
|
|
1653
1698
|
const isValueFromOptions = typeof value === "number" && !!findMatchingOption(options, value);
|
|
1654
|
-
return /* @__PURE__ */
|
|
1699
|
+
return /* @__PURE__ */ React33.createElement(
|
|
1655
1700
|
AutocompleteBase,
|
|
1656
1701
|
{
|
|
1657
1702
|
...restProps,
|
|
@@ -1669,8 +1714,8 @@ var Autocomplete = forwardRef2((props, ref) => {
|
|
|
1669
1714
|
groupBy: isCategorizedOptionPool(options) ? (optionId) => findMatchingOption(options, optionId)?.groupLabel || optionId : void 0,
|
|
1670
1715
|
isOptionEqualToValue,
|
|
1671
1716
|
filterOptions: () => optionKeys,
|
|
1672
|
-
renderOption: (optionProps, optionId) => /* @__PURE__ */
|
|
1673
|
-
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(
|
|
1674
1719
|
TextInput,
|
|
1675
1720
|
{
|
|
1676
1721
|
params,
|
|
@@ -1693,7 +1738,7 @@ var TextInput = ({
|
|
|
1693
1738
|
const onChange = (event) => {
|
|
1694
1739
|
handleChange(event.target.value);
|
|
1695
1740
|
};
|
|
1696
|
-
return /* @__PURE__ */
|
|
1741
|
+
return /* @__PURE__ */ React33.createElement(
|
|
1697
1742
|
TextField7,
|
|
1698
1743
|
{
|
|
1699
1744
|
...params,
|
|
@@ -1706,7 +1751,7 @@ var TextInput = ({
|
|
|
1706
1751
|
},
|
|
1707
1752
|
InputProps: {
|
|
1708
1753
|
...params.InputProps,
|
|
1709
|
-
endAdornment: /* @__PURE__ */
|
|
1754
|
+
endAdornment: /* @__PURE__ */ React33.createElement(ClearButton, { params, allowClear, handleChange })
|
|
1710
1755
|
}
|
|
1711
1756
|
}
|
|
1712
1757
|
);
|
|
@@ -1715,7 +1760,7 @@ var ClearButton = ({
|
|
|
1715
1760
|
allowClear,
|
|
1716
1761
|
handleChange,
|
|
1717
1762
|
params
|
|
1718
|
-
}) => /* @__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 })));
|
|
1719
1764
|
function findMatchingOption(options, optionId = null) {
|
|
1720
1765
|
const formattedOption = (optionId || "").toString();
|
|
1721
1766
|
return options.find(({ id }) => formattedOption === id.toString());
|
|
@@ -1736,36 +1781,6 @@ function _factoryFilter(newValue, options, minInputLength) {
|
|
|
1736
1781
|
);
|
|
1737
1782
|
}
|
|
1738
1783
|
|
|
1739
|
-
// src/utils/link-restriction.ts
|
|
1740
|
-
import { getContainer } from "@elementor/editor-elements";
|
|
1741
|
-
function getLinkRestriction(elementId) {
|
|
1742
|
-
if (getAncestorAnchor(elementId)) {
|
|
1743
|
-
return {
|
|
1744
|
-
shouldRestrict: true,
|
|
1745
|
-
restrictReason: "ancestor"
|
|
1746
|
-
};
|
|
1747
|
-
}
|
|
1748
|
-
if (getDescendantAnchor(elementId)) {
|
|
1749
|
-
return {
|
|
1750
|
-
shouldRestrict: true,
|
|
1751
|
-
restrictReason: "descendant"
|
|
1752
|
-
};
|
|
1753
|
-
}
|
|
1754
|
-
return { shouldRestrict: false };
|
|
1755
|
-
}
|
|
1756
|
-
function getAncestorAnchor(elementId) {
|
|
1757
|
-
const element = getElementView(elementId);
|
|
1758
|
-
return element?.closest("a") || null;
|
|
1759
|
-
}
|
|
1760
|
-
function getDescendantAnchor(elementId) {
|
|
1761
|
-
const element = getElementView(elementId);
|
|
1762
|
-
return element?.querySelector("a") || null;
|
|
1763
|
-
}
|
|
1764
|
-
function getElementView(id) {
|
|
1765
|
-
const elementContainer = getContainer(id);
|
|
1766
|
-
return elementContainer?.view?.el || null;
|
|
1767
|
-
}
|
|
1768
|
-
|
|
1769
1784
|
// src/controls/link-control.tsx
|
|
1770
1785
|
var SIZE3 = "tiny";
|
|
1771
1786
|
var LinkControl = createControl((props) => {
|
|
@@ -1783,7 +1798,7 @@ var LinkControl = createControl((props) => {
|
|
|
1783
1798
|
generateFirstLoadedOption(value)
|
|
1784
1799
|
);
|
|
1785
1800
|
const onEnabledChange = () => {
|
|
1786
|
-
const
|
|
1801
|
+
const shouldRestrict = getAncestorWithAnchorTag(elementId) || getDescendantWithAnchorTag(elementId);
|
|
1787
1802
|
if (shouldRestrict && !isEnabled) {
|
|
1788
1803
|
return;
|
|
1789
1804
|
}
|
|
@@ -1829,8 +1844,8 @@ var LinkControl = createControl((props) => {
|
|
|
1829
1844
|
),
|
|
1830
1845
|
[endpoint]
|
|
1831
1846
|
);
|
|
1832
|
-
return /* @__PURE__ */
|
|
1833
|
-
|
|
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,
|
|
1834
1849
|
{
|
|
1835
1850
|
direction: "row",
|
|
1836
1851
|
sx: {
|
|
@@ -1838,8 +1853,8 @@ var LinkControl = createControl((props) => {
|
|
|
1838
1853
|
alignItems: "center"
|
|
1839
1854
|
}
|
|
1840
1855
|
},
|
|
1841
|
-
/* @__PURE__ */
|
|
1842
|
-
/* @__PURE__ */
|
|
1856
|
+
/* @__PURE__ */ React34.createElement(ControlFormLabel, null, __9("Link", "elementor")),
|
|
1857
|
+
/* @__PURE__ */ React34.createElement(
|
|
1843
1858
|
ToggleIconControl,
|
|
1844
1859
|
{
|
|
1845
1860
|
enabled: isEnabled,
|
|
@@ -1847,28 +1862,28 @@ var LinkControl = createControl((props) => {
|
|
|
1847
1862
|
label: __9("Toggle link", "elementor")
|
|
1848
1863
|
}
|
|
1849
1864
|
)
|
|
1850
|
-
), /* @__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(
|
|
1851
1866
|
Autocomplete,
|
|
1852
1867
|
{
|
|
1853
1868
|
options,
|
|
1854
1869
|
allowCustomValues,
|
|
1855
1870
|
placeholder,
|
|
1856
|
-
value: value?.destination?.value,
|
|
1871
|
+
value: value?.destination?.value?.settings?.label || value?.destination?.value,
|
|
1857
1872
|
onOptionChange,
|
|
1858
1873
|
onTextChange,
|
|
1859
1874
|
minInputLength
|
|
1860
1875
|
}
|
|
1861
|
-
))), /* @__PURE__ */
|
|
1876
|
+
))), /* @__PURE__ */ React34.createElement(PropKeyProvider, { bind: "isTargetBlank" }, /* @__PURE__ */ React34.createElement(SwitchControl, null))))));
|
|
1862
1877
|
});
|
|
1863
1878
|
var ToggleIconControl = ({ enabled, onIconClick, label }) => {
|
|
1864
|
-
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 }));
|
|
1865
1880
|
};
|
|
1866
1881
|
var SwitchControl = () => {
|
|
1867
1882
|
const { value = false, setValue } = useBoundProp(booleanPropTypeUtil);
|
|
1868
1883
|
const onClick = () => {
|
|
1869
1884
|
setValue(!value);
|
|
1870
1885
|
};
|
|
1871
|
-
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 })));
|
|
1872
1887
|
};
|
|
1873
1888
|
async function fetchOptions(ajaxUrl, params) {
|
|
1874
1889
|
if (!params || !ajaxUrl) {
|
|
@@ -1900,10 +1915,10 @@ function generateFirstLoadedOption(unionValue) {
|
|
|
1900
1915
|
}
|
|
1901
1916
|
|
|
1902
1917
|
// src/controls/gap-control.tsx
|
|
1903
|
-
import * as
|
|
1918
|
+
import * as React35 from "react";
|
|
1904
1919
|
import { layoutDirectionPropTypeUtil, sizePropTypeUtil as sizePropTypeUtil4 } from "@elementor/editor-props";
|
|
1905
1920
|
import { DetachIcon as DetachIcon2, LinkIcon as LinkIcon2 } from "@elementor/icons";
|
|
1906
|
-
import { Grid as Grid8, Stack as
|
|
1921
|
+
import { Grid as Grid8, Stack as Stack11, ToggleButton as ToggleButton4, Tooltip as Tooltip5 } from "@elementor/ui";
|
|
1907
1922
|
import { __ as __10 } from "@wordpress/i18n";
|
|
1908
1923
|
var GapControl = createControl(({ label }) => {
|
|
1909
1924
|
const {
|
|
@@ -1928,7 +1943,7 @@ var GapControl = createControl(({ label }) => {
|
|
|
1928
1943
|
const LinkedIcon = isLinked ? LinkIcon2 : DetachIcon2;
|
|
1929
1944
|
const linkedLabel = __10("Link %s", "elementor").replace("%s", tooltipLabel);
|
|
1930
1945
|
const unlinkedLabel = __10("Unlink %s", "elementor").replace("%s", tooltipLabel);
|
|
1931
|
-
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(
|
|
1932
1947
|
ToggleButton4,
|
|
1933
1948
|
{
|
|
1934
1949
|
"aria-label": isLinked ? unlinkedLabel : linkedLabel,
|
|
@@ -1938,27 +1953,27 @@ var GapControl = createControl(({ label }) => {
|
|
|
1938
1953
|
sx: { marginLeft: "auto" },
|
|
1939
1954
|
onChange: onLinkToggle
|
|
1940
1955
|
},
|
|
1941
|
-
/* @__PURE__ */
|
|
1942
|
-
))), /* @__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 })))));
|
|
1943
1958
|
});
|
|
1944
1959
|
var Control4 = ({ bind, isLinked }) => {
|
|
1945
1960
|
if (isLinked) {
|
|
1946
|
-
return /* @__PURE__ */
|
|
1961
|
+
return /* @__PURE__ */ React35.createElement(SizeControl, null);
|
|
1947
1962
|
}
|
|
1948
|
-
return /* @__PURE__ */
|
|
1963
|
+
return /* @__PURE__ */ React35.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React35.createElement(SizeControl, null));
|
|
1949
1964
|
};
|
|
1950
1965
|
|
|
1951
1966
|
// src/controls/svg-media-control.tsx
|
|
1952
|
-
import * as
|
|
1967
|
+
import * as React37 from "react";
|
|
1953
1968
|
import { useState as useState6 } from "react";
|
|
1954
1969
|
import { imageSrcPropTypeUtil as imageSrcPropTypeUtil2 } from "@elementor/editor-props";
|
|
1955
1970
|
import { UploadIcon as UploadIcon2 } from "@elementor/icons";
|
|
1956
|
-
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";
|
|
1957
1972
|
import { useWpMediaAttachment as useWpMediaAttachment2, useWpMediaFrame as useWpMediaFrame2 } from "@elementor/wp-media";
|
|
1958
1973
|
import { __ as __12 } from "@wordpress/i18n";
|
|
1959
1974
|
|
|
1960
1975
|
// src/components/enable-unfiltered-modal.tsx
|
|
1961
|
-
import * as
|
|
1976
|
+
import * as React36 from "react";
|
|
1962
1977
|
import { useState as useState5 } from "react";
|
|
1963
1978
|
import { useCurrentUserCapabilities } from "@elementor/editor-current-user";
|
|
1964
1979
|
import {
|
|
@@ -2011,9 +2026,9 @@ var EnableUnfilteredModal = (props) => {
|
|
|
2011
2026
|
}
|
|
2012
2027
|
};
|
|
2013
2028
|
const dialogProps = { ...props, isPending, handleEnable, isError, onClose };
|
|
2014
|
-
return canManageOptions ? /* @__PURE__ */
|
|
2029
|
+
return canManageOptions ? /* @__PURE__ */ React36.createElement(AdminDialog, { ...dialogProps }) : /* @__PURE__ */ React36.createElement(NonAdminDialog, { ...dialogProps });
|
|
2015
2030
|
};
|
|
2016
|
-
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(
|
|
2017
2032
|
Button3,
|
|
2018
2033
|
{
|
|
2019
2034
|
size: "medium",
|
|
@@ -2022,9 +2037,9 @@ var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @_
|
|
|
2022
2037
|
color: "primary",
|
|
2023
2038
|
disabled: isPending
|
|
2024
2039
|
},
|
|
2025
|
-
isPending ? /* @__PURE__ */
|
|
2040
|
+
isPending ? /* @__PURE__ */ React36.createElement(CircularProgress2, { size: 24 }) : __11("Enable", "elementor")
|
|
2026
2041
|
)));
|
|
2027
|
-
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"))));
|
|
2028
2043
|
|
|
2029
2044
|
// src/controls/svg-media-control.tsx
|
|
2030
2045
|
var TILE_SIZE = 8;
|
|
@@ -2040,7 +2055,7 @@ var StyledCard = styled5(Card2)`
|
|
|
2040
2055
|
${TILE_SIZE / 2}px ${TILE_SIZE / 2}px;
|
|
2041
2056
|
border: none;
|
|
2042
2057
|
`;
|
|
2043
|
-
var StyledCardMediaContainer = styled5(
|
|
2058
|
+
var StyledCardMediaContainer = styled5(Stack12)`
|
|
2044
2059
|
position: relative;
|
|
2045
2060
|
height: 140px;
|
|
2046
2061
|
object-fit: contain;
|
|
@@ -2085,7 +2100,7 @@ var SvgMediaControl = createControl(() => {
|
|
|
2085
2100
|
open(openOptions);
|
|
2086
2101
|
}
|
|
2087
2102
|
};
|
|
2088
|
-
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(
|
|
2089
2104
|
CardMedia2,
|
|
2090
2105
|
{
|
|
2091
2106
|
component: "img",
|
|
@@ -2093,7 +2108,7 @@ var SvgMediaControl = createControl(() => {
|
|
|
2093
2108
|
alt: __12("Preview SVG", "elementor"),
|
|
2094
2109
|
sx: { maxHeight: "140px", width: "50px" }
|
|
2095
2110
|
}
|
|
2096
|
-
)), /* @__PURE__ */
|
|
2111
|
+
)), /* @__PURE__ */ React37.createElement(
|
|
2097
2112
|
CardOverlay2,
|
|
2098
2113
|
{
|
|
2099
2114
|
sx: {
|
|
@@ -2102,7 +2117,7 @@ var SvgMediaControl = createControl(() => {
|
|
|
2102
2117
|
}
|
|
2103
2118
|
}
|
|
2104
2119
|
},
|
|
2105
|
-
/* @__PURE__ */
|
|
2120
|
+
/* @__PURE__ */ React37.createElement(Stack12, { gap: 1 }, /* @__PURE__ */ React37.createElement(
|
|
2106
2121
|
Button4,
|
|
2107
2122
|
{
|
|
2108
2123
|
size: "tiny",
|
|
@@ -2111,13 +2126,13 @@ var SvgMediaControl = createControl(() => {
|
|
|
2111
2126
|
onClick: () => handleClick(MODE_BROWSE)
|
|
2112
2127
|
},
|
|
2113
2128
|
__12("Select SVG", "elementor")
|
|
2114
|
-
), /* @__PURE__ */
|
|
2129
|
+
), /* @__PURE__ */ React37.createElement(
|
|
2115
2130
|
Button4,
|
|
2116
2131
|
{
|
|
2117
2132
|
size: "tiny",
|
|
2118
2133
|
variant: "text",
|
|
2119
2134
|
color: "inherit",
|
|
2120
|
-
startIcon: /* @__PURE__ */
|
|
2135
|
+
startIcon: /* @__PURE__ */ React37.createElement(UploadIcon2, null),
|
|
2121
2136
|
onClick: () => handleClick(MODE_UPLOAD)
|
|
2122
2137
|
},
|
|
2123
2138
|
__12("Upload", "elementor")
|
|
@@ -2126,20 +2141,20 @@ var SvgMediaControl = createControl(() => {
|
|
|
2126
2141
|
});
|
|
2127
2142
|
|
|
2128
2143
|
// src/controls/background-control/background-control.tsx
|
|
2129
|
-
import * as
|
|
2144
|
+
import * as React44 from "react";
|
|
2130
2145
|
import { backgroundPropTypeUtil } from "@elementor/editor-props";
|
|
2131
2146
|
import { Grid as Grid14 } from "@elementor/ui";
|
|
2132
2147
|
import { __ as __18 } from "@wordpress/i18n";
|
|
2133
2148
|
|
|
2134
2149
|
// src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
|
|
2135
|
-
import * as
|
|
2150
|
+
import * as React43 from "react";
|
|
2136
2151
|
import {
|
|
2137
2152
|
backgroundColorOverlayPropTypeUtil as backgroundColorOverlayPropTypeUtil2,
|
|
2138
2153
|
backgroundImageOverlayPropTypeUtil as backgroundImageOverlayPropTypeUtil2,
|
|
2139
2154
|
backgroundOverlayPropTypeUtil,
|
|
2140
2155
|
colorPropTypeUtil as colorPropTypeUtil3
|
|
2141
2156
|
} from "@elementor/editor-props";
|
|
2142
|
-
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";
|
|
2143
2158
|
import { useWpMediaAttachment as useWpMediaAttachment3 } from "@elementor/wp-media";
|
|
2144
2159
|
import { __ as __17 } from "@wordpress/i18n";
|
|
2145
2160
|
|
|
@@ -2148,7 +2163,7 @@ import { parseEnv } from "@elementor/env";
|
|
|
2148
2163
|
var { env } = parseEnv("@elementor/editor-controls");
|
|
2149
2164
|
|
|
2150
2165
|
// src/controls/background-control/background-gradient-color-control.tsx
|
|
2151
|
-
import * as
|
|
2166
|
+
import * as React38 from "react";
|
|
2152
2167
|
import {
|
|
2153
2168
|
backgroundGradientOverlayPropTypeUtil,
|
|
2154
2169
|
colorPropTypeUtil as colorPropTypeUtil2,
|
|
@@ -2195,7 +2210,7 @@ var BackgroundGradientColorControl = createControl(() => {
|
|
|
2195
2210
|
positions: positions?.value.split(" ")
|
|
2196
2211
|
};
|
|
2197
2212
|
};
|
|
2198
|
-
return /* @__PURE__ */
|
|
2213
|
+
return /* @__PURE__ */ React38.createElement(ControlActions, null, /* @__PURE__ */ React38.createElement(
|
|
2199
2214
|
UnstableGradientBox,
|
|
2200
2215
|
{
|
|
2201
2216
|
sx: { width: "auto", padding: 1.5 },
|
|
@@ -2220,7 +2235,7 @@ var initialBackgroundGradientOverlay = backgroundGradientOverlayPropTypeUtil.cre
|
|
|
2220
2235
|
});
|
|
2221
2236
|
|
|
2222
2237
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-attachment.tsx
|
|
2223
|
-
import * as
|
|
2238
|
+
import * as React39 from "react";
|
|
2224
2239
|
import { PinIcon, PinnedOffIcon } from "@elementor/icons";
|
|
2225
2240
|
import { Grid as Grid9 } from "@elementor/ui";
|
|
2226
2241
|
import { __ as __13 } from "@wordpress/i18n";
|
|
@@ -2228,25 +2243,26 @@ var attachmentControlOptions = [
|
|
|
2228
2243
|
{
|
|
2229
2244
|
value: "fixed",
|
|
2230
2245
|
label: __13("Fixed", "elementor"),
|
|
2231
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2246
|
+
renderContent: ({ size }) => /* @__PURE__ */ React39.createElement(PinIcon, { fontSize: size }),
|
|
2232
2247
|
showTooltip: true
|
|
2233
2248
|
},
|
|
2234
2249
|
{
|
|
2235
2250
|
value: "scroll",
|
|
2236
2251
|
label: __13("Scroll", "elementor"),
|
|
2237
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2252
|
+
renderContent: ({ size }) => /* @__PURE__ */ React39.createElement(PinnedOffIcon, { fontSize: size }),
|
|
2238
2253
|
showTooltip: true
|
|
2239
2254
|
}
|
|
2240
2255
|
];
|
|
2241
2256
|
var BackgroundImageOverlayAttachment = () => {
|
|
2242
|
-
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 })));
|
|
2243
2258
|
};
|
|
2244
2259
|
|
|
2245
2260
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx
|
|
2246
|
-
import * as
|
|
2261
|
+
import * as React40 from "react";
|
|
2247
2262
|
import { backgroundImagePositionOffsetPropTypeUtil, stringPropTypeUtil as stringPropTypeUtil9 } from "@elementor/editor-props";
|
|
2263
|
+
import { MenuListItem as MenuListItem3 } from "@elementor/editor-ui";
|
|
2248
2264
|
import { LetterXIcon, LetterYIcon } from "@elementor/icons";
|
|
2249
|
-
import { Grid as Grid10,
|
|
2265
|
+
import { Grid as Grid10, Select as Select2 } from "@elementor/ui";
|
|
2250
2266
|
import { __ as __14 } from "@wordpress/i18n";
|
|
2251
2267
|
var backgroundPositionOptions = [
|
|
2252
2268
|
{ label: __14("Center center", "elementor"), value: "center center" },
|
|
@@ -2272,7 +2288,7 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
2272
2288
|
stringPropContext.setValue(value);
|
|
2273
2289
|
}
|
|
2274
2290
|
};
|
|
2275
|
-
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(
|
|
2276
2292
|
Select2,
|
|
2277
2293
|
{
|
|
2278
2294
|
size: "tiny",
|
|
@@ -2280,12 +2296,12 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
2280
2296
|
onChange: handlePositionChange,
|
|
2281
2297
|
fullWidth: true
|
|
2282
2298
|
},
|
|
2283
|
-
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */
|
|
2284
|
-
)))), 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);
|
|
2285
2301
|
};
|
|
2286
2302
|
|
|
2287
2303
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-repeat.tsx
|
|
2288
|
-
import * as
|
|
2304
|
+
import * as React41 from "react";
|
|
2289
2305
|
import { DotsHorizontalIcon, DotsVerticalIcon, GridDotsIcon, XIcon as XIcon4 } from "@elementor/icons";
|
|
2290
2306
|
import { Grid as Grid11 } from "@elementor/ui";
|
|
2291
2307
|
import { __ as __15 } from "@wordpress/i18n";
|
|
@@ -2293,34 +2309,34 @@ var repeatControlOptions = [
|
|
|
2293
2309
|
{
|
|
2294
2310
|
value: "repeat",
|
|
2295
2311
|
label: __15("Repeat", "elementor"),
|
|
2296
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2312
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(GridDotsIcon, { fontSize: size }),
|
|
2297
2313
|
showTooltip: true
|
|
2298
2314
|
},
|
|
2299
2315
|
{
|
|
2300
2316
|
value: "repeat-x",
|
|
2301
2317
|
label: __15("Repeat-x", "elementor"),
|
|
2302
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2318
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(DotsHorizontalIcon, { fontSize: size }),
|
|
2303
2319
|
showTooltip: true
|
|
2304
2320
|
},
|
|
2305
2321
|
{
|
|
2306
2322
|
value: "repeat-y",
|
|
2307
2323
|
label: __15("Repeat-y", "elementor"),
|
|
2308
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2324
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(DotsVerticalIcon, { fontSize: size }),
|
|
2309
2325
|
showTooltip: true
|
|
2310
2326
|
},
|
|
2311
2327
|
{
|
|
2312
2328
|
value: "no-repeat",
|
|
2313
2329
|
label: __15("No-repeat", "elementor"),
|
|
2314
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2330
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(XIcon4, { fontSize: size }),
|
|
2315
2331
|
showTooltip: true
|
|
2316
2332
|
}
|
|
2317
2333
|
];
|
|
2318
2334
|
var BackgroundImageOverlayRepeat = () => {
|
|
2319
|
-
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 })));
|
|
2320
2336
|
};
|
|
2321
2337
|
|
|
2322
2338
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx
|
|
2323
|
-
import * as
|
|
2339
|
+
import * as React42 from "react";
|
|
2324
2340
|
import { backgroundImageSizeScalePropTypeUtil, stringPropTypeUtil as stringPropTypeUtil10 } from "@elementor/editor-props";
|
|
2325
2341
|
import {
|
|
2326
2342
|
ArrowBarBothIcon,
|
|
@@ -2336,25 +2352,25 @@ var sizeControlOptions = [
|
|
|
2336
2352
|
{
|
|
2337
2353
|
value: "auto",
|
|
2338
2354
|
label: __16("Auto", "elementor"),
|
|
2339
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2355
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(LetterAIcon, { fontSize: size }),
|
|
2340
2356
|
showTooltip: true
|
|
2341
2357
|
},
|
|
2342
2358
|
{
|
|
2343
2359
|
value: "cover",
|
|
2344
2360
|
label: __16("Cover", "elementor"),
|
|
2345
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2361
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(ArrowsMaximizeIcon, { fontSize: size }),
|
|
2346
2362
|
showTooltip: true
|
|
2347
2363
|
},
|
|
2348
2364
|
{
|
|
2349
2365
|
value: "contain",
|
|
2350
2366
|
label: __16("Contain", "elementor"),
|
|
2351
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2367
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(ArrowBarBothIcon, { fontSize: size }),
|
|
2352
2368
|
showTooltip: true
|
|
2353
2369
|
},
|
|
2354
2370
|
{
|
|
2355
2371
|
value: "custom",
|
|
2356
2372
|
label: __16("Custom", "elementor"),
|
|
2357
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2373
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(PencilIcon, { fontSize: size }),
|
|
2358
2374
|
showTooltip: true
|
|
2359
2375
|
}
|
|
2360
2376
|
];
|
|
@@ -2369,7 +2385,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
2369
2385
|
stringPropContext.setValue(size);
|
|
2370
2386
|
}
|
|
2371
2387
|
};
|
|
2372
|
-
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(
|
|
2373
2389
|
ControlToggleButtonGroup,
|
|
2374
2390
|
{
|
|
2375
2391
|
exclusive: true,
|
|
@@ -2377,16 +2393,16 @@ var BackgroundImageOverlaySize = () => {
|
|
|
2377
2393
|
value: backgroundImageScaleContext.value ? "custom" : stringPropContext.value,
|
|
2378
2394
|
onChange: handleSizeChange
|
|
2379
2395
|
}
|
|
2380
|
-
)))), 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(
|
|
2381
2397
|
SizeControl,
|
|
2382
2398
|
{
|
|
2383
|
-
startIcon: /* @__PURE__ */
|
|
2399
|
+
startIcon: /* @__PURE__ */ React42.createElement(ArrowsMoveHorizontalIcon, { fontSize: "tiny" }),
|
|
2384
2400
|
extendedValues: ["auto"]
|
|
2385
2401
|
}
|
|
2386
|
-
))), /* @__PURE__ */
|
|
2402
|
+
))), /* @__PURE__ */ React42.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(PropKeyProvider, { bind: "height" }, /* @__PURE__ */ React42.createElement(
|
|
2387
2403
|
SizeControl,
|
|
2388
2404
|
{
|
|
2389
|
-
startIcon: /* @__PURE__ */
|
|
2405
|
+
startIcon: /* @__PURE__ */ React42.createElement(ArrowsMoveVerticalIcon, { fontSize: "tiny" }),
|
|
2390
2406
|
extendedValues: ["auto"]
|
|
2391
2407
|
}
|
|
2392
2408
|
)))))) : null);
|
|
@@ -2493,7 +2509,7 @@ var backgroundResolutionOptions = [
|
|
|
2493
2509
|
];
|
|
2494
2510
|
var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
2495
2511
|
const { propType, value: overlayValues, setValue } = useBoundProp(backgroundOverlayPropTypeUtil);
|
|
2496
|
-
return /* @__PURE__ */
|
|
2512
|
+
return /* @__PURE__ */ React43.createElement(PropProvider, { propType, value: overlayValues, setValue }, /* @__PURE__ */ React43.createElement(
|
|
2497
2513
|
Repeater,
|
|
2498
2514
|
{
|
|
2499
2515
|
openOnAdd: true,
|
|
@@ -2510,7 +2526,7 @@ var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
|
2510
2526
|
));
|
|
2511
2527
|
});
|
|
2512
2528
|
var ItemContent2 = ({ bind }) => {
|
|
2513
|
-
return /* @__PURE__ */
|
|
2529
|
+
return /* @__PURE__ */ React43.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React43.createElement(Content2, null));
|
|
2514
2530
|
};
|
|
2515
2531
|
var Content2 = () => {
|
|
2516
2532
|
const { getTabsProps, getTabProps, getTabPanelProps } = useBackgroundTabsHistory({
|
|
@@ -2518,7 +2534,7 @@ var Content2 = () => {
|
|
|
2518
2534
|
color: initialBackgroundColorOverlay.value,
|
|
2519
2535
|
gradient: initialBackgroundGradientOverlay.value
|
|
2520
2536
|
});
|
|
2521
|
-
return /* @__PURE__ */
|
|
2537
|
+
return /* @__PURE__ */ React43.createElement(Box4, { sx: { width: "100%" } }, /* @__PURE__ */ React43.createElement(Box4, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React43.createElement(
|
|
2522
2538
|
Tabs,
|
|
2523
2539
|
{
|
|
2524
2540
|
size: "small",
|
|
@@ -2526,19 +2542,19 @@ var Content2 = () => {
|
|
|
2526
2542
|
...getTabsProps(),
|
|
2527
2543
|
"aria-label": __17("Background Overlay", "elementor")
|
|
2528
2544
|
},
|
|
2529
|
-
/* @__PURE__ */
|
|
2530
|
-
/* @__PURE__ */
|
|
2531
|
-
/* @__PURE__ */
|
|
2532
|
-
)), /* @__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))));
|
|
2533
2549
|
};
|
|
2534
2550
|
var ItemIcon2 = ({ value }) => {
|
|
2535
2551
|
switch (value.$$type) {
|
|
2536
2552
|
case "background-image-overlay":
|
|
2537
|
-
return /* @__PURE__ */
|
|
2553
|
+
return /* @__PURE__ */ React43.createElement(ItemIconImage, { value });
|
|
2538
2554
|
case "background-color-overlay":
|
|
2539
|
-
return /* @__PURE__ */
|
|
2555
|
+
return /* @__PURE__ */ React43.createElement(ItemIconColor, { value });
|
|
2540
2556
|
case "background-gradient-overlay":
|
|
2541
|
-
return /* @__PURE__ */
|
|
2557
|
+
return /* @__PURE__ */ React43.createElement(ItemIconGradient, { value });
|
|
2542
2558
|
default:
|
|
2543
2559
|
return null;
|
|
2544
2560
|
}
|
|
@@ -2551,56 +2567,70 @@ var extractColorFrom = (prop) => {
|
|
|
2551
2567
|
};
|
|
2552
2568
|
var ItemIconColor = ({ value: prop }) => {
|
|
2553
2569
|
const color = extractColorFrom(prop);
|
|
2554
|
-
return /* @__PURE__ */
|
|
2570
|
+
return /* @__PURE__ */ React43.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: color });
|
|
2555
2571
|
};
|
|
2556
2572
|
var ItemIconImage = ({ value }) => {
|
|
2557
2573
|
const { imageUrl } = useImage(value);
|
|
2558
|
-
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
|
+
);
|
|
2559
2586
|
};
|
|
2560
2587
|
var ItemIconGradient = ({ value }) => {
|
|
2561
2588
|
const gradient = getGradientValue(value);
|
|
2562
|
-
return /* @__PURE__ */
|
|
2589
|
+
return /* @__PURE__ */ React43.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
|
|
2563
2590
|
};
|
|
2564
2591
|
var ItemLabel2 = ({ value }) => {
|
|
2565
2592
|
switch (value.$$type) {
|
|
2566
2593
|
case "background-image-overlay":
|
|
2567
|
-
return /* @__PURE__ */
|
|
2594
|
+
return /* @__PURE__ */ React43.createElement(ItemLabelImage, { value });
|
|
2568
2595
|
case "background-color-overlay":
|
|
2569
|
-
return /* @__PURE__ */
|
|
2596
|
+
return /* @__PURE__ */ React43.createElement(ItemLabelColor, { value });
|
|
2570
2597
|
case "background-gradient-overlay":
|
|
2571
|
-
return /* @__PURE__ */
|
|
2598
|
+
return /* @__PURE__ */ React43.createElement(ItemLabelGradient, { value });
|
|
2572
2599
|
default:
|
|
2573
2600
|
return null;
|
|
2574
2601
|
}
|
|
2575
2602
|
};
|
|
2576
2603
|
var ItemLabelColor = ({ value: prop }) => {
|
|
2577
2604
|
const color = extractColorFrom(prop);
|
|
2578
|
-
return /* @__PURE__ */
|
|
2605
|
+
return /* @__PURE__ */ React43.createElement("span", null, color);
|
|
2579
2606
|
};
|
|
2580
2607
|
var ItemLabelImage = ({ value }) => {
|
|
2581
2608
|
const { imageTitle } = useImage(value);
|
|
2582
|
-
return /* @__PURE__ */
|
|
2609
|
+
return /* @__PURE__ */ React43.createElement("span", null, imageTitle);
|
|
2583
2610
|
};
|
|
2584
2611
|
var ItemLabelGradient = ({ value }) => {
|
|
2585
2612
|
if (value.value.type.value === "linear") {
|
|
2586
|
-
return /* @__PURE__ */
|
|
2613
|
+
return /* @__PURE__ */ React43.createElement("span", null, __17("Linear Gradient", "elementor"));
|
|
2587
2614
|
}
|
|
2588
|
-
return /* @__PURE__ */
|
|
2615
|
+
return /* @__PURE__ */ React43.createElement("span", null, __17("Radial Gradient", "elementor"));
|
|
2589
2616
|
};
|
|
2590
2617
|
var ColorOverlayContent = () => {
|
|
2591
2618
|
const propContext = useBoundProp(backgroundColorOverlayPropTypeUtil2);
|
|
2592
|
-
return /* @__PURE__ */
|
|
2619
|
+
return /* @__PURE__ */ React43.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React43.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React43.createElement(ColorControl, null)));
|
|
2593
2620
|
};
|
|
2594
2621
|
var ImageOverlayContent = () => {
|
|
2595
2622
|
const propContext = useBoundProp(backgroundImageOverlayPropTypeUtil2);
|
|
2596
|
-
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(
|
|
2597
2624
|
ImageControl,
|
|
2598
2625
|
{
|
|
2599
2626
|
resolutionLabel: __17("Resolution", "elementor"),
|
|
2600
2627
|
sizes: backgroundResolutionOptions
|
|
2601
2628
|
}
|
|
2602
|
-
)))), /* @__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)));
|
|
2603
2630
|
};
|
|
2631
|
+
var StyledUnstableColorIndicator = styled6(UnstableColorIndicator2)(({ theme }) => ({
|
|
2632
|
+
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
2633
|
+
}));
|
|
2604
2634
|
var useImage = (image) => {
|
|
2605
2635
|
let imageTitle, imageUrl = null;
|
|
2606
2636
|
const imageSrc = image?.value.image.value?.src.value;
|
|
@@ -2627,28 +2657,8 @@ var getGradientValue = (value) => {
|
|
|
2627
2657
|
// src/controls/background-control/background-control.tsx
|
|
2628
2658
|
var BackgroundControl = createControl(() => {
|
|
2629
2659
|
const propContext = useBoundProp(backgroundPropTypeUtil);
|
|
2630
|
-
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))))));
|
|
2631
2661
|
});
|
|
2632
|
-
|
|
2633
|
-
// src/control-adornments/control-adornments-context.tsx
|
|
2634
|
-
import * as React42 from "react";
|
|
2635
|
-
import { createContext as createContext5, useContext as useContext5 } from "react";
|
|
2636
|
-
var Context2 = createContext5(null);
|
|
2637
|
-
var ControlAdornmentsProvider = ({ children, items }) => /* @__PURE__ */ React42.createElement(Context2.Provider, { value: { items } }, children);
|
|
2638
|
-
var useControlAdornments = () => {
|
|
2639
|
-
const context = useContext5(Context2);
|
|
2640
|
-
return context?.items ?? [];
|
|
2641
|
-
};
|
|
2642
|
-
|
|
2643
|
-
// src/control-adornments/control-adornments.tsx
|
|
2644
|
-
import * as React43 from "react";
|
|
2645
|
-
function ControlAdornments() {
|
|
2646
|
-
const items = useControlAdornments();
|
|
2647
|
-
if (items?.length === 0) {
|
|
2648
|
-
return null;
|
|
2649
|
-
}
|
|
2650
|
-
return /* @__PURE__ */ React43.createElement(React43.Fragment, null, items.map(({ Adornment, id }) => /* @__PURE__ */ React43.createElement(Adornment, { key: id })));
|
|
2651
|
-
}
|
|
2652
2662
|
export {
|
|
2653
2663
|
BackgroundControl,
|
|
2654
2664
|
BoxShadowRepeaterControl,
|
|
@@ -2656,7 +2666,7 @@ export {
|
|
|
2656
2666
|
ControlActionsProvider,
|
|
2657
2667
|
ControlAdornments,
|
|
2658
2668
|
ControlAdornmentsProvider,
|
|
2659
|
-
|
|
2669
|
+
ControlFormLabel,
|
|
2660
2670
|
ControlReplacementProvider,
|
|
2661
2671
|
ControlToggleButtonGroup,
|
|
2662
2672
|
EqualUnequalSizesControl,
|