@elementor/editor-controls 3.32.0-68 → 3.32.0-69
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/dist/index.d.mts +7 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.js +782 -708
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +562 -489
- package/dist/index.mjs.map +1 -1
- package/package.json +14 -14
- package/src/bound-prop-context/prop-context.tsx +2 -1
- package/src/bound-prop-context/use-bound-prop.ts +8 -4
- package/src/components/number-input.tsx +41 -0
- package/src/components/size-control/size-input.tsx +5 -9
- package/src/components/size-control/text-field-inner-selection.tsx +9 -6
- package/src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx +2 -0
- package/src/controls/linked-dimensions-control.tsx +19 -2
- package/src/controls/number-control.tsx +20 -21
- package/src/controls/position-control.tsx +8 -2
- package/src/controls/size-control.tsx +16 -7
- package/src/controls/transform-control/functions/axis-row.tsx +1 -0
- package/src/hooks/use-sync-external-state.tsx +6 -3
package/dist/index.js
CHANGED
|
@@ -222,7 +222,7 @@ function useBoundProp(propTypeUtil) {
|
|
|
222
222
|
return { ...propKeyContext, disabled };
|
|
223
223
|
}
|
|
224
224
|
function setValue(value2, options, meta) {
|
|
225
|
-
if (!validate2(value2)) {
|
|
225
|
+
if (!validate2(value2, meta?.validation)) {
|
|
226
226
|
return;
|
|
227
227
|
}
|
|
228
228
|
if (value2 === null) {
|
|
@@ -245,11 +245,14 @@ function useBoundProp(propTypeUtil) {
|
|
|
245
245
|
}
|
|
246
246
|
var useValidation = (propType) => {
|
|
247
247
|
const [isValid, setIsValid] = (0, import_react3.useState)(true);
|
|
248
|
-
const validate2 = (value) => {
|
|
248
|
+
const validate2 = (value, validation) => {
|
|
249
249
|
let valid = true;
|
|
250
250
|
if (propType.settings.required && value === null) {
|
|
251
251
|
valid = false;
|
|
252
252
|
}
|
|
253
|
+
if (validation && !validation(value)) {
|
|
254
|
+
valid = false;
|
|
255
|
+
}
|
|
253
256
|
setIsValid(valid);
|
|
254
257
|
return valid;
|
|
255
258
|
};
|
|
@@ -611,17 +614,17 @@ var TextAreaControl = createControl(({ placeholder }) => {
|
|
|
611
614
|
});
|
|
612
615
|
|
|
613
616
|
// src/controls/size-control.tsx
|
|
614
|
-
var
|
|
615
|
-
var
|
|
617
|
+
var React18 = __toESM(require("react"));
|
|
618
|
+
var import_react13 = require("react");
|
|
616
619
|
var import_editor_props7 = require("@elementor/editor-props");
|
|
617
620
|
var import_editor_responsive = require("@elementor/editor-responsive");
|
|
618
|
-
var
|
|
621
|
+
var import_ui13 = require("@elementor/ui");
|
|
619
622
|
|
|
620
623
|
// src/components/size-control/size-input.tsx
|
|
621
|
-
var
|
|
622
|
-
var
|
|
624
|
+
var React16 = __toESM(require("react"));
|
|
625
|
+
var import_react9 = require("react");
|
|
623
626
|
var import_icons2 = require("@elementor/icons");
|
|
624
|
-
var
|
|
627
|
+
var import_ui11 = require("@elementor/ui");
|
|
625
628
|
|
|
626
629
|
// src/utils/size-control.ts
|
|
627
630
|
var lengthUnits = ["px", "%", "em", "rem", "vw", "vh"];
|
|
@@ -635,12 +638,44 @@ function isUnitExtendedOption(unit) {
|
|
|
635
638
|
}
|
|
636
639
|
|
|
637
640
|
// src/components/size-control/text-field-inner-selection.tsx
|
|
638
|
-
var
|
|
639
|
-
var
|
|
641
|
+
var React15 = __toESM(require("react"));
|
|
642
|
+
var import_react8 = require("react");
|
|
640
643
|
var import_editor_props6 = require("@elementor/editor-props");
|
|
641
644
|
var import_editor_ui2 = require("@elementor/editor-ui");
|
|
645
|
+
var import_ui10 = require("@elementor/ui");
|
|
646
|
+
|
|
647
|
+
// src/components/number-input.tsx
|
|
648
|
+
var React14 = __toESM(require("react"));
|
|
649
|
+
var import_react7 = require("react");
|
|
642
650
|
var import_ui9 = require("@elementor/ui");
|
|
643
|
-
var
|
|
651
|
+
var RESTRICTED_INPUT_KEYS = ["e", "E", "+"];
|
|
652
|
+
var NumberInput = (0, import_react7.forwardRef)((props, ref) => {
|
|
653
|
+
const [key, setKey] = (0, import_react7.useState)(0);
|
|
654
|
+
const handleKeyDown = (event) => {
|
|
655
|
+
blockRestrictedKeys(event, props.inputProps?.min);
|
|
656
|
+
props.onKeyDown?.(event);
|
|
657
|
+
};
|
|
658
|
+
const handleBlur = (event) => {
|
|
659
|
+
props.onBlur?.(event);
|
|
660
|
+
const { valid } = event.target.validity;
|
|
661
|
+
if (!valid) {
|
|
662
|
+
setKey((prev) => prev + 1);
|
|
663
|
+
}
|
|
664
|
+
};
|
|
665
|
+
return /* @__PURE__ */ React14.createElement(import_ui9.TextField, { ...props, ref, key, onKeyDown: handleKeyDown, onBlur: handleBlur });
|
|
666
|
+
});
|
|
667
|
+
function blockRestrictedKeys(event, min) {
|
|
668
|
+
const restrictedInputKeys = [...RESTRICTED_INPUT_KEYS];
|
|
669
|
+
if (min >= 0) {
|
|
670
|
+
restrictedInputKeys.push("-");
|
|
671
|
+
}
|
|
672
|
+
if (restrictedInputKeys.includes(event.key)) {
|
|
673
|
+
event.preventDefault();
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
// src/components/size-control/text-field-inner-selection.tsx
|
|
678
|
+
var TextFieldInnerSelection = (0, import_react8.forwardRef)(
|
|
644
679
|
({
|
|
645
680
|
placeholder,
|
|
646
681
|
type,
|
|
@@ -649,16 +684,17 @@ var TextFieldInnerSelection = (0, import_react7.forwardRef)(
|
|
|
649
684
|
onBlur,
|
|
650
685
|
onKeyDown,
|
|
651
686
|
onKeyUp,
|
|
687
|
+
InputProps,
|
|
652
688
|
inputProps,
|
|
653
689
|
disabled,
|
|
654
690
|
isPopoverOpen
|
|
655
691
|
}, ref) => {
|
|
656
692
|
const { placeholder: boundPropPlaceholder } = useBoundProp(import_editor_props6.sizePropTypeUtil);
|
|
657
693
|
const getCursorStyle = () => ({
|
|
658
|
-
input: { cursor:
|
|
694
|
+
input: { cursor: InputProps.readOnly ? "default !important" : void 0 }
|
|
659
695
|
});
|
|
660
|
-
return /* @__PURE__ */
|
|
661
|
-
|
|
696
|
+
return /* @__PURE__ */ React15.createElement(
|
|
697
|
+
NumberInput,
|
|
662
698
|
{
|
|
663
699
|
ref,
|
|
664
700
|
sx: getCursorStyle(),
|
|
@@ -666,14 +702,15 @@ var TextFieldInnerSelection = (0, import_react7.forwardRef)(
|
|
|
666
702
|
fullWidth: true,
|
|
667
703
|
type,
|
|
668
704
|
value,
|
|
669
|
-
onChange,
|
|
705
|
+
onInput: onChange,
|
|
670
706
|
onKeyDown,
|
|
671
707
|
onKeyUp,
|
|
672
708
|
disabled,
|
|
673
709
|
onBlur,
|
|
674
710
|
focused: isPopoverOpen ? true : void 0,
|
|
675
711
|
placeholder: placeholder ?? (String(boundPropPlaceholder?.size ?? "") || void 0),
|
|
676
|
-
InputProps
|
|
712
|
+
InputProps,
|
|
713
|
+
inputProps
|
|
677
714
|
}
|
|
678
715
|
);
|
|
679
716
|
}
|
|
@@ -686,25 +723,25 @@ var SelectionEndAdornment = ({
|
|
|
686
723
|
menuItemsAttributes = {},
|
|
687
724
|
disabled
|
|
688
725
|
}) => {
|
|
689
|
-
const popupState = (0,
|
|
726
|
+
const popupState = (0, import_ui10.usePopupState)({
|
|
690
727
|
variant: "popover",
|
|
691
|
-
popupId: (0,
|
|
728
|
+
popupId: (0, import_react8.useId)()
|
|
692
729
|
});
|
|
693
730
|
const handleMenuItemClick = (index) => {
|
|
694
731
|
onClick(options[index]);
|
|
695
732
|
popupState.close();
|
|
696
733
|
};
|
|
697
734
|
const { placeholder, showPrimaryColor } = useUnitPlaceholder(value);
|
|
698
|
-
return /* @__PURE__ */
|
|
735
|
+
return /* @__PURE__ */ React15.createElement(import_ui10.InputAdornment, { position: "end" }, /* @__PURE__ */ React15.createElement(
|
|
699
736
|
StyledButton,
|
|
700
737
|
{
|
|
701
738
|
isPrimaryColor: showPrimaryColor,
|
|
702
739
|
size: "small",
|
|
703
740
|
disabled,
|
|
704
|
-
...(0,
|
|
741
|
+
...(0, import_ui10.bindTrigger)(popupState)
|
|
705
742
|
},
|
|
706
743
|
placeholder ?? alternativeOptionLabels[value] ?? value
|
|
707
|
-
), /* @__PURE__ */
|
|
744
|
+
), /* @__PURE__ */ React15.createElement(import_ui10.Menu, { MenuListProps: { dense: true }, ...(0, import_ui10.bindMenu)(popupState) }, options.map((option, index) => /* @__PURE__ */ React15.createElement(
|
|
708
745
|
import_editor_ui2.MenuListItem,
|
|
709
746
|
{
|
|
710
747
|
key: option,
|
|
@@ -734,7 +771,7 @@ function useUnitPlaceholder(value) {
|
|
|
734
771
|
showPrimaryColor
|
|
735
772
|
};
|
|
736
773
|
}
|
|
737
|
-
var StyledButton = (0,
|
|
774
|
+
var StyledButton = (0, import_ui10.styled)(import_ui10.Button, {
|
|
738
775
|
shouldForwardProp: (prop) => prop !== "isPrimaryColor"
|
|
739
776
|
})(({ isPrimaryColor, theme }) => ({
|
|
740
777
|
color: isPrimaryColor ? theme.palette.text.primary : theme.palette.text.tertiary,
|
|
@@ -744,7 +781,6 @@ var StyledButton = (0, import_ui9.styled)(import_ui9.Button, {
|
|
|
744
781
|
}));
|
|
745
782
|
|
|
746
783
|
// src/components/size-control/size-input.tsx
|
|
747
|
-
var RESTRICTED_INPUT_KEYS = ["e", "E", "+", "-"];
|
|
748
784
|
var SizeInput = ({
|
|
749
785
|
units: units2,
|
|
750
786
|
handleUnitChange,
|
|
@@ -757,9 +793,10 @@ var SizeInput = ({
|
|
|
757
793
|
size,
|
|
758
794
|
unit,
|
|
759
795
|
popupState,
|
|
760
|
-
disabled
|
|
796
|
+
disabled,
|
|
797
|
+
min
|
|
761
798
|
}) => {
|
|
762
|
-
const unitInputBufferRef = (0,
|
|
799
|
+
const unitInputBufferRef = (0, import_react9.useRef)("");
|
|
763
800
|
const inputType = isUnitExtendedOption(unit) ? "text" : "number";
|
|
764
801
|
const inputValue = !isUnitExtendedOption(unit) && Number.isNaN(size) ? "" : size ?? "";
|
|
765
802
|
const handleKeyUp = (event) => {
|
|
@@ -780,14 +817,14 @@ var SizeInput = ({
|
|
|
780
817
|
"aria-controls": popupState.isOpen ? popupState.popupId : void 0,
|
|
781
818
|
"aria-haspopup": true
|
|
782
819
|
};
|
|
783
|
-
const
|
|
820
|
+
const InputProps = {
|
|
784
821
|
...popupAttributes,
|
|
785
822
|
readOnly: isUnitExtendedOption(unit),
|
|
786
823
|
autoComplete: "off",
|
|
787
824
|
onClick,
|
|
788
825
|
onFocus,
|
|
789
|
-
startAdornment: startIcon ? /* @__PURE__ */
|
|
790
|
-
endAdornment: /* @__PURE__ */
|
|
826
|
+
startAdornment: startIcon ? /* @__PURE__ */ React16.createElement(import_ui11.InputAdornment, { position: "start", disabled }, startIcon) : void 0,
|
|
827
|
+
endAdornment: /* @__PURE__ */ React16.createElement(
|
|
791
828
|
SelectionEndAdornment,
|
|
792
829
|
{
|
|
793
830
|
disabled,
|
|
@@ -795,7 +832,7 @@ var SizeInput = ({
|
|
|
795
832
|
onClick: handleUnitChange,
|
|
796
833
|
value: unit,
|
|
797
834
|
alternativeOptionLabels: {
|
|
798
|
-
custom: /* @__PURE__ */
|
|
835
|
+
custom: /* @__PURE__ */ React16.createElement(import_icons2.MathFunctionIcon, { fontSize: "tiny" })
|
|
799
836
|
},
|
|
800
837
|
menuItemsAttributes: units2.includes("custom") ? {
|
|
801
838
|
custom: popupAttributes
|
|
@@ -803,7 +840,7 @@ var SizeInput = ({
|
|
|
803
840
|
}
|
|
804
841
|
)
|
|
805
842
|
};
|
|
806
|
-
return /* @__PURE__ */
|
|
843
|
+
return /* @__PURE__ */ React16.createElement(ControlActions, null, /* @__PURE__ */ React16.createElement(import_ui11.Box, null, /* @__PURE__ */ React16.createElement(
|
|
807
844
|
TextFieldInnerSelection,
|
|
808
845
|
{
|
|
809
846
|
disabled,
|
|
@@ -811,31 +848,27 @@ var SizeInput = ({
|
|
|
811
848
|
type: inputType,
|
|
812
849
|
value: inputValue,
|
|
813
850
|
onChange: handleSizeChange,
|
|
814
|
-
onKeyDown: (event) => {
|
|
815
|
-
if (RESTRICTED_INPUT_KEYS.includes(event.key)) {
|
|
816
|
-
event.preventDefault();
|
|
817
|
-
}
|
|
818
|
-
},
|
|
819
851
|
onKeyUp: handleKeyUp,
|
|
820
852
|
onBlur,
|
|
821
|
-
|
|
853
|
+
InputProps,
|
|
854
|
+
inputProps: { min, step: "any" },
|
|
822
855
|
isPopoverOpen: popupState.isOpen
|
|
823
856
|
}
|
|
824
857
|
)));
|
|
825
858
|
};
|
|
826
859
|
|
|
827
860
|
// src/components/text-field-popover.tsx
|
|
828
|
-
var
|
|
829
|
-
var
|
|
861
|
+
var React17 = __toESM(require("react"));
|
|
862
|
+
var import_react10 = require("react");
|
|
830
863
|
var import_editor_ui3 = require("@elementor/editor-ui");
|
|
831
864
|
var import_icons3 = require("@elementor/icons");
|
|
832
|
-
var
|
|
865
|
+
var import_ui12 = require("@elementor/ui");
|
|
833
866
|
var import_i18n3 = require("@wordpress/i18n");
|
|
834
867
|
var SIZE = "tiny";
|
|
835
868
|
var TextFieldPopover = (props) => {
|
|
836
869
|
const { popupState, restoreValue, anchorRef, value, onChange } = props;
|
|
837
|
-
const inputRef = (0,
|
|
838
|
-
(0,
|
|
870
|
+
const inputRef = (0, import_react10.useRef)(null);
|
|
871
|
+
(0, import_react10.useEffect)(() => {
|
|
839
872
|
if (popupState.isOpen) {
|
|
840
873
|
requestAnimationFrame(() => {
|
|
841
874
|
if (inputRef.current) {
|
|
@@ -848,8 +881,8 @@ var TextFieldPopover = (props) => {
|
|
|
848
881
|
restoreValue();
|
|
849
882
|
popupState.close();
|
|
850
883
|
};
|
|
851
|
-
return /* @__PURE__ */
|
|
852
|
-
|
|
884
|
+
return /* @__PURE__ */ React17.createElement(
|
|
885
|
+
import_ui12.Popover,
|
|
853
886
|
{
|
|
854
887
|
disablePortal: true,
|
|
855
888
|
slotProps: {
|
|
@@ -860,21 +893,21 @@ var TextFieldPopover = (props) => {
|
|
|
860
893
|
}
|
|
861
894
|
}
|
|
862
895
|
},
|
|
863
|
-
...(0,
|
|
896
|
+
...(0, import_ui12.bindPopover)(popupState),
|
|
864
897
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
865
898
|
transformOrigin: { vertical: "top", horizontal: "center" },
|
|
866
899
|
onClose: handleClose
|
|
867
900
|
},
|
|
868
|
-
/* @__PURE__ */
|
|
901
|
+
/* @__PURE__ */ React17.createElement(
|
|
869
902
|
import_editor_ui3.PopoverHeader,
|
|
870
903
|
{
|
|
871
904
|
title: (0, import_i18n3.__)("CSS function", "elementor"),
|
|
872
905
|
onClose: handleClose,
|
|
873
|
-
icon: /* @__PURE__ */
|
|
906
|
+
icon: /* @__PURE__ */ React17.createElement(import_icons3.MathFunctionIcon, { fontSize: SIZE })
|
|
874
907
|
}
|
|
875
908
|
),
|
|
876
|
-
/* @__PURE__ */
|
|
877
|
-
|
|
909
|
+
/* @__PURE__ */ React17.createElement(
|
|
910
|
+
import_ui12.TextField,
|
|
878
911
|
{
|
|
879
912
|
value,
|
|
880
913
|
onChange,
|
|
@@ -891,9 +924,9 @@ var TextFieldPopover = (props) => {
|
|
|
891
924
|
};
|
|
892
925
|
|
|
893
926
|
// src/hooks/use-size-extended-options.ts
|
|
894
|
-
var
|
|
927
|
+
var import_react11 = require("react");
|
|
895
928
|
function useSizeExtendedOptions(options, disableCustom) {
|
|
896
|
-
return (0,
|
|
929
|
+
return (0, import_react11.useMemo)(() => {
|
|
897
930
|
const extendedOptions = [...options];
|
|
898
931
|
if (!disableCustom && !extendedOptions.includes("custom")) {
|
|
899
932
|
extendedOptions.push("custom");
|
|
@@ -905,7 +938,7 @@ function useSizeExtendedOptions(options, disableCustom) {
|
|
|
905
938
|
}
|
|
906
939
|
|
|
907
940
|
// src/hooks/use-sync-external-state.tsx
|
|
908
|
-
var
|
|
941
|
+
var import_react12 = require("react");
|
|
909
942
|
var useSyncExternalState = ({
|
|
910
943
|
external,
|
|
911
944
|
setExternal,
|
|
@@ -924,15 +957,15 @@ var useSyncExternalState = ({
|
|
|
924
957
|
}
|
|
925
958
|
return externalValue;
|
|
926
959
|
}
|
|
927
|
-
const [internal, setInternal] = (0,
|
|
928
|
-
(0,
|
|
960
|
+
const [internal, setInternal] = (0, import_react12.useState)(toInternal(external, null));
|
|
961
|
+
(0, import_react12.useEffect)(() => {
|
|
929
962
|
setInternal((prevInternal) => toInternal(external, prevInternal));
|
|
930
963
|
}, [external]);
|
|
931
|
-
const setInternalValue = (setter) => {
|
|
964
|
+
const setInternalValue = (setter, options, meta) => {
|
|
932
965
|
const setterFn = typeof setter === "function" ? setter : () => setter;
|
|
933
966
|
const updated = setterFn(internal);
|
|
934
967
|
setInternal(updated);
|
|
935
|
-
setExternal(toExternal(updated));
|
|
968
|
+
setExternal(toExternal(updated), options, meta);
|
|
936
969
|
};
|
|
937
970
|
return [internal, setInternalValue];
|
|
938
971
|
};
|
|
@@ -957,7 +990,8 @@ var SizeControl = createControl(
|
|
|
957
990
|
startIcon,
|
|
958
991
|
anchorRef,
|
|
959
992
|
extendedOptions,
|
|
960
|
-
disableCustom
|
|
993
|
+
disableCustom,
|
|
994
|
+
min = 0
|
|
961
995
|
}) => {
|
|
962
996
|
const {
|
|
963
997
|
value: sizeValue,
|
|
@@ -968,13 +1002,13 @@ var SizeControl = createControl(
|
|
|
968
1002
|
} = useBoundProp(import_editor_props7.sizePropTypeUtil);
|
|
969
1003
|
const actualDefaultUnit = defaultUnit ?? externalPlaceholder?.unit ?? defaultSelectedUnit[variant];
|
|
970
1004
|
const actualUnits = units2 ?? [...defaultUnits[variant]];
|
|
971
|
-
const [internalState, setInternalState] = (0,
|
|
1005
|
+
const [internalState, setInternalState] = (0, import_react13.useState)(createStateFromSizeProp(sizeValue, actualDefaultUnit));
|
|
972
1006
|
const activeBreakpoint = (0, import_editor_responsive.useActiveBreakpoint)();
|
|
973
1007
|
const actualExtendedOptions = useSizeExtendedOptions(extendedOptions || [], disableCustom ?? false);
|
|
974
|
-
const popupState = (0,
|
|
1008
|
+
const popupState = (0, import_ui13.usePopupState)({ variant: "popover" });
|
|
975
1009
|
const [state, setState] = useSyncExternalState({
|
|
976
1010
|
external: internalState,
|
|
977
|
-
setExternal: (newState) => setSizeValue(extractValueFromState(newState)),
|
|
1011
|
+
setExternal: (newState, options, meta) => setSizeValue(extractValueFromState(newState), options, meta),
|
|
978
1012
|
persistWhen: (newState) => {
|
|
979
1013
|
if (!newState?.unit) {
|
|
980
1014
|
return false;
|
|
@@ -998,23 +1032,28 @@ var SizeControl = createControl(
|
|
|
998
1032
|
setState((prev) => ({ ...prev, unit: newUnit }));
|
|
999
1033
|
};
|
|
1000
1034
|
const handleSizeChange = (event) => {
|
|
1001
|
-
const
|
|
1035
|
+
const size = event.target.value;
|
|
1036
|
+
const isInputValid = event.target.validity.valid;
|
|
1002
1037
|
if (controlUnit === "auto") {
|
|
1003
1038
|
setState((prev) => ({ ...prev, unit: controlUnit }));
|
|
1004
1039
|
return;
|
|
1005
1040
|
}
|
|
1006
|
-
setState(
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1041
|
+
setState(
|
|
1042
|
+
(prev) => ({
|
|
1043
|
+
...prev,
|
|
1044
|
+
[controlUnit === "custom" ? "custom" : "numeric"]: formatSize(size, controlUnit),
|
|
1045
|
+
unit: controlUnit
|
|
1046
|
+
}),
|
|
1047
|
+
void 0,
|
|
1048
|
+
{ validation: () => isInputValid }
|
|
1049
|
+
);
|
|
1011
1050
|
};
|
|
1012
1051
|
const onInputClick = (event) => {
|
|
1013
1052
|
if (event.target.closest("input") && "custom" === state.unit) {
|
|
1014
1053
|
popupState.open(anchorRef?.current);
|
|
1015
1054
|
}
|
|
1016
1055
|
};
|
|
1017
|
-
(0,
|
|
1056
|
+
(0, import_react13.useEffect)(() => {
|
|
1018
1057
|
const newState = createStateFromSizeProp(
|
|
1019
1058
|
sizeValue,
|
|
1020
1059
|
state.unit === "custom" ? state.unit : actualDefaultUnit,
|
|
@@ -1036,13 +1075,13 @@ var SizeControl = createControl(
|
|
|
1036
1075
|
}
|
|
1037
1076
|
setState(newState);
|
|
1038
1077
|
}, [sizeValue]);
|
|
1039
|
-
(0,
|
|
1078
|
+
(0, import_react13.useEffect)(() => {
|
|
1040
1079
|
const newState = createStateFromSizeProp(sizeValue, actualDefaultUnit, "", state.custom);
|
|
1041
1080
|
if (activeBreakpoint && !areStatesEqual(newState, state)) {
|
|
1042
1081
|
setState(newState);
|
|
1043
1082
|
}
|
|
1044
1083
|
}, [activeBreakpoint]);
|
|
1045
|
-
return /* @__PURE__ */
|
|
1084
|
+
return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(
|
|
1046
1085
|
SizeInput,
|
|
1047
1086
|
{
|
|
1048
1087
|
disabled,
|
|
@@ -1055,9 +1094,10 @@ var SizeControl = createControl(
|
|
|
1055
1094
|
handleUnitChange,
|
|
1056
1095
|
onBlur: restoreValue,
|
|
1057
1096
|
onClick: onInputClick,
|
|
1058
|
-
popupState
|
|
1097
|
+
popupState,
|
|
1098
|
+
min
|
|
1059
1099
|
}
|
|
1060
|
-
), anchorRef?.current && /* @__PURE__ */
|
|
1100
|
+
), anchorRef?.current && /* @__PURE__ */ React18.createElement(
|
|
1061
1101
|
TextFieldPopover,
|
|
1062
1102
|
{
|
|
1063
1103
|
popupState,
|
|
@@ -1111,21 +1151,21 @@ function areStatesEqual(state1, state2) {
|
|
|
1111
1151
|
}
|
|
1112
1152
|
|
|
1113
1153
|
// src/controls/stroke-control.tsx
|
|
1114
|
-
var
|
|
1115
|
-
var
|
|
1154
|
+
var React21 = __toESM(require("react"));
|
|
1155
|
+
var import_react14 = require("react");
|
|
1116
1156
|
var import_editor_props9 = require("@elementor/editor-props");
|
|
1117
|
-
var
|
|
1157
|
+
var import_ui16 = require("@elementor/ui");
|
|
1118
1158
|
var import_i18n4 = require("@wordpress/i18n");
|
|
1119
1159
|
|
|
1120
1160
|
// src/components/section-content.tsx
|
|
1121
|
-
var
|
|
1122
|
-
var
|
|
1123
|
-
var SectionContent = ({ gap = 0.5, sx, children }) => /* @__PURE__ */
|
|
1161
|
+
var React19 = __toESM(require("react"));
|
|
1162
|
+
var import_ui14 = require("@elementor/ui");
|
|
1163
|
+
var SectionContent = ({ gap = 0.5, sx, children }) => /* @__PURE__ */ React19.createElement(import_ui14.Stack, { gap, sx: { ...sx } }, children);
|
|
1124
1164
|
|
|
1125
1165
|
// src/controls/color-control.tsx
|
|
1126
|
-
var
|
|
1166
|
+
var React20 = __toESM(require("react"));
|
|
1127
1167
|
var import_editor_props8 = require("@elementor/editor-props");
|
|
1128
|
-
var
|
|
1168
|
+
var import_ui15 = require("@elementor/ui");
|
|
1129
1169
|
var ColorControl = createControl(
|
|
1130
1170
|
({ propTypeUtil = import_editor_props8.colorPropTypeUtil, anchorEl, slotProps = {}, ...props }) => {
|
|
1131
1171
|
const { value, setValue, placeholder: boundPropPlaceholder, disabled } = useBoundProp(propTypeUtil);
|
|
@@ -1133,8 +1173,8 @@ var ColorControl = createControl(
|
|
|
1133
1173
|
const handleChange = (selectedColor) => {
|
|
1134
1174
|
setValue(selectedColor || null);
|
|
1135
1175
|
};
|
|
1136
|
-
return /* @__PURE__ */
|
|
1137
|
-
|
|
1176
|
+
return /* @__PURE__ */ React20.createElement(ControlActions, null, /* @__PURE__ */ React20.createElement(
|
|
1177
|
+
import_ui15.UnstableColorField,
|
|
1138
1178
|
{
|
|
1139
1179
|
size: "tiny",
|
|
1140
1180
|
fullWidth: true,
|
|
@@ -1174,48 +1214,48 @@ var ColorControl = createControl(
|
|
|
1174
1214
|
var units = ["px", "em", "rem"];
|
|
1175
1215
|
var StrokeControl = createControl(() => {
|
|
1176
1216
|
const propContext = useBoundProp(import_editor_props9.strokePropTypeUtil);
|
|
1177
|
-
const rowRef = (0,
|
|
1178
|
-
return /* @__PURE__ */
|
|
1217
|
+
const rowRef = (0, import_react14.useRef)(null);
|
|
1218
|
+
return /* @__PURE__ */ React21.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React21.createElement(SectionContent, null, /* @__PURE__ */ React21.createElement(Control, { bind: "width", label: (0, import_i18n4.__)("Stroke width", "elementor"), ref: rowRef }, /* @__PURE__ */ React21.createElement(SizeControl, { units, anchorRef: rowRef })), /* @__PURE__ */ React21.createElement(Control, { bind: "color", label: (0, import_i18n4.__)("Stroke color", "elementor") }, /* @__PURE__ */ React21.createElement(ColorControl, null))));
|
|
1179
1219
|
});
|
|
1180
|
-
var Control = (0,
|
|
1220
|
+
var Control = (0, import_react14.forwardRef)(({ bind, label, children }, ref) => /* @__PURE__ */ React21.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React21.createElement(import_ui16.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref }, /* @__PURE__ */ React21.createElement(import_ui16.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React21.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React21.createElement(import_ui16.Grid, { item: true, xs: 6 }, children))));
|
|
1181
1221
|
|
|
1182
1222
|
// src/controls/box-shadow-repeater-control.tsx
|
|
1183
|
-
var
|
|
1184
|
-
var
|
|
1223
|
+
var React28 = __toESM(require("react"));
|
|
1224
|
+
var import_react18 = require("react");
|
|
1185
1225
|
var import_editor_props10 = require("@elementor/editor-props");
|
|
1186
|
-
var
|
|
1226
|
+
var import_ui21 = require("@elementor/ui");
|
|
1187
1227
|
var import_i18n6 = require("@wordpress/i18n");
|
|
1188
1228
|
|
|
1189
1229
|
// src/components/popover-content.tsx
|
|
1190
|
-
var React21 = __toESM(require("react"));
|
|
1191
|
-
var import_ui16 = require("@elementor/ui");
|
|
1192
|
-
var PopoverContent = ({ gap = 1.5, children, ...props }) => /* @__PURE__ */ React21.createElement(import_ui16.Stack, { ...props, gap }, children);
|
|
1193
|
-
|
|
1194
|
-
// src/components/popover-grid-container.tsx
|
|
1195
|
-
var import_react14 = require("react");
|
|
1196
1230
|
var React22 = __toESM(require("react"));
|
|
1197
1231
|
var import_ui17 = require("@elementor/ui");
|
|
1198
|
-
var
|
|
1199
|
-
|
|
1232
|
+
var PopoverContent = ({ gap = 1.5, children, ...props }) => /* @__PURE__ */ React22.createElement(import_ui17.Stack, { ...props, gap }, children);
|
|
1233
|
+
|
|
1234
|
+
// src/components/popover-grid-container.tsx
|
|
1235
|
+
var import_react15 = require("react");
|
|
1236
|
+
var React23 = __toESM(require("react"));
|
|
1237
|
+
var import_ui18 = require("@elementor/ui");
|
|
1238
|
+
var PopoverGridContainer = (0, import_react15.forwardRef)(
|
|
1239
|
+
({ gap = 1.5, alignItems = "center", flexWrap = "nowrap", children }, ref) => /* @__PURE__ */ React23.createElement(import_ui18.Grid, { container: true, gap, alignItems, flexWrap, ref }, children)
|
|
1200
1240
|
);
|
|
1201
1241
|
|
|
1202
1242
|
// src/components/repeater.tsx
|
|
1203
|
-
var
|
|
1204
|
-
var
|
|
1243
|
+
var React27 = __toESM(require("react"));
|
|
1244
|
+
var import_react17 = require("react");
|
|
1205
1245
|
var import_icons5 = require("@elementor/icons");
|
|
1206
|
-
var
|
|
1246
|
+
var import_ui20 = require("@elementor/ui");
|
|
1207
1247
|
var import_i18n5 = require("@wordpress/i18n");
|
|
1208
1248
|
|
|
1209
1249
|
// src/control-adornments/control-adornments.tsx
|
|
1210
|
-
var
|
|
1250
|
+
var React25 = __toESM(require("react"));
|
|
1211
1251
|
|
|
1212
1252
|
// src/control-adornments/control-adornments-context.tsx
|
|
1213
|
-
var
|
|
1214
|
-
var
|
|
1215
|
-
var Context2 = (0,
|
|
1216
|
-
var ControlAdornmentsProvider = ({ children, items: items2 }) => /* @__PURE__ */
|
|
1253
|
+
var React24 = __toESM(require("react"));
|
|
1254
|
+
var import_react16 = require("react");
|
|
1255
|
+
var Context2 = (0, import_react16.createContext)(null);
|
|
1256
|
+
var ControlAdornmentsProvider = ({ children, items: items2 }) => /* @__PURE__ */ React24.createElement(Context2.Provider, { value: { items: items2 } }, children);
|
|
1217
1257
|
var useControlAdornments = () => {
|
|
1218
|
-
const context = (0,
|
|
1258
|
+
const context = (0, import_react16.useContext)(Context2);
|
|
1219
1259
|
return context?.items ?? [];
|
|
1220
1260
|
};
|
|
1221
1261
|
|
|
@@ -1225,19 +1265,19 @@ function ControlAdornments() {
|
|
|
1225
1265
|
if (items2?.length === 0) {
|
|
1226
1266
|
return null;
|
|
1227
1267
|
}
|
|
1228
|
-
return /* @__PURE__ */
|
|
1268
|
+
return /* @__PURE__ */ React25.createElement(React25.Fragment, null, items2.map(({ Adornment, id }) => /* @__PURE__ */ React25.createElement(Adornment, { key: id })));
|
|
1229
1269
|
}
|
|
1230
1270
|
|
|
1231
1271
|
// src/components/sortable.tsx
|
|
1232
|
-
var
|
|
1272
|
+
var React26 = __toESM(require("react"));
|
|
1233
1273
|
var import_icons4 = require("@elementor/icons");
|
|
1234
|
-
var
|
|
1274
|
+
var import_ui19 = require("@elementor/ui");
|
|
1235
1275
|
var SortableProvider = (props) => {
|
|
1236
|
-
return /* @__PURE__ */
|
|
1276
|
+
return /* @__PURE__ */ React26.createElement(import_ui19.List, { sx: { p: 0, my: -0.5, mx: 0 } }, /* @__PURE__ */ React26.createElement(import_ui19.UnstableSortableProvider, { restrictAxis: true, disableDragOverlay: false, variant: "static", ...props }));
|
|
1237
1277
|
};
|
|
1238
1278
|
var SortableItem = ({ id, children, disabled }) => {
|
|
1239
|
-
return /* @__PURE__ */
|
|
1240
|
-
|
|
1279
|
+
return /* @__PURE__ */ React26.createElement(
|
|
1280
|
+
import_ui19.UnstableSortableItem,
|
|
1241
1281
|
{
|
|
1242
1282
|
id,
|
|
1243
1283
|
disabled,
|
|
@@ -1249,12 +1289,12 @@ var SortableItem = ({ id, children, disabled }) => {
|
|
|
1249
1289
|
showDropIndication,
|
|
1250
1290
|
dropIndicationStyle
|
|
1251
1291
|
}) => {
|
|
1252
|
-
return /* @__PURE__ */
|
|
1292
|
+
return /* @__PURE__ */ React26.createElement(StyledListItem, { ...itemProps, style: itemStyle }, !disabled && /* @__PURE__ */ React26.createElement(SortableTrigger, { ...triggerProps, style: triggerStyle }), children, showDropIndication && /* @__PURE__ */ React26.createElement(StyledDivider, { style: dropIndicationStyle }));
|
|
1253
1293
|
}
|
|
1254
1294
|
}
|
|
1255
1295
|
);
|
|
1256
1296
|
};
|
|
1257
|
-
var StyledListItem = (0,
|
|
1297
|
+
var StyledListItem = (0, import_ui19.styled)(import_ui19.ListItem)`
|
|
1258
1298
|
position: relative;
|
|
1259
1299
|
margin-inline: 0px;
|
|
1260
1300
|
padding-inline: 0px;
|
|
@@ -1283,8 +1323,8 @@ var StyledListItem = (0, import_ui18.styled)(import_ui18.ListItem)`
|
|
|
1283
1323
|
}
|
|
1284
1324
|
}
|
|
1285
1325
|
`;
|
|
1286
|
-
var SortableTrigger = (props) => /* @__PURE__ */
|
|
1287
|
-
var StyledDivider = (0,
|
|
1326
|
+
var SortableTrigger = (props) => /* @__PURE__ */ React26.createElement("div", { ...props, role: "button", className: "class-item-sortable-trigger" }, /* @__PURE__ */ React26.createElement(import_icons4.GripVerticalIcon, { fontSize: "tiny" }));
|
|
1327
|
+
var StyledDivider = (0, import_ui19.styled)(import_ui19.Divider)`
|
|
1288
1328
|
height: 0px;
|
|
1289
1329
|
border: none;
|
|
1290
1330
|
overflow: visible;
|
|
@@ -1324,14 +1364,14 @@ var Repeater = ({
|
|
|
1324
1364
|
isSortable = true,
|
|
1325
1365
|
collectionPropUtil
|
|
1326
1366
|
}) => {
|
|
1327
|
-
const [openItem, setOpenItem] = (0,
|
|
1367
|
+
const [openItem, setOpenItem] = (0, import_react17.useState)(EMPTY_OPEN_ITEM);
|
|
1328
1368
|
const [items2, setItems] = useSyncExternalState({
|
|
1329
1369
|
external: repeaterValues,
|
|
1330
1370
|
// @ts-expect-error - as long as persistWhen => true, value will never be null
|
|
1331
1371
|
setExternal: setRepeaterValues,
|
|
1332
1372
|
persistWhen: () => true
|
|
1333
1373
|
});
|
|
1334
|
-
const [uniqueKeys, setUniqueKeys] = (0,
|
|
1374
|
+
const [uniqueKeys, setUniqueKeys] = (0, import_react17.useState)(items2.map((_, index) => index));
|
|
1335
1375
|
const generateNextKey = (source) => {
|
|
1336
1376
|
return 1 + Math.max(0, ...source);
|
|
1337
1377
|
};
|
|
@@ -1388,8 +1428,8 @@ var Repeater = ({
|
|
|
1388
1428
|
});
|
|
1389
1429
|
});
|
|
1390
1430
|
};
|
|
1391
|
-
return /* @__PURE__ */
|
|
1392
|
-
|
|
1431
|
+
return /* @__PURE__ */ React27.createElement(SectionContent, null, /* @__PURE__ */ React27.createElement(
|
|
1432
|
+
import_ui20.Stack,
|
|
1393
1433
|
{
|
|
1394
1434
|
direction: "row",
|
|
1395
1435
|
justifyContent: "start",
|
|
@@ -1397,10 +1437,10 @@ var Repeater = ({
|
|
|
1397
1437
|
gap: 1,
|
|
1398
1438
|
sx: { marginInlineEnd: -0.75 }
|
|
1399
1439
|
},
|
|
1400
|
-
/* @__PURE__ */
|
|
1401
|
-
/* @__PURE__ */
|
|
1402
|
-
/* @__PURE__ */
|
|
1403
|
-
|
|
1440
|
+
/* @__PURE__ */ React27.createElement(import_ui20.Typography, { component: "label", variant: "caption", color: "text.secondary" }, label),
|
|
1441
|
+
/* @__PURE__ */ React27.createElement(ControlAdornments, null),
|
|
1442
|
+
/* @__PURE__ */ React27.createElement(
|
|
1443
|
+
import_ui20.IconButton,
|
|
1404
1444
|
{
|
|
1405
1445
|
size: SIZE2,
|
|
1406
1446
|
sx: { ml: "auto" },
|
|
@@ -1408,20 +1448,20 @@ var Repeater = ({
|
|
|
1408
1448
|
onClick: addRepeaterItem,
|
|
1409
1449
|
"aria-label": (0, import_i18n5.__)("Add item", "elementor")
|
|
1410
1450
|
},
|
|
1411
|
-
/* @__PURE__ */
|
|
1451
|
+
/* @__PURE__ */ React27.createElement(import_icons5.PlusIcon, { fontSize: SIZE2 })
|
|
1412
1452
|
)
|
|
1413
|
-
), 0 < uniqueKeys.length && /* @__PURE__ */
|
|
1453
|
+
), 0 < uniqueKeys.length && /* @__PURE__ */ React27.createElement(SortableProvider, { value: uniqueKeys, onChange: onChangeOrder }, uniqueKeys.map((key, index) => {
|
|
1414
1454
|
const value = items2[index];
|
|
1415
1455
|
if (!value) {
|
|
1416
1456
|
return null;
|
|
1417
1457
|
}
|
|
1418
|
-
return /* @__PURE__ */
|
|
1458
|
+
return /* @__PURE__ */ React27.createElement(SortableItem, { id: key, key: `sortable-${key}`, disabled: !isSortable }, /* @__PURE__ */ React27.createElement(
|
|
1419
1459
|
RepeaterItem,
|
|
1420
1460
|
{
|
|
1421
1461
|
disabled,
|
|
1422
1462
|
propDisabled: value?.disabled,
|
|
1423
|
-
label: /* @__PURE__ */
|
|
1424
|
-
startIcon: /* @__PURE__ */
|
|
1463
|
+
label: /* @__PURE__ */ React27.createElement(RepeaterItemLabelSlot, { value }, /* @__PURE__ */ React27.createElement(itemSettings.Label, { value })),
|
|
1464
|
+
startIcon: /* @__PURE__ */ React27.createElement(RepeaterItemIconSlot, { value }, /* @__PURE__ */ React27.createElement(itemSettings.Icon, { value })),
|
|
1425
1465
|
removeItem: () => removeRepeaterItem(index),
|
|
1426
1466
|
duplicateItem: () => duplicateRepeaterItem(index),
|
|
1427
1467
|
toggleDisableItem: () => toggleDisableRepeaterItem(index),
|
|
@@ -1431,7 +1471,7 @@ var Repeater = ({
|
|
|
1431
1471
|
showToggle,
|
|
1432
1472
|
collectionPropUtil
|
|
1433
1473
|
},
|
|
1434
|
-
(props) => /* @__PURE__ */
|
|
1474
|
+
(props) => /* @__PURE__ */ React27.createElement(itemSettings.Content, { ...props, value, bind: String(index) })
|
|
1435
1475
|
));
|
|
1436
1476
|
})));
|
|
1437
1477
|
};
|
|
@@ -1450,13 +1490,13 @@ var RepeaterItem = ({
|
|
|
1450
1490
|
disabled,
|
|
1451
1491
|
collectionPropUtil
|
|
1452
1492
|
}) => {
|
|
1453
|
-
const [anchorEl, setAnchorEl] = (0,
|
|
1493
|
+
const [anchorEl, setAnchorEl] = (0, import_react17.useState)(null);
|
|
1454
1494
|
const { popoverState, popoverProps, ref, setRef } = usePopover(openOnMount, onOpen);
|
|
1455
1495
|
const duplicateLabel = (0, import_i18n5.__)("Duplicate", "elementor");
|
|
1456
1496
|
const toggleLabel = propDisabled ? (0, import_i18n5.__)("Show", "elementor") : (0, import_i18n5.__)("Hide", "elementor");
|
|
1457
1497
|
const removeLabel = (0, import_i18n5.__)("Remove", "elementor");
|
|
1458
|
-
return /* @__PURE__ */
|
|
1459
|
-
|
|
1498
|
+
return /* @__PURE__ */ React27.createElement(React27.Fragment, null, /* @__PURE__ */ React27.createElement(
|
|
1499
|
+
import_ui20.UnstableTag,
|
|
1460
1500
|
{
|
|
1461
1501
|
disabled,
|
|
1462
1502
|
label,
|
|
@@ -1465,12 +1505,12 @@ var RepeaterItem = ({
|
|
|
1465
1505
|
ref: setRef,
|
|
1466
1506
|
variant: "outlined",
|
|
1467
1507
|
"aria-label": (0, import_i18n5.__)("Open item", "elementor"),
|
|
1468
|
-
...(0,
|
|
1508
|
+
...(0, import_ui20.bindTrigger)(popoverState),
|
|
1469
1509
|
startIcon,
|
|
1470
|
-
actions: /* @__PURE__ */
|
|
1510
|
+
actions: /* @__PURE__ */ React27.createElement(React27.Fragment, null, showDuplicate && /* @__PURE__ */ React27.createElement(import_ui20.Tooltip, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React27.createElement(import_ui20.IconButton, { size: SIZE2, onClick: duplicateItem, "aria-label": duplicateLabel }, /* @__PURE__ */ React27.createElement(import_icons5.CopyIcon, { fontSize: SIZE2 }))), showToggle && /* @__PURE__ */ React27.createElement(import_ui20.Tooltip, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React27.createElement(import_ui20.IconButton, { size: SIZE2, onClick: toggleDisableItem, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React27.createElement(import_icons5.EyeOffIcon, { fontSize: SIZE2 }) : /* @__PURE__ */ React27.createElement(import_icons5.EyeIcon, { fontSize: SIZE2 }))), /* @__PURE__ */ React27.createElement(import_ui20.Tooltip, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React27.createElement(import_ui20.IconButton, { size: SIZE2, onClick: removeItem, "aria-label": removeLabel }, /* @__PURE__ */ React27.createElement(import_icons5.XIcon, { fontSize: SIZE2 }))))
|
|
1471
1511
|
}
|
|
1472
|
-
), /* @__PURE__ */
|
|
1473
|
-
|
|
1512
|
+
), /* @__PURE__ */ React27.createElement(
|
|
1513
|
+
import_ui20.Popover,
|
|
1474
1514
|
{
|
|
1475
1515
|
disablePortal: true,
|
|
1476
1516
|
slotProps: {
|
|
@@ -1483,14 +1523,14 @@ var RepeaterItem = ({
|
|
|
1483
1523
|
...popoverProps,
|
|
1484
1524
|
anchorEl: ref
|
|
1485
1525
|
},
|
|
1486
|
-
/* @__PURE__ */
|
|
1526
|
+
/* @__PURE__ */ React27.createElement(import_ui20.Box, null, children({ anchorEl, collectionPropUtil }))
|
|
1487
1527
|
));
|
|
1488
1528
|
};
|
|
1489
1529
|
var usePopover = (openOnMount, onOpen) => {
|
|
1490
|
-
const [ref, setRef] = (0,
|
|
1491
|
-
const popoverState = (0,
|
|
1492
|
-
const popoverProps = (0,
|
|
1493
|
-
(0,
|
|
1530
|
+
const [ref, setRef] = (0, import_react17.useState)(null);
|
|
1531
|
+
const popoverState = (0, import_ui20.usePopupState)({ variant: "popover" });
|
|
1532
|
+
const popoverProps = (0, import_ui20.bindPopover)(popoverState);
|
|
1533
|
+
(0, import_react17.useEffect)(() => {
|
|
1494
1534
|
if (openOnMount && ref) {
|
|
1495
1535
|
popoverState.open(ref);
|
|
1496
1536
|
onOpen?.();
|
|
@@ -1507,7 +1547,7 @@ var usePopover = (openOnMount, onOpen) => {
|
|
|
1507
1547
|
// src/controls/box-shadow-repeater-control.tsx
|
|
1508
1548
|
var BoxShadowRepeaterControl = createControl(() => {
|
|
1509
1549
|
const { propType, value, setValue, disabled } = useBoundProp(import_editor_props10.boxShadowPropTypeUtil);
|
|
1510
|
-
return /* @__PURE__ */
|
|
1550
|
+
return /* @__PURE__ */ React28.createElement(PropProvider, { propType, value, setValue, isDisabled: () => disabled }, /* @__PURE__ */ React28.createElement(
|
|
1511
1551
|
Repeater,
|
|
1512
1552
|
{
|
|
1513
1553
|
openOnAdd: true,
|
|
@@ -1524,14 +1564,14 @@ var BoxShadowRepeaterControl = createControl(() => {
|
|
|
1524
1564
|
}
|
|
1525
1565
|
));
|
|
1526
1566
|
});
|
|
1527
|
-
var ItemIcon = ({ value }) => /* @__PURE__ */
|
|
1567
|
+
var ItemIcon = ({ value }) => /* @__PURE__ */ React28.createElement(import_ui21.UnstableColorIndicator, { size: "inherit", component: "span", value: value.value.color?.value });
|
|
1528
1568
|
var ItemContent = ({ anchorEl, bind }) => {
|
|
1529
|
-
return /* @__PURE__ */
|
|
1569
|
+
return /* @__PURE__ */ React28.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React28.createElement(Content, { anchorEl }));
|
|
1530
1570
|
};
|
|
1531
1571
|
var Content = ({ anchorEl }) => {
|
|
1532
1572
|
const context = useBoundProp(import_editor_props10.shadowPropTypeUtil);
|
|
1533
|
-
const rowRef = [(0,
|
|
1534
|
-
return /* @__PURE__ */
|
|
1573
|
+
const rowRef = [(0, import_react18.useRef)(null), (0, import_react18.useRef)(null)];
|
|
1574
|
+
return /* @__PURE__ */ React28.createElement(PropProvider, { ...context }, /* @__PURE__ */ React28.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React28.createElement(PopoverGridContainer, null, /* @__PURE__ */ React28.createElement(Control2, { bind: "color", label: (0, import_i18n6.__)("Color", "elementor") }, /* @__PURE__ */ React28.createElement(ColorControl, { anchorEl })), /* @__PURE__ */ React28.createElement(Control2, { bind: "position", label: (0, import_i18n6.__)("Position", "elementor"), sx: { overflow: "hidden" } }, /* @__PURE__ */ React28.createElement(
|
|
1535
1575
|
SelectControl,
|
|
1536
1576
|
{
|
|
1537
1577
|
options: [
|
|
@@ -1539,14 +1579,14 @@ var Content = ({ anchorEl }) => {
|
|
|
1539
1579
|
{ label: (0, import_i18n6.__)("Outset", "elementor"), value: null }
|
|
1540
1580
|
]
|
|
1541
1581
|
}
|
|
1542
|
-
))), /* @__PURE__ */
|
|
1582
|
+
))), /* @__PURE__ */ React28.createElement(PopoverGridContainer, { ref: rowRef[0] }, /* @__PURE__ */ React28.createElement(Control2, { bind: "hOffset", label: (0, import_i18n6.__)("Horizontal", "elementor") }, /* @__PURE__ */ React28.createElement(SizeControl, { anchorRef: rowRef[0] })), /* @__PURE__ */ React28.createElement(Control2, { bind: "vOffset", label: (0, import_i18n6.__)("Vertical", "elementor") }, /* @__PURE__ */ React28.createElement(SizeControl, { anchorRef: rowRef[0] }))), /* @__PURE__ */ React28.createElement(PopoverGridContainer, { ref: rowRef[1] }, /* @__PURE__ */ React28.createElement(Control2, { bind: "blur", label: (0, import_i18n6.__)("Blur", "elementor") }, /* @__PURE__ */ React28.createElement(SizeControl, { anchorRef: rowRef[1] })), /* @__PURE__ */ React28.createElement(Control2, { bind: "spread", label: (0, import_i18n6.__)("Spread", "elementor") }, /* @__PURE__ */ React28.createElement(SizeControl, { anchorRef: rowRef[1] })))));
|
|
1543
1583
|
};
|
|
1544
1584
|
var Control2 = ({
|
|
1545
1585
|
label,
|
|
1546
1586
|
bind,
|
|
1547
1587
|
children,
|
|
1548
1588
|
sx
|
|
1549
|
-
}) => /* @__PURE__ */
|
|
1589
|
+
}) => /* @__PURE__ */ React28.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React28.createElement(import_ui21.Grid, { item: true, xs: 6, sx }, /* @__PURE__ */ React28.createElement(import_ui21.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React28.createElement(import_ui21.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React28.createElement(import_ui21.FormLabel, { size: "tiny" }, label)), /* @__PURE__ */ React28.createElement(import_ui21.Grid, { item: true, xs: 12 }, children))));
|
|
1550
1590
|
var ItemLabel = ({ value }) => {
|
|
1551
1591
|
const { position, hOffset, vOffset, blur, spread } = value.value;
|
|
1552
1592
|
const { size: blurSize = "", unit: blurUnit = "" } = blur?.value || {};
|
|
@@ -1560,7 +1600,7 @@ var ItemLabel = ({ value }) => {
|
|
|
1560
1600
|
blurSize + blurUnit,
|
|
1561
1601
|
spreadSize + spreadUnit
|
|
1562
1602
|
].join(" ");
|
|
1563
|
-
return /* @__PURE__ */
|
|
1603
|
+
return /* @__PURE__ */ React28.createElement("span", { style: { textTransform: "capitalize" } }, positionLabel, ": ", sizes);
|
|
1564
1604
|
};
|
|
1565
1605
|
var initialShadow = {
|
|
1566
1606
|
$$type: "shadow",
|
|
@@ -1590,18 +1630,18 @@ var initialShadow = {
|
|
|
1590
1630
|
};
|
|
1591
1631
|
|
|
1592
1632
|
// src/controls/filter-repeater-control.tsx
|
|
1593
|
-
var
|
|
1594
|
-
var
|
|
1633
|
+
var React31 = __toESM(require("react"));
|
|
1634
|
+
var import_react20 = require("react");
|
|
1595
1635
|
var import_editor_props12 = require("@elementor/editor-props");
|
|
1596
1636
|
var import_editor_props13 = require("@elementor/editor-props");
|
|
1597
|
-
var
|
|
1637
|
+
var import_ui24 = require("@elementor/ui");
|
|
1598
1638
|
var import_i18n8 = require("@wordpress/i18n");
|
|
1599
1639
|
|
|
1600
1640
|
// src/controls/filter-control/drop-shadow-item-content.tsx
|
|
1601
|
-
var
|
|
1602
|
-
var
|
|
1641
|
+
var React29 = __toESM(require("react"));
|
|
1642
|
+
var import_react19 = require("react");
|
|
1603
1643
|
var import_editor_props11 = require("@elementor/editor-props");
|
|
1604
|
-
var
|
|
1644
|
+
var import_ui22 = require("@elementor/ui");
|
|
1605
1645
|
var import_i18n7 = require("@wordpress/i18n");
|
|
1606
1646
|
var items = [
|
|
1607
1647
|
{
|
|
@@ -1630,19 +1670,19 @@ var DropShadowItemContent = ({
|
|
|
1630
1670
|
anchorEl
|
|
1631
1671
|
}) => {
|
|
1632
1672
|
const context = useBoundProp(import_editor_props11.dropShadowFilterPropTypeUtil);
|
|
1633
|
-
const rowRefs = [(0,
|
|
1634
|
-
return /* @__PURE__ */
|
|
1673
|
+
const rowRefs = [(0, import_react19.useRef)(null), (0, import_react19.useRef)(null)];
|
|
1674
|
+
return /* @__PURE__ */ React29.createElement(PropProvider, { ...context }, items.map((item) => /* @__PURE__ */ React29.createElement(PopoverGridContainer, { key: item.bind, ref: rowRefs[item.rowIndex] ?? null }, /* @__PURE__ */ React29.createElement(PropKeyProvider, { bind: item.bind }, /* @__PURE__ */ React29.createElement(import_ui22.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React29.createElement(ControlFormLabel, null, item.label)), /* @__PURE__ */ React29.createElement(import_ui22.Grid, { item: true, xs: 6 }, item.bind === "color" ? /* @__PURE__ */ React29.createElement(ColorControl, { anchorEl }) : /* @__PURE__ */ React29.createElement(SizeControl, { anchorRef: rowRefs[item.rowIndex], units: units2, defaultUnit: "px" }))))));
|
|
1635
1675
|
};
|
|
1636
1676
|
|
|
1637
1677
|
// src/controls/filter-control/drop-shadow-item-label.tsx
|
|
1638
|
-
var
|
|
1639
|
-
var
|
|
1678
|
+
var React30 = __toESM(require("react"));
|
|
1679
|
+
var import_ui23 = require("@elementor/ui");
|
|
1640
1680
|
var DropShadowItemLabel = ({ value }) => {
|
|
1641
1681
|
const { xAxis, yAxis, blur } = value.value.args.value;
|
|
1642
1682
|
const xValue = `${xAxis?.value?.size ?? 0}${xAxis?.value?.unit ?? "px"}`;
|
|
1643
1683
|
const yValue = `${yAxis?.value?.size ?? 0}${yAxis?.value?.unit ?? "px"}`;
|
|
1644
1684
|
const blurValue = `${blur?.value?.size ?? 10}${blur?.value?.unit ?? "px"}`;
|
|
1645
|
-
return /* @__PURE__ */
|
|
1685
|
+
return /* @__PURE__ */ React30.createElement(import_ui23.Box, { component: "span" }, /* @__PURE__ */ React30.createElement(import_ui23.Box, { component: "span", style: { textTransform: "capitalize" } }, "Drop shadow:"), `${xValue} ${yValue} ${blurValue}`);
|
|
1646
1686
|
};
|
|
1647
1687
|
|
|
1648
1688
|
// src/controls/filter-repeater-control.tsx
|
|
@@ -1772,7 +1812,7 @@ var isSingleSize = (key) => {
|
|
|
1772
1812
|
var FilterRepeaterControl = createControl(({ filterPropName = "filter" }) => {
|
|
1773
1813
|
const [propUtil, label] = filterPropName === "backdrop-filter" ? [import_editor_props13.backdropFilterPropTypeUtil, (0, import_i18n8.__)("Backdrop Filters", "elementor")] : [import_editor_props12.filterPropTypeUtil, (0, import_i18n8.__)("Filters", "elementor")];
|
|
1774
1814
|
const { propType, value: filterValues, setValue, disabled } = useBoundProp(propUtil);
|
|
1775
|
-
return /* @__PURE__ */
|
|
1815
|
+
return /* @__PURE__ */ React31.createElement(PropProvider, { propType, value: filterValues, setValue }, /* @__PURE__ */ React31.createElement(
|
|
1776
1816
|
Repeater,
|
|
1777
1817
|
{
|
|
1778
1818
|
openOnAdd: true,
|
|
@@ -1790,21 +1830,21 @@ var FilterRepeaterControl = createControl(({ filterPropName = "filter" }) => {
|
|
|
1790
1830
|
}
|
|
1791
1831
|
));
|
|
1792
1832
|
});
|
|
1793
|
-
var StyledUnstableColorIndicator = (0,
|
|
1833
|
+
var StyledUnstableColorIndicator = (0, import_ui24.styled)(import_ui24.UnstableColorIndicator)(({ theme }) => ({
|
|
1794
1834
|
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
1795
1835
|
}));
|
|
1796
1836
|
var ItemIcon2 = ({ value }) => {
|
|
1797
|
-
return isSingleSize(value.value.func.value ?? "") ? /* @__PURE__ */
|
|
1837
|
+
return isSingleSize(value.value.func.value ?? "") ? /* @__PURE__ */ React31.createElement(React31.Fragment, null) : /* @__PURE__ */ React31.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: value.value.args.value.color.value });
|
|
1798
1838
|
};
|
|
1799
1839
|
var ItemLabel2 = ({ value }) => {
|
|
1800
|
-
return isSingleSize(value.value.func.value ?? "") ? /* @__PURE__ */
|
|
1840
|
+
return isSingleSize(value.value.func.value ?? "") ? /* @__PURE__ */ React31.createElement(SingleSizeItemLabel, { value }) : /* @__PURE__ */ React31.createElement(DropShadowItemLabel, { value });
|
|
1801
1841
|
};
|
|
1802
1842
|
var SingleSizeItemLabel = ({ value }) => {
|
|
1803
1843
|
const { func, args } = value.value;
|
|
1804
1844
|
const defaultUnit = filterConfig[func.value ?? ""].defaultValue.value.args.value.unit ?? lengthUnits[0];
|
|
1805
1845
|
const { unit, size } = args.value ?? { unit: defaultUnit, size: 0 };
|
|
1806
|
-
const label = /* @__PURE__ */
|
|
1807
|
-
return /* @__PURE__ */
|
|
1846
|
+
const label = /* @__PURE__ */ React31.createElement(import_ui24.Box, { component: "span", style: { textTransform: "capitalize" } }, func.value ?? "", ":");
|
|
1847
|
+
return /* @__PURE__ */ React31.createElement(import_ui24.Box, { component: "span" }, label, unit !== "custom" ? ` ${size ?? 0}${unit ?? defaultUnit}` : size);
|
|
1808
1848
|
};
|
|
1809
1849
|
var ItemContent2 = ({
|
|
1810
1850
|
bind,
|
|
@@ -1814,7 +1854,7 @@ var ItemContent2 = ({
|
|
|
1814
1854
|
const { value: filterValues = [] } = useBoundProp(collectionPropUtil ?? import_editor_props12.filterPropTypeUtil);
|
|
1815
1855
|
const itemIndex = parseInt(bind, 10);
|
|
1816
1856
|
const item = filterValues?.[itemIndex];
|
|
1817
|
-
return item ? /* @__PURE__ */
|
|
1857
|
+
return item ? /* @__PURE__ */ React31.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React31.createElement(PropContent, { item, anchorEl })) : null;
|
|
1818
1858
|
};
|
|
1819
1859
|
var PropContent = ({ item, anchorEl }) => {
|
|
1820
1860
|
const propContext = useBoundProp(import_editor_props12.cssFilterFunctionPropUtil);
|
|
@@ -1829,7 +1869,7 @@ var PropContent = ({ item, anchorEl }) => {
|
|
|
1829
1869
|
}
|
|
1830
1870
|
propContext.setValue(newValue);
|
|
1831
1871
|
};
|
|
1832
|
-
return /* @__PURE__ */
|
|
1872
|
+
return /* @__PURE__ */ React31.createElement(PropProvider, { ...propContext, setValue: handleValueChange }, /* @__PURE__ */ React31.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React31.createElement(PopoverGridContainer, null, /* @__PURE__ */ React31.createElement(import_ui24.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(ControlFormLabel, null, (0, import_i18n8.__)("Filter", "elementor"))), /* @__PURE__ */ React31.createElement(import_ui24.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(PropKeyProvider, { bind: "func" }, /* @__PURE__ */ React31.createElement(
|
|
1833
1873
|
SelectControl,
|
|
1834
1874
|
{
|
|
1835
1875
|
options: filterKeys.map((filterKey) => ({
|
|
@@ -1837,44 +1877,44 @@ var PropContent = ({ item, anchorEl }) => {
|
|
|
1837
1877
|
value: filterKey
|
|
1838
1878
|
}))
|
|
1839
1879
|
}
|
|
1840
|
-
)))), /* @__PURE__ */
|
|
1880
|
+
)))), /* @__PURE__ */ React31.createElement(PropKeyProvider, { bind: "args" }, /* @__PURE__ */ React31.createElement(Content2, { filterType: item?.value.func, anchorEl }))));
|
|
1841
1881
|
};
|
|
1842
1882
|
var Content2 = ({ filterType, anchorEl }) => {
|
|
1843
1883
|
const filterName = filterType?.value || DEFAULT_FILTER;
|
|
1844
1884
|
const filterItemConfig = filterConfig[filterName];
|
|
1845
1885
|
const { units: units2 = [] } = filterItemConfig;
|
|
1846
|
-
return isSingleSize(filterName) ? /* @__PURE__ */
|
|
1886
|
+
return isSingleSize(filterName) ? /* @__PURE__ */ React31.createElement(SingleSizeItemContent, { filterType: filterName }) : /* @__PURE__ */ React31.createElement(DropShadowItemContent, { units: units2, anchorEl });
|
|
1847
1887
|
};
|
|
1848
1888
|
var SingleSizeItemContent = ({ filterType }) => {
|
|
1849
1889
|
const { valueName, defaultValue, units: units2 } = filterConfig[filterType];
|
|
1850
|
-
const rowRef = (0,
|
|
1890
|
+
const rowRef = (0, import_react20.useRef)(null);
|
|
1851
1891
|
const defaultUnit = defaultValue.value.args.value.unit;
|
|
1852
|
-
return /* @__PURE__ */
|
|
1892
|
+
return /* @__PURE__ */ React31.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React31.createElement(import_ui24.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(ControlFormLabel, null, valueName)), /* @__PURE__ */ React31.createElement(import_ui24.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(SizeControl, { anchorRef: rowRef, units: units2, defaultUnit })));
|
|
1853
1893
|
};
|
|
1854
1894
|
|
|
1855
1895
|
// src/controls/toggle-control.tsx
|
|
1856
|
-
var
|
|
1896
|
+
var React34 = __toESM(require("react"));
|
|
1857
1897
|
var import_editor_props14 = require("@elementor/editor-props");
|
|
1858
1898
|
|
|
1859
1899
|
// src/components/control-toggle-button-group.tsx
|
|
1860
|
-
var
|
|
1861
|
-
var
|
|
1900
|
+
var React33 = __toESM(require("react"));
|
|
1901
|
+
var import_react21 = require("react");
|
|
1862
1902
|
var import_icons6 = require("@elementor/icons");
|
|
1863
|
-
var
|
|
1903
|
+
var import_ui26 = require("@elementor/ui");
|
|
1864
1904
|
|
|
1865
1905
|
// src/components/conditional-tooltip.tsx
|
|
1866
|
-
var
|
|
1867
|
-
var
|
|
1906
|
+
var React32 = __toESM(require("react"));
|
|
1907
|
+
var import_ui25 = require("@elementor/ui");
|
|
1868
1908
|
var ConditionalTooltip = ({
|
|
1869
1909
|
showTooltip,
|
|
1870
1910
|
children,
|
|
1871
1911
|
label
|
|
1872
1912
|
}) => {
|
|
1873
|
-
return showTooltip && label ? /* @__PURE__ */
|
|
1913
|
+
return showTooltip && label ? /* @__PURE__ */ React32.createElement(import_ui25.Tooltip, { title: label, disableFocusListener: true, placement: "top" }, children) : children;
|
|
1874
1914
|
};
|
|
1875
1915
|
|
|
1876
1916
|
// src/components/control-toggle-button-group.tsx
|
|
1877
|
-
var StyledToggleButtonGroup = (0,
|
|
1917
|
+
var StyledToggleButtonGroup = (0, import_ui26.styled)(import_ui26.ToggleButtonGroup)`
|
|
1878
1918
|
${({ justify }) => `justify-content: ${justify};`}
|
|
1879
1919
|
button:not( :last-of-type ) {
|
|
1880
1920
|
border-start-end-radius: 0;
|
|
@@ -1889,7 +1929,7 @@ var StyledToggleButtonGroup = (0, import_ui25.styled)(import_ui25.ToggleButtonGr
|
|
|
1889
1929
|
border-end-end-radius: 8px;
|
|
1890
1930
|
}
|
|
1891
1931
|
`;
|
|
1892
|
-
var StyledToggleButton = (0,
|
|
1932
|
+
var StyledToggleButton = (0, import_ui26.styled)(import_ui26.ToggleButton, {
|
|
1893
1933
|
shouldForwardProp: (prop) => prop !== "isPlaceholder"
|
|
1894
1934
|
})`
|
|
1895
1935
|
${({ theme, isPlaceholder }) => isPlaceholder && `
|
|
@@ -1916,12 +1956,12 @@ var ControlToggleButtonGroup = ({
|
|
|
1916
1956
|
const shouldSliceItems = exclusive && maxItems !== void 0 && items2.length > maxItems;
|
|
1917
1957
|
const menuItems = shouldSliceItems ? items2.slice(maxItems - 1) : [];
|
|
1918
1958
|
const fixedItems = shouldSliceItems ? items2.slice(0, maxItems - 1) : items2;
|
|
1919
|
-
const theme = (0,
|
|
1959
|
+
const theme = (0, import_ui26.useTheme)();
|
|
1920
1960
|
const isRtl = "rtl" === theme.direction;
|
|
1921
1961
|
const handleChange = (_, newValue) => {
|
|
1922
1962
|
onChange(newValue);
|
|
1923
1963
|
};
|
|
1924
|
-
const getGridTemplateColumns = (0,
|
|
1964
|
+
const getGridTemplateColumns = (0, import_react21.useMemo)(() => {
|
|
1925
1965
|
const isOffLimits = menuItems?.length;
|
|
1926
1966
|
const itemsCount = isOffLimits ? fixedItems.length + 1 : fixedItems.length;
|
|
1927
1967
|
const templateColumnsSuffix = isOffLimits ? "auto" : "";
|
|
@@ -1945,7 +1985,7 @@ var ControlToggleButtonGroup = ({
|
|
|
1945
1985
|
return [];
|
|
1946
1986
|
};
|
|
1947
1987
|
const placeholderArray = getPlaceholderArray(placeholder);
|
|
1948
|
-
return /* @__PURE__ */
|
|
1988
|
+
return /* @__PURE__ */ React33.createElement(ControlActions, null, /* @__PURE__ */ React33.createElement(
|
|
1949
1989
|
StyledToggleButtonGroup,
|
|
1950
1990
|
{
|
|
1951
1991
|
justify,
|
|
@@ -1962,14 +2002,14 @@ var ControlToggleButtonGroup = ({
|
|
|
1962
2002
|
},
|
|
1963
2003
|
fixedItems.map(({ label, value: buttonValue, renderContent: Content4, showTooltip }) => {
|
|
1964
2004
|
const isPlaceholder = placeholderArray.length > 0 && placeholderArray.includes(buttonValue) && (shouldShowExclusivePlaceholder || shouldShowNonExclusivePlaceholder);
|
|
1965
|
-
return /* @__PURE__ */
|
|
2005
|
+
return /* @__PURE__ */ React33.createElement(
|
|
1966
2006
|
ConditionalTooltip,
|
|
1967
2007
|
{
|
|
1968
2008
|
key: buttonValue,
|
|
1969
2009
|
label,
|
|
1970
2010
|
showTooltip: showTooltip || false
|
|
1971
2011
|
},
|
|
1972
|
-
/* @__PURE__ */
|
|
2012
|
+
/* @__PURE__ */ React33.createElement(
|
|
1973
2013
|
StyledToggleButton,
|
|
1974
2014
|
{
|
|
1975
2015
|
value: buttonValue,
|
|
@@ -1978,11 +2018,11 @@ var ControlToggleButtonGroup = ({
|
|
|
1978
2018
|
fullWidth,
|
|
1979
2019
|
isPlaceholder
|
|
1980
2020
|
},
|
|
1981
|
-
/* @__PURE__ */
|
|
2021
|
+
/* @__PURE__ */ React33.createElement(Content4, { size })
|
|
1982
2022
|
)
|
|
1983
2023
|
);
|
|
1984
2024
|
}),
|
|
1985
|
-
menuItems.length && exclusive && /* @__PURE__ */
|
|
2025
|
+
menuItems.length && exclusive && /* @__PURE__ */ React33.createElement(
|
|
1986
2026
|
SplitButtonGroup,
|
|
1987
2027
|
{
|
|
1988
2028
|
size,
|
|
@@ -2002,8 +2042,8 @@ var SplitButtonGroup = ({
|
|
|
2002
2042
|
value
|
|
2003
2043
|
}) => {
|
|
2004
2044
|
const previewButton = usePreviewButton(items2, value);
|
|
2005
|
-
const [isMenuOpen, setIsMenuOpen] = (0,
|
|
2006
|
-
const menuButtonRef = (0,
|
|
2045
|
+
const [isMenuOpen, setIsMenuOpen] = (0, import_react21.useState)(false);
|
|
2046
|
+
const menuButtonRef = (0, import_react21.useRef)(null);
|
|
2007
2047
|
const onMenuToggle = (ev) => {
|
|
2008
2048
|
setIsMenuOpen((prev) => !prev);
|
|
2009
2049
|
ev.preventDefault();
|
|
@@ -2016,8 +2056,8 @@ var SplitButtonGroup = ({
|
|
|
2016
2056
|
const shouldRemove = newValue === value;
|
|
2017
2057
|
onChange(shouldRemove ? null : newValue);
|
|
2018
2058
|
};
|
|
2019
|
-
return /* @__PURE__ */
|
|
2020
|
-
|
|
2059
|
+
return /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement(
|
|
2060
|
+
import_ui26.ToggleButton,
|
|
2021
2061
|
{
|
|
2022
2062
|
value: previewButton.value,
|
|
2023
2063
|
"aria-label": previewButton.label,
|
|
@@ -2030,8 +2070,8 @@ var SplitButtonGroup = ({
|
|
|
2030
2070
|
ref: menuButtonRef
|
|
2031
2071
|
},
|
|
2032
2072
|
previewButton.renderContent({ size })
|
|
2033
|
-
), /* @__PURE__ */
|
|
2034
|
-
|
|
2073
|
+
), /* @__PURE__ */ React33.createElement(
|
|
2074
|
+
import_ui26.ToggleButton,
|
|
2035
2075
|
{
|
|
2036
2076
|
size,
|
|
2037
2077
|
"aria-expanded": isMenuOpen ? "true" : void 0,
|
|
@@ -2041,9 +2081,9 @@ var SplitButtonGroup = ({
|
|
|
2041
2081
|
ref: menuButtonRef,
|
|
2042
2082
|
value: "__chevron-icon-button__"
|
|
2043
2083
|
},
|
|
2044
|
-
/* @__PURE__ */
|
|
2045
|
-
), /* @__PURE__ */
|
|
2046
|
-
|
|
2084
|
+
/* @__PURE__ */ React33.createElement(import_icons6.ChevronDownIcon, { fontSize: size })
|
|
2085
|
+
), /* @__PURE__ */ React33.createElement(
|
|
2086
|
+
import_ui26.Menu,
|
|
2047
2087
|
{
|
|
2048
2088
|
open: isMenuOpen,
|
|
2049
2089
|
onClose: () => setIsMenuOpen(false),
|
|
@@ -2060,22 +2100,22 @@ var SplitButtonGroup = ({
|
|
|
2060
2100
|
mt: 0.5
|
|
2061
2101
|
}
|
|
2062
2102
|
},
|
|
2063
|
-
items2.map(({ label, value: buttonValue }) => /* @__PURE__ */
|
|
2064
|
-
|
|
2103
|
+
items2.map(({ label, value: buttonValue }) => /* @__PURE__ */ React33.createElement(
|
|
2104
|
+
import_ui26.MenuItem,
|
|
2065
2105
|
{
|
|
2066
2106
|
key: buttonValue,
|
|
2067
2107
|
selected: buttonValue === value,
|
|
2068
2108
|
onClick: () => onMenuItemClick(buttonValue)
|
|
2069
2109
|
},
|
|
2070
|
-
/* @__PURE__ */
|
|
2110
|
+
/* @__PURE__ */ React33.createElement(import_ui26.ListItemText, null, /* @__PURE__ */ React33.createElement(import_ui26.Typography, { sx: { fontSize: "14px" } }, label))
|
|
2071
2111
|
))
|
|
2072
2112
|
));
|
|
2073
2113
|
};
|
|
2074
2114
|
var usePreviewButton = (items2, value) => {
|
|
2075
|
-
const [previewButton, setPreviewButton] = (0,
|
|
2115
|
+
const [previewButton, setPreviewButton] = (0, import_react21.useState)(
|
|
2076
2116
|
items2.find((item) => item.value === value) ?? items2[0]
|
|
2077
2117
|
);
|
|
2078
|
-
(0,
|
|
2118
|
+
(0, import_react21.useEffect)(() => {
|
|
2079
2119
|
const selectedButton = items2.find((item) => item.value === value);
|
|
2080
2120
|
if (selectedButton) {
|
|
2081
2121
|
setPreviewButton(selectedButton);
|
|
@@ -2108,7 +2148,7 @@ var ToggleControl = createControl(
|
|
|
2108
2148
|
size,
|
|
2109
2149
|
placeholder
|
|
2110
2150
|
};
|
|
2111
|
-
return exclusive ? /* @__PURE__ */
|
|
2151
|
+
return exclusive ? /* @__PURE__ */ React34.createElement(
|
|
2112
2152
|
ControlToggleButtonGroup,
|
|
2113
2153
|
{
|
|
2114
2154
|
...toggleButtonGroupProps,
|
|
@@ -2117,7 +2157,7 @@ var ToggleControl = createControl(
|
|
|
2117
2157
|
disabled,
|
|
2118
2158
|
exclusive: true
|
|
2119
2159
|
}
|
|
2120
|
-
) : /* @__PURE__ */
|
|
2160
|
+
) : /* @__PURE__ */ React34.createElement(
|
|
2121
2161
|
ControlToggleButtonGroup,
|
|
2122
2162
|
{
|
|
2123
2163
|
...toggleButtonGroupProps,
|
|
@@ -2131,48 +2171,48 @@ var ToggleControl = createControl(
|
|
|
2131
2171
|
);
|
|
2132
2172
|
|
|
2133
2173
|
// src/controls/number-control.tsx
|
|
2134
|
-
var
|
|
2174
|
+
var React35 = __toESM(require("react"));
|
|
2135
2175
|
var import_editor_props15 = require("@elementor/editor-props");
|
|
2136
|
-
var
|
|
2176
|
+
var import_ui27 = require("@elementor/ui");
|
|
2137
2177
|
var isEmptyOrNaN = (value) => value === null || value === void 0 || value === "" || Number.isNaN(Number(value));
|
|
2138
|
-
var RESTRICTED_INPUT_KEYS2 = ["e", "E", "+", "-"];
|
|
2139
2178
|
var NumberControl = createControl(
|
|
2140
2179
|
({
|
|
2141
2180
|
placeholder: labelPlaceholder,
|
|
2142
|
-
max = Number.
|
|
2143
|
-
min = -Number.
|
|
2181
|
+
max = Number.MAX_SAFE_INTEGER,
|
|
2182
|
+
min = -Number.MAX_SAFE_INTEGER,
|
|
2144
2183
|
step = 1,
|
|
2145
2184
|
shouldForceInt = false,
|
|
2146
2185
|
startIcon
|
|
2147
2186
|
}) => {
|
|
2148
|
-
const { value, setValue, placeholder, disabled } = useBoundProp(import_editor_props15.numberPropTypeUtil);
|
|
2187
|
+
const { value, setValue, placeholder, disabled, restoreValue } = useBoundProp(import_editor_props15.numberPropTypeUtil);
|
|
2149
2188
|
const handleChange = (event) => {
|
|
2150
|
-
const
|
|
2189
|
+
const {
|
|
2190
|
+
value: eventValue,
|
|
2191
|
+
validity: { valid: isInputValid }
|
|
2192
|
+
} = event.target;
|
|
2193
|
+
let updatedValue;
|
|
2151
2194
|
if (isEmptyOrNaN(eventValue)) {
|
|
2152
|
-
|
|
2153
|
-
|
|
2195
|
+
updatedValue = null;
|
|
2196
|
+
} else {
|
|
2197
|
+
const formattedValue = shouldForceInt ? +parseInt(eventValue) : Number(eventValue);
|
|
2198
|
+
updatedValue = Math.min(Math.max(formattedValue, min), max);
|
|
2154
2199
|
}
|
|
2155
|
-
|
|
2156
|
-
setValue(Math.min(Math.max(formattedValue, min), max));
|
|
2200
|
+
setValue(updatedValue, void 0, { validation: () => isInputValid });
|
|
2157
2201
|
};
|
|
2158
|
-
return /* @__PURE__ */
|
|
2159
|
-
|
|
2202
|
+
return /* @__PURE__ */ React35.createElement(ControlActions, null, /* @__PURE__ */ React35.createElement(
|
|
2203
|
+
NumberInput,
|
|
2160
2204
|
{
|
|
2161
2205
|
size: "tiny",
|
|
2162
2206
|
type: "number",
|
|
2163
2207
|
fullWidth: true,
|
|
2164
2208
|
disabled,
|
|
2165
2209
|
value: isEmptyOrNaN(value) ? "" : value,
|
|
2166
|
-
|
|
2210
|
+
onInput: handleChange,
|
|
2211
|
+
onBlur: restoreValue,
|
|
2167
2212
|
placeholder: labelPlaceholder ?? (isEmptyOrNaN(placeholder) ? "" : String(placeholder)),
|
|
2168
|
-
inputProps: { step },
|
|
2213
|
+
inputProps: { step, min },
|
|
2169
2214
|
InputProps: {
|
|
2170
|
-
startAdornment: startIcon ? /* @__PURE__ */
|
|
2171
|
-
},
|
|
2172
|
-
onKeyDown: (event) => {
|
|
2173
|
-
if (RESTRICTED_INPUT_KEYS2.includes(event.key)) {
|
|
2174
|
-
event.preventDefault();
|
|
2175
|
-
}
|
|
2215
|
+
startAdornment: startIcon ? /* @__PURE__ */ React35.createElement(import_ui27.InputAdornment, { position: "start", disabled }, startIcon) : void 0
|
|
2176
2216
|
}
|
|
2177
2217
|
}
|
|
2178
2218
|
));
|
|
@@ -2180,17 +2220,17 @@ var NumberControl = createControl(
|
|
|
2180
2220
|
);
|
|
2181
2221
|
|
|
2182
2222
|
// src/controls/equal-unequal-sizes-control.tsx
|
|
2183
|
-
var
|
|
2184
|
-
var
|
|
2223
|
+
var React37 = __toESM(require("react"));
|
|
2224
|
+
var import_react22 = require("react");
|
|
2185
2225
|
var import_editor_props16 = require("@elementor/editor-props");
|
|
2186
|
-
var
|
|
2226
|
+
var import_ui29 = require("@elementor/ui");
|
|
2187
2227
|
var import_i18n9 = require("@wordpress/i18n");
|
|
2188
2228
|
|
|
2189
2229
|
// src/components/control-label.tsx
|
|
2190
|
-
var
|
|
2191
|
-
var
|
|
2230
|
+
var React36 = __toESM(require("react"));
|
|
2231
|
+
var import_ui28 = require("@elementor/ui");
|
|
2192
2232
|
var ControlLabel = ({ children }) => {
|
|
2193
|
-
return /* @__PURE__ */
|
|
2233
|
+
return /* @__PURE__ */ React36.createElement(import_ui28.Stack, { direction: "row", alignItems: "center", justifyItems: "start", gap: 0.25 }, /* @__PURE__ */ React36.createElement(ControlFormLabel, null, children), /* @__PURE__ */ React36.createElement(ControlAdornments, null));
|
|
2194
2234
|
};
|
|
2195
2235
|
|
|
2196
2236
|
// src/controls/equal-unequal-sizes-control.tsx
|
|
@@ -2211,8 +2251,8 @@ function EqualUnequalSizesControl({
|
|
|
2211
2251
|
items: items2,
|
|
2212
2252
|
multiSizePropTypeUtil
|
|
2213
2253
|
}) {
|
|
2214
|
-
const popupId = (0,
|
|
2215
|
-
const popupState = (0,
|
|
2254
|
+
const popupId = (0, import_react22.useId)();
|
|
2255
|
+
const popupState = (0, import_ui29.usePopupState)({ variant: "popover", popupId });
|
|
2216
2256
|
const {
|
|
2217
2257
|
propType: multiSizePropType,
|
|
2218
2258
|
value: multiSizeValue,
|
|
@@ -2220,7 +2260,7 @@ function EqualUnequalSizesControl({
|
|
|
2220
2260
|
disabled: multiSizeDisabled
|
|
2221
2261
|
} = useBoundProp(multiSizePropTypeUtil);
|
|
2222
2262
|
const { value: sizeValue, setValue: setSizeValue } = useBoundProp(import_editor_props16.sizePropTypeUtil);
|
|
2223
|
-
const rowRefs = [(0,
|
|
2263
|
+
const rowRefs = [(0, import_react22.useRef)(null), (0, import_react22.useRef)(null)];
|
|
2224
2264
|
const splitEqualValue = () => {
|
|
2225
2265
|
if (!sizeValue) {
|
|
2226
2266
|
return null;
|
|
@@ -2249,25 +2289,25 @@ function EqualUnequalSizesControl({
|
|
|
2249
2289
|
};
|
|
2250
2290
|
const isShowingGeneralIndicator = !popupState.isOpen;
|
|
2251
2291
|
const isMixed = !!multiSizeValue;
|
|
2252
|
-
return /* @__PURE__ */
|
|
2292
|
+
return /* @__PURE__ */ React37.createElement(React37.Fragment, null, /* @__PURE__ */ React37.createElement(import_ui29.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRefs[0] }, /* @__PURE__ */ React37.createElement(import_ui29.Grid, { item: true, xs: 6 }, !isShowingGeneralIndicator ? /* @__PURE__ */ React37.createElement(ControlFormLabel, null, label) : /* @__PURE__ */ React37.createElement(ControlLabel, null, label)), /* @__PURE__ */ React37.createElement(import_ui29.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(import_ui29.Stack, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React37.createElement(
|
|
2253
2293
|
SizeControl,
|
|
2254
2294
|
{
|
|
2255
2295
|
placeholder: isMixed ? (0, import_i18n9.__)("Mixed", "elementor") : void 0,
|
|
2256
2296
|
anchorRef: rowRefs[0]
|
|
2257
2297
|
}
|
|
2258
|
-
), /* @__PURE__ */
|
|
2259
|
-
|
|
2298
|
+
), /* @__PURE__ */ React37.createElement(import_ui29.Tooltip, { title: tooltipLabel, placement: "top" }, /* @__PURE__ */ React37.createElement(
|
|
2299
|
+
import_ui29.ToggleButton,
|
|
2260
2300
|
{
|
|
2261
2301
|
size: "tiny",
|
|
2262
2302
|
value: "check",
|
|
2263
2303
|
sx: { marginLeft: "auto" },
|
|
2264
|
-
...(0,
|
|
2304
|
+
...(0, import_ui29.bindToggle)(popupState),
|
|
2265
2305
|
selected: popupState.isOpen,
|
|
2266
2306
|
"aria-label": tooltipLabel
|
|
2267
2307
|
},
|
|
2268
2308
|
icon
|
|
2269
|
-
))))), /* @__PURE__ */
|
|
2270
|
-
|
|
2309
|
+
))))), /* @__PURE__ */ React37.createElement(
|
|
2310
|
+
import_ui29.Popover,
|
|
2271
2311
|
{
|
|
2272
2312
|
disablePortal: true,
|
|
2273
2313
|
disableScrollLock: true,
|
|
@@ -2279,12 +2319,12 @@ function EqualUnequalSizesControl({
|
|
|
2279
2319
|
vertical: "top",
|
|
2280
2320
|
horizontal: "right"
|
|
2281
2321
|
},
|
|
2282
|
-
...(0,
|
|
2322
|
+
...(0, import_ui29.bindPopover)(popupState),
|
|
2283
2323
|
slotProps: {
|
|
2284
2324
|
paper: { sx: { mt: 0.5, width: rowRefs[0].current?.getBoundingClientRect().width } }
|
|
2285
2325
|
}
|
|
2286
2326
|
},
|
|
2287
|
-
/* @__PURE__ */
|
|
2327
|
+
/* @__PURE__ */ React37.createElement(
|
|
2288
2328
|
PropProvider,
|
|
2289
2329
|
{
|
|
2290
2330
|
propType: multiSizePropType,
|
|
@@ -2292,26 +2332,27 @@ function EqualUnequalSizesControl({
|
|
|
2292
2332
|
setValue: setNestedProp,
|
|
2293
2333
|
isDisabled: () => multiSizeDisabled
|
|
2294
2334
|
},
|
|
2295
|
-
/* @__PURE__ */
|
|
2335
|
+
/* @__PURE__ */ React37.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React37.createElement(PopoverGridContainer, { ref: rowRefs[1] }, /* @__PURE__ */ React37.createElement(MultiSizeValueControl, { item: items2[0], rowRef: rowRefs[1] }), /* @__PURE__ */ React37.createElement(MultiSizeValueControl, { item: items2[1], rowRef: rowRefs[1] })), /* @__PURE__ */ React37.createElement(PopoverGridContainer, { ref: rowRefs[2] }, /* @__PURE__ */ React37.createElement(MultiSizeValueControl, { item: items2[2], rowRef: rowRefs[2] }), /* @__PURE__ */ React37.createElement(MultiSizeValueControl, { item: items2[3], rowRef: rowRefs[2] })))
|
|
2296
2336
|
)
|
|
2297
2337
|
));
|
|
2298
2338
|
}
|
|
2299
2339
|
var MultiSizeValueControl = ({ item, rowRef }) => {
|
|
2300
|
-
return /* @__PURE__ */
|
|
2340
|
+
return /* @__PURE__ */ React37.createElement(PropKeyProvider, { bind: item.bind }, /* @__PURE__ */ React37.createElement(import_ui29.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(import_ui29.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React37.createElement(import_ui29.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React37.createElement(ControlLabel, null, item.label)), /* @__PURE__ */ React37.createElement(import_ui29.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React37.createElement(SizeControl, { startIcon: item.icon, anchorRef: rowRef })))));
|
|
2301
2341
|
};
|
|
2302
2342
|
|
|
2303
2343
|
// src/controls/linked-dimensions-control.tsx
|
|
2304
|
-
var
|
|
2305
|
-
var
|
|
2344
|
+
var React38 = __toESM(require("react"));
|
|
2345
|
+
var import_react23 = require("react");
|
|
2306
2346
|
var import_editor_props17 = require("@elementor/editor-props");
|
|
2307
2347
|
var import_icons7 = require("@elementor/icons");
|
|
2308
|
-
var
|
|
2348
|
+
var import_ui30 = require("@elementor/ui");
|
|
2309
2349
|
var import_i18n10 = require("@wordpress/i18n");
|
|
2310
2350
|
var LinkedDimensionsControl = createControl(
|
|
2311
2351
|
({
|
|
2312
2352
|
label,
|
|
2313
2353
|
isSiteRtl = false,
|
|
2314
|
-
extendedOptions
|
|
2354
|
+
extendedOptions,
|
|
2355
|
+
min
|
|
2315
2356
|
}) => {
|
|
2316
2357
|
const {
|
|
2317
2358
|
value: sizeValue,
|
|
@@ -2319,7 +2360,7 @@ var LinkedDimensionsControl = createControl(
|
|
|
2319
2360
|
disabled: sizeDisabled,
|
|
2320
2361
|
placeholder: sizePlaceholder
|
|
2321
2362
|
} = useBoundProp(import_editor_props17.sizePropTypeUtil);
|
|
2322
|
-
const gridRowRefs = [(0,
|
|
2363
|
+
const gridRowRefs = [(0, import_react23.useRef)(null), (0, import_react23.useRef)(null)];
|
|
2323
2364
|
const {
|
|
2324
2365
|
value: dimensionsValue,
|
|
2325
2366
|
setValue: setDimensionsValue,
|
|
@@ -2348,7 +2389,7 @@ var LinkedDimensionsControl = createControl(
|
|
|
2348
2389
|
const linkedLabel = (0, import_i18n10.__)("Link %s", "elementor").replace("%s", tooltipLabel);
|
|
2349
2390
|
const unlinkedLabel = (0, import_i18n10.__)("Unlink %s", "elementor").replace("%s", tooltipLabel);
|
|
2350
2391
|
const disabled = sizeDisabled || dimensionsDisabled;
|
|
2351
|
-
return /* @__PURE__ */
|
|
2392
|
+
return /* @__PURE__ */ React38.createElement(
|
|
2352
2393
|
PropProvider,
|
|
2353
2394
|
{
|
|
2354
2395
|
propType,
|
|
@@ -2357,7 +2398,7 @@ var LinkedDimensionsControl = createControl(
|
|
|
2357
2398
|
placeholder: dimensionsPlaceholder,
|
|
2358
2399
|
isDisabled: () => disabled
|
|
2359
2400
|
},
|
|
2360
|
-
/* @__PURE__ */
|
|
2401
|
+
/* @__PURE__ */ React38.createElement(import_ui30.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React38.createElement(ControlFormLabel, null, label), /* @__PURE__ */ React38.createElement(import_ui30.Tooltip, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React38.createElement(
|
|
2361
2402
|
StyledToggleButton,
|
|
2362
2403
|
{
|
|
2363
2404
|
"aria-label": isLinked ? unlinkedLabel : linkedLabel,
|
|
@@ -2369,16 +2410,17 @@ var LinkedDimensionsControl = createControl(
|
|
|
2369
2410
|
disabled,
|
|
2370
2411
|
isPlaceholder: hasPlaceholders
|
|
2371
2412
|
},
|
|
2372
|
-
/* @__PURE__ */
|
|
2413
|
+
/* @__PURE__ */ React38.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
2373
2414
|
))),
|
|
2374
|
-
getCssDimensionProps(isSiteRtl).map((row, index) => /* @__PURE__ */
|
|
2415
|
+
getCssDimensionProps(isSiteRtl).map((row, index) => /* @__PURE__ */ React38.createElement(import_ui30.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", key: index, ref: gridRowRefs[index] }, row.map(({ icon, ...props }) => /* @__PURE__ */ React38.createElement(import_ui30.Grid, { container: true, gap: 0.75, alignItems: "center", key: props.bind }, /* @__PURE__ */ React38.createElement(import_ui30.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React38.createElement(Label, { ...props })), /* @__PURE__ */ React38.createElement(import_ui30.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React38.createElement(
|
|
2375
2416
|
Control3,
|
|
2376
2417
|
{
|
|
2377
2418
|
bind: props.bind,
|
|
2378
2419
|
startIcon: icon,
|
|
2379
2420
|
isLinked,
|
|
2380
2421
|
extendedOptions,
|
|
2381
|
-
anchorRef: gridRowRefs[index]
|
|
2422
|
+
anchorRef: gridRowRefs[index],
|
|
2423
|
+
min
|
|
2382
2424
|
}
|
|
2383
2425
|
))))))
|
|
2384
2426
|
);
|
|
@@ -2389,15 +2431,32 @@ var Control3 = ({
|
|
|
2389
2431
|
startIcon,
|
|
2390
2432
|
isLinked,
|
|
2391
2433
|
extendedOptions,
|
|
2392
|
-
anchorRef
|
|
2434
|
+
anchorRef,
|
|
2435
|
+
min
|
|
2393
2436
|
}) => {
|
|
2394
2437
|
if (isLinked) {
|
|
2395
|
-
return /* @__PURE__ */
|
|
2438
|
+
return /* @__PURE__ */ React38.createElement(
|
|
2439
|
+
SizeControl,
|
|
2440
|
+
{
|
|
2441
|
+
startIcon,
|
|
2442
|
+
extendedOptions,
|
|
2443
|
+
anchorRef,
|
|
2444
|
+
min
|
|
2445
|
+
}
|
|
2446
|
+
);
|
|
2396
2447
|
}
|
|
2397
|
-
return /* @__PURE__ */
|
|
2448
|
+
return /* @__PURE__ */ React38.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React38.createElement(
|
|
2449
|
+
SizeControl,
|
|
2450
|
+
{
|
|
2451
|
+
startIcon,
|
|
2452
|
+
extendedOptions,
|
|
2453
|
+
anchorRef,
|
|
2454
|
+
min
|
|
2455
|
+
}
|
|
2456
|
+
));
|
|
2398
2457
|
};
|
|
2399
2458
|
var Label = ({ label, bind }) => {
|
|
2400
|
-
return /* @__PURE__ */
|
|
2459
|
+
return /* @__PURE__ */ React38.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React38.createElement(ControlLabel, null, label));
|
|
2401
2460
|
};
|
|
2402
2461
|
function getCssDimensionProps(isSiteRtl) {
|
|
2403
2462
|
return [
|
|
@@ -2405,41 +2464,41 @@ function getCssDimensionProps(isSiteRtl) {
|
|
|
2405
2464
|
{
|
|
2406
2465
|
bind: "block-start",
|
|
2407
2466
|
label: (0, import_i18n10.__)("Top", "elementor"),
|
|
2408
|
-
icon: /* @__PURE__ */
|
|
2467
|
+
icon: /* @__PURE__ */ React38.createElement(import_icons7.SideTopIcon, { fontSize: "tiny" })
|
|
2409
2468
|
},
|
|
2410
2469
|
{
|
|
2411
2470
|
bind: "inline-end",
|
|
2412
2471
|
label: isSiteRtl ? (0, import_i18n10.__)("Left", "elementor") : (0, import_i18n10.__)("Right", "elementor"),
|
|
2413
|
-
icon: isSiteRtl ? /* @__PURE__ */
|
|
2472
|
+
icon: isSiteRtl ? /* @__PURE__ */ React38.createElement(import_icons7.SideLeftIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React38.createElement(import_icons7.SideRightIcon, { fontSize: "tiny" })
|
|
2414
2473
|
}
|
|
2415
2474
|
],
|
|
2416
2475
|
[
|
|
2417
2476
|
{
|
|
2418
2477
|
bind: "block-end",
|
|
2419
2478
|
label: (0, import_i18n10.__)("Bottom", "elementor"),
|
|
2420
|
-
icon: /* @__PURE__ */
|
|
2479
|
+
icon: /* @__PURE__ */ React38.createElement(import_icons7.SideBottomIcon, { fontSize: "tiny" })
|
|
2421
2480
|
},
|
|
2422
2481
|
{
|
|
2423
2482
|
bind: "inline-start",
|
|
2424
2483
|
label: isSiteRtl ? (0, import_i18n10.__)("Right", "elementor") : (0, import_i18n10.__)("Left", "elementor"),
|
|
2425
|
-
icon: isSiteRtl ? /* @__PURE__ */
|
|
2484
|
+
icon: isSiteRtl ? /* @__PURE__ */ React38.createElement(import_icons7.SideRightIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React38.createElement(import_icons7.SideLeftIcon, { fontSize: "tiny" })
|
|
2426
2485
|
}
|
|
2427
2486
|
]
|
|
2428
2487
|
];
|
|
2429
2488
|
}
|
|
2430
2489
|
|
|
2431
2490
|
// src/controls/font-family-control/font-family-control.tsx
|
|
2432
|
-
var
|
|
2491
|
+
var React40 = __toESM(require("react"));
|
|
2433
2492
|
var import_editor_props18 = require("@elementor/editor-props");
|
|
2434
2493
|
var import_icons8 = require("@elementor/icons");
|
|
2435
|
-
var
|
|
2494
|
+
var import_ui32 = require("@elementor/ui");
|
|
2436
2495
|
var import_i18n12 = require("@wordpress/i18n");
|
|
2437
2496
|
|
|
2438
2497
|
// src/components/item-selector.tsx
|
|
2439
|
-
var
|
|
2440
|
-
var
|
|
2498
|
+
var React39 = __toESM(require("react"));
|
|
2499
|
+
var import_react24 = require("react");
|
|
2441
2500
|
var import_editor_ui4 = require("@elementor/editor-ui");
|
|
2442
|
-
var
|
|
2501
|
+
var import_ui31 = require("@elementor/ui");
|
|
2443
2502
|
var import_utils2 = require("@elementor/utils");
|
|
2444
2503
|
var import_i18n11 = require("@wordpress/i18n");
|
|
2445
2504
|
|
|
@@ -2472,7 +2531,7 @@ var ItemSelector = ({
|
|
|
2472
2531
|
},
|
|
2473
2532
|
icon
|
|
2474
2533
|
}) => {
|
|
2475
|
-
const [searchValue, setSearchValue] = (0,
|
|
2534
|
+
const [searchValue, setSearchValue] = (0, import_react24.useState)("");
|
|
2476
2535
|
const filteredItemsList = useFilteredItemsList(itemsList, searchValue);
|
|
2477
2536
|
const IconComponent = icon;
|
|
2478
2537
|
const handleSearch = (value) => {
|
|
@@ -2482,14 +2541,14 @@ var ItemSelector = ({
|
|
|
2482
2541
|
setSearchValue("");
|
|
2483
2542
|
onClose();
|
|
2484
2543
|
};
|
|
2485
|
-
return /* @__PURE__ */
|
|
2544
|
+
return /* @__PURE__ */ React39.createElement(import_editor_ui4.PopoverBody, { width: sectionWidth }, /* @__PURE__ */ React39.createElement(import_editor_ui4.PopoverHeader, { title, onClose: handleClose, icon: /* @__PURE__ */ React39.createElement(IconComponent, { fontSize: "tiny" }) }), /* @__PURE__ */ React39.createElement(
|
|
2486
2545
|
import_editor_ui4.PopoverSearch,
|
|
2487
2546
|
{
|
|
2488
2547
|
value: searchValue,
|
|
2489
2548
|
onSearch: handleSearch,
|
|
2490
2549
|
placeholder: (0, import_i18n11.__)("Search", "elementor")
|
|
2491
2550
|
}
|
|
2492
|
-
), /* @__PURE__ */
|
|
2551
|
+
), /* @__PURE__ */ React39.createElement(import_ui31.Divider, null), filteredItemsList.length > 0 ? /* @__PURE__ */ React39.createElement(
|
|
2493
2552
|
ItemList,
|
|
2494
2553
|
{
|
|
2495
2554
|
itemListItems: filteredItemsList,
|
|
@@ -2499,8 +2558,8 @@ var ItemSelector = ({
|
|
|
2499
2558
|
itemStyle,
|
|
2500
2559
|
onDebounce
|
|
2501
2560
|
}
|
|
2502
|
-
) : /* @__PURE__ */
|
|
2503
|
-
|
|
2561
|
+
) : /* @__PURE__ */ React39.createElement(
|
|
2562
|
+
import_ui31.Stack,
|
|
2504
2563
|
{
|
|
2505
2564
|
alignItems: "center",
|
|
2506
2565
|
justifyContent: "center",
|
|
@@ -2509,27 +2568,27 @@ var ItemSelector = ({
|
|
|
2509
2568
|
gap: 1.5,
|
|
2510
2569
|
overflow: "hidden"
|
|
2511
2570
|
},
|
|
2512
|
-
/* @__PURE__ */
|
|
2513
|
-
/* @__PURE__ */
|
|
2514
|
-
|
|
2571
|
+
/* @__PURE__ */ React39.createElement(IconComponent, { fontSize: "large" }),
|
|
2572
|
+
/* @__PURE__ */ React39.createElement(import_ui31.Box, { sx: { maxWidth: 160, overflow: "hidden" } }, /* @__PURE__ */ React39.createElement(import_ui31.Typography, { align: "center", variant: "subtitle2", color: "text.secondary" }, (0, import_i18n11.__)("Sorry, nothing matched", "elementor")), /* @__PURE__ */ React39.createElement(
|
|
2573
|
+
import_ui31.Typography,
|
|
2515
2574
|
{
|
|
2516
2575
|
variant: "subtitle2",
|
|
2517
2576
|
color: "text.secondary",
|
|
2518
2577
|
sx: { display: "flex", width: "100%", justifyContent: "center" }
|
|
2519
2578
|
},
|
|
2520
|
-
/* @__PURE__ */
|
|
2521
|
-
/* @__PURE__ */
|
|
2522
|
-
|
|
2579
|
+
/* @__PURE__ */ React39.createElement("span", null, "\u201C"),
|
|
2580
|
+
/* @__PURE__ */ React39.createElement(
|
|
2581
|
+
import_ui31.Box,
|
|
2523
2582
|
{
|
|
2524
2583
|
component: "span",
|
|
2525
2584
|
sx: { maxWidth: "80%", overflow: "hidden", textOverflow: "ellipsis" }
|
|
2526
2585
|
},
|
|
2527
2586
|
searchValue
|
|
2528
2587
|
),
|
|
2529
|
-
/* @__PURE__ */
|
|
2588
|
+
/* @__PURE__ */ React39.createElement("span", null, "\u201D.")
|
|
2530
2589
|
)),
|
|
2531
|
-
/* @__PURE__ */
|
|
2532
|
-
|
|
2590
|
+
/* @__PURE__ */ React39.createElement(
|
|
2591
|
+
import_ui31.Typography,
|
|
2533
2592
|
{
|
|
2534
2593
|
align: "center",
|
|
2535
2594
|
variant: "caption",
|
|
@@ -2537,8 +2596,8 @@ var ItemSelector = ({
|
|
|
2537
2596
|
sx: { display: "flex", flexDirection: "column" }
|
|
2538
2597
|
},
|
|
2539
2598
|
(0, import_i18n11.__)("Try something else.", "elementor"),
|
|
2540
|
-
/* @__PURE__ */
|
|
2541
|
-
|
|
2599
|
+
/* @__PURE__ */ React39.createElement(
|
|
2600
|
+
import_ui31.Link,
|
|
2542
2601
|
{
|
|
2543
2602
|
color: "secondary",
|
|
2544
2603
|
variant: "caption",
|
|
@@ -2568,8 +2627,8 @@ var ItemList = ({
|
|
|
2568
2627
|
}
|
|
2569
2628
|
});
|
|
2570
2629
|
}, 100);
|
|
2571
|
-
const memoizedItemStyle = (0,
|
|
2572
|
-
return /* @__PURE__ */
|
|
2630
|
+
const memoizedItemStyle = (0, import_react24.useCallback)((item) => itemStyle(item), [itemStyle]);
|
|
2631
|
+
return /* @__PURE__ */ React39.createElement(
|
|
2573
2632
|
import_editor_ui4.PopoverMenuList,
|
|
2574
2633
|
{
|
|
2575
2634
|
items: itemListItems,
|
|
@@ -2583,8 +2642,8 @@ var ItemList = ({
|
|
|
2583
2642
|
);
|
|
2584
2643
|
};
|
|
2585
2644
|
var useDebounce = (fn, delay) => {
|
|
2586
|
-
const [debouncedFn] = (0,
|
|
2587
|
-
(0,
|
|
2645
|
+
const [debouncedFn] = (0, import_react24.useState)(() => (0, import_utils2.debounce)(fn, delay));
|
|
2646
|
+
(0, import_react24.useEffect)(() => () => debouncedFn.cancel(), [debouncedFn]);
|
|
2588
2647
|
return debouncedFn;
|
|
2589
2648
|
};
|
|
2590
2649
|
|
|
@@ -2597,21 +2656,21 @@ var enqueueFont = (fontFamily, context = "editor") => {
|
|
|
2597
2656
|
// src/controls/font-family-control/font-family-control.tsx
|
|
2598
2657
|
var FontFamilyControl = createControl(({ fontFamilies, sectionWidth }) => {
|
|
2599
2658
|
const { value: fontFamily, setValue: setFontFamily, disabled, placeholder } = useBoundProp(import_editor_props18.stringPropTypeUtil);
|
|
2600
|
-
const popoverState = (0,
|
|
2659
|
+
const popoverState = (0, import_ui32.usePopupState)({ variant: "popover" });
|
|
2601
2660
|
const isShowingPlaceholder = !fontFamily && placeholder;
|
|
2602
|
-
const mapFontSubs =
|
|
2661
|
+
const mapFontSubs = React40.useMemo(() => {
|
|
2603
2662
|
return fontFamilies.map(({ label, fonts }) => ({
|
|
2604
2663
|
label,
|
|
2605
2664
|
items: fonts
|
|
2606
2665
|
}));
|
|
2607
2666
|
}, [fontFamilies]);
|
|
2608
|
-
return /* @__PURE__ */
|
|
2609
|
-
|
|
2667
|
+
return /* @__PURE__ */ React40.createElement(React40.Fragment, null, /* @__PURE__ */ React40.createElement(ControlActions, null, /* @__PURE__ */ React40.createElement(
|
|
2668
|
+
import_ui32.UnstableTag,
|
|
2610
2669
|
{
|
|
2611
2670
|
variant: "outlined",
|
|
2612
2671
|
label: fontFamily || placeholder,
|
|
2613
|
-
endIcon: /* @__PURE__ */
|
|
2614
|
-
...(0,
|
|
2672
|
+
endIcon: /* @__PURE__ */ React40.createElement(import_icons8.ChevronDownIcon, { fontSize: "tiny" }),
|
|
2673
|
+
...(0, import_ui32.bindTrigger)(popoverState),
|
|
2615
2674
|
fullWidth: true,
|
|
2616
2675
|
disabled,
|
|
2617
2676
|
sx: isShowingPlaceholder ? {
|
|
@@ -2621,17 +2680,17 @@ var FontFamilyControl = createControl(({ fontFamilies, sectionWidth }) => {
|
|
|
2621
2680
|
textTransform: "capitalize"
|
|
2622
2681
|
} : void 0
|
|
2623
2682
|
}
|
|
2624
|
-
)), /* @__PURE__ */
|
|
2625
|
-
|
|
2683
|
+
)), /* @__PURE__ */ React40.createElement(
|
|
2684
|
+
import_ui32.Popover,
|
|
2626
2685
|
{
|
|
2627
2686
|
disablePortal: true,
|
|
2628
2687
|
disableScrollLock: true,
|
|
2629
2688
|
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
2630
2689
|
transformOrigin: { vertical: "top", horizontal: "right" },
|
|
2631
2690
|
sx: { my: 1.5 },
|
|
2632
|
-
...(0,
|
|
2691
|
+
...(0, import_ui32.bindPopover)(popoverState)
|
|
2633
2692
|
},
|
|
2634
|
-
/* @__PURE__ */
|
|
2693
|
+
/* @__PURE__ */ React40.createElement(
|
|
2635
2694
|
ItemSelector,
|
|
2636
2695
|
{
|
|
2637
2696
|
itemsList: mapFontSubs,
|
|
@@ -2649,14 +2708,14 @@ var FontFamilyControl = createControl(({ fontFamilies, sectionWidth }) => {
|
|
|
2649
2708
|
});
|
|
2650
2709
|
|
|
2651
2710
|
// src/controls/url-control.tsx
|
|
2652
|
-
var
|
|
2711
|
+
var React41 = __toESM(require("react"));
|
|
2653
2712
|
var import_editor_props19 = require("@elementor/editor-props");
|
|
2654
|
-
var
|
|
2713
|
+
var import_ui33 = require("@elementor/ui");
|
|
2655
2714
|
var UrlControl = createControl(({ placeholder }) => {
|
|
2656
2715
|
const { value, setValue, disabled } = useBoundProp(import_editor_props19.urlPropTypeUtil);
|
|
2657
2716
|
const handleChange = (event) => setValue(event.target.value);
|
|
2658
|
-
return /* @__PURE__ */
|
|
2659
|
-
|
|
2717
|
+
return /* @__PURE__ */ React41.createElement(ControlActions, null, /* @__PURE__ */ React41.createElement(
|
|
2718
|
+
import_ui33.TextField,
|
|
2660
2719
|
{
|
|
2661
2720
|
size: "tiny",
|
|
2662
2721
|
fullWidth: true,
|
|
@@ -2669,23 +2728,23 @@ var UrlControl = createControl(({ placeholder }) => {
|
|
|
2669
2728
|
});
|
|
2670
2729
|
|
|
2671
2730
|
// src/controls/link-control.tsx
|
|
2672
|
-
var
|
|
2673
|
-
var
|
|
2731
|
+
var React45 = __toESM(require("react"));
|
|
2732
|
+
var import_react26 = require("react");
|
|
2674
2733
|
var import_editor_elements2 = require("@elementor/editor-elements");
|
|
2675
2734
|
var import_editor_props21 = require("@elementor/editor-props");
|
|
2676
2735
|
var import_http_client2 = require("@elementor/http-client");
|
|
2677
2736
|
var import_icons11 = require("@elementor/icons");
|
|
2678
2737
|
var import_session = require("@elementor/session");
|
|
2679
|
-
var
|
|
2738
|
+
var import_ui37 = require("@elementor/ui");
|
|
2680
2739
|
var import_utils3 = require("@elementor/utils");
|
|
2681
2740
|
var import_i18n14 = require("@wordpress/i18n");
|
|
2682
2741
|
|
|
2683
2742
|
// src/components/autocomplete.tsx
|
|
2684
|
-
var
|
|
2685
|
-
var
|
|
2743
|
+
var React42 = __toESM(require("react"));
|
|
2744
|
+
var import_react25 = require("react");
|
|
2686
2745
|
var import_icons9 = require("@elementor/icons");
|
|
2687
|
-
var
|
|
2688
|
-
var Autocomplete = (0,
|
|
2746
|
+
var import_ui34 = require("@elementor/ui");
|
|
2747
|
+
var Autocomplete = (0, import_react25.forwardRef)((props, ref) => {
|
|
2689
2748
|
const {
|
|
2690
2749
|
options,
|
|
2691
2750
|
onOptionChange,
|
|
@@ -2701,8 +2760,8 @@ var Autocomplete = (0, import_react24.forwardRef)((props, ref) => {
|
|
|
2701
2760
|
const muiWarningPreventer = allowCustomValues || !!value?.toString()?.length;
|
|
2702
2761
|
const isOptionEqualToValue = muiWarningPreventer ? void 0 : () => true;
|
|
2703
2762
|
const isValueFromOptions = typeof value === "number" && !!findMatchingOption(options, value);
|
|
2704
|
-
return /* @__PURE__ */
|
|
2705
|
-
|
|
2763
|
+
return /* @__PURE__ */ React42.createElement(
|
|
2764
|
+
import_ui34.Autocomplete,
|
|
2706
2765
|
{
|
|
2707
2766
|
...restProps,
|
|
2708
2767
|
ref,
|
|
@@ -2719,8 +2778,8 @@ var Autocomplete = (0, import_react24.forwardRef)((props, ref) => {
|
|
|
2719
2778
|
groupBy: isCategorizedOptionPool(options) ? (optionId) => findMatchingOption(options, optionId)?.groupLabel || optionId : void 0,
|
|
2720
2779
|
isOptionEqualToValue,
|
|
2721
2780
|
filterOptions: () => optionKeys,
|
|
2722
|
-
renderOption: (optionProps, optionId) => /* @__PURE__ */
|
|
2723
|
-
renderInput: (params) => /* @__PURE__ */
|
|
2781
|
+
renderOption: (optionProps, optionId) => /* @__PURE__ */ React42.createElement(import_ui34.Box, { component: "li", ...optionProps, key: optionProps.id }, findMatchingOption(options, optionId)?.label ?? optionId),
|
|
2782
|
+
renderInput: (params) => /* @__PURE__ */ React42.createElement(
|
|
2724
2783
|
TextInput,
|
|
2725
2784
|
{
|
|
2726
2785
|
params,
|
|
@@ -2743,8 +2802,8 @@ var TextInput = ({
|
|
|
2743
2802
|
const onChange = (event) => {
|
|
2744
2803
|
handleChange(event.target.value);
|
|
2745
2804
|
};
|
|
2746
|
-
return /* @__PURE__ */
|
|
2747
|
-
|
|
2805
|
+
return /* @__PURE__ */ React42.createElement(
|
|
2806
|
+
import_ui34.TextField,
|
|
2748
2807
|
{
|
|
2749
2808
|
...params,
|
|
2750
2809
|
placeholder,
|
|
@@ -2756,7 +2815,7 @@ var TextInput = ({
|
|
|
2756
2815
|
},
|
|
2757
2816
|
InputProps: {
|
|
2758
2817
|
...params.InputProps,
|
|
2759
|
-
endAdornment: /* @__PURE__ */
|
|
2818
|
+
endAdornment: /* @__PURE__ */ React42.createElement(ClearButton, { params, allowClear, handleChange })
|
|
2760
2819
|
}
|
|
2761
2820
|
}
|
|
2762
2821
|
);
|
|
@@ -2765,7 +2824,7 @@ var ClearButton = ({
|
|
|
2765
2824
|
allowClear,
|
|
2766
2825
|
handleChange,
|
|
2767
2826
|
params
|
|
2768
|
-
}) => /* @__PURE__ */
|
|
2827
|
+
}) => /* @__PURE__ */ React42.createElement(import_ui34.InputAdornment, { position: "end" }, allowClear && /* @__PURE__ */ React42.createElement(import_ui34.IconButton, { size: params.size, onClick: () => handleChange(null), sx: { cursor: "pointer" } }, /* @__PURE__ */ React42.createElement(import_icons9.XIcon, { fontSize: params.size })));
|
|
2769
2828
|
function findMatchingOption(options, optionId = null) {
|
|
2770
2829
|
const formattedOption = (optionId || "").toString();
|
|
2771
2830
|
return options.find(({ id }) => formattedOption === id.toString());
|
|
@@ -2787,10 +2846,10 @@ function _factoryFilter(newValue, options, minInputLength) {
|
|
|
2787
2846
|
}
|
|
2788
2847
|
|
|
2789
2848
|
// src/components/restricted-link-infotip.tsx
|
|
2790
|
-
var
|
|
2849
|
+
var React43 = __toESM(require("react"));
|
|
2791
2850
|
var import_editor_elements = require("@elementor/editor-elements");
|
|
2792
2851
|
var import_icons10 = require("@elementor/icons");
|
|
2793
|
-
var
|
|
2852
|
+
var import_ui35 = require("@elementor/ui");
|
|
2794
2853
|
var import_i18n13 = require("@wordpress/i18n");
|
|
2795
2854
|
var learnMoreButton = {
|
|
2796
2855
|
label: (0, import_i18n13.__)("Learn More", "elementor"),
|
|
@@ -2814,13 +2873,13 @@ var RestrictedLinkInfotip = ({
|
|
|
2814
2873
|
(0, import_editor_elements.selectElement)(elementId);
|
|
2815
2874
|
}
|
|
2816
2875
|
};
|
|
2817
|
-
const content = /* @__PURE__ */
|
|
2818
|
-
|
|
2876
|
+
const content = /* @__PURE__ */ React43.createElement(
|
|
2877
|
+
import_ui35.Alert,
|
|
2819
2878
|
{
|
|
2820
2879
|
color: "secondary",
|
|
2821
|
-
icon: /* @__PURE__ */
|
|
2822
|
-
action: /* @__PURE__ */
|
|
2823
|
-
|
|
2880
|
+
icon: /* @__PURE__ */ React43.createElement(import_icons10.InfoCircleFilledIcon, null),
|
|
2881
|
+
action: /* @__PURE__ */ React43.createElement(
|
|
2882
|
+
import_ui35.AlertAction,
|
|
2824
2883
|
{
|
|
2825
2884
|
sx: { width: "fit-content" },
|
|
2826
2885
|
variant: "contained",
|
|
@@ -2830,32 +2889,32 @@ var RestrictedLinkInfotip = ({
|
|
|
2830
2889
|
(0, import_i18n13.__)("Take me there", "elementor")
|
|
2831
2890
|
)
|
|
2832
2891
|
},
|
|
2833
|
-
/* @__PURE__ */
|
|
2834
|
-
/* @__PURE__ */
|
|
2892
|
+
/* @__PURE__ */ React43.createElement(import_ui35.AlertTitle, null, (0, import_i18n13.__)("Nested links", "elementor")),
|
|
2893
|
+
/* @__PURE__ */ React43.createElement(import_ui35.Box, { component: "span" }, INFOTIP_CONTENT[reason ?? "descendant"], " ", /* @__PURE__ */ React43.createElement(import_ui35.Link, { href: learnMoreButton.href, target: "_blank", color: "info.main" }, learnMoreButton.label))
|
|
2835
2894
|
);
|
|
2836
|
-
return shouldRestrict && isVisible ? /* @__PURE__ */
|
|
2837
|
-
|
|
2895
|
+
return shouldRestrict && isVisible ? /* @__PURE__ */ React43.createElement(
|
|
2896
|
+
import_ui35.Infotip,
|
|
2838
2897
|
{
|
|
2839
2898
|
placement: "right",
|
|
2840
2899
|
content,
|
|
2841
2900
|
color: "secondary",
|
|
2842
2901
|
slotProps: { popper: { sx: { width: 300 } } }
|
|
2843
2902
|
},
|
|
2844
|
-
/* @__PURE__ */
|
|
2845
|
-
) : /* @__PURE__ */
|
|
2903
|
+
/* @__PURE__ */ React43.createElement(import_ui35.Box, null, children)
|
|
2904
|
+
) : /* @__PURE__ */ React43.createElement(React43.Fragment, null, children);
|
|
2846
2905
|
};
|
|
2847
2906
|
|
|
2848
2907
|
// src/controls/switch-control.tsx
|
|
2849
|
-
var
|
|
2908
|
+
var React44 = __toESM(require("react"));
|
|
2850
2909
|
var import_editor_props20 = require("@elementor/editor-props");
|
|
2851
|
-
var
|
|
2910
|
+
var import_ui36 = require("@elementor/ui");
|
|
2852
2911
|
var SwitchControl = createControl(() => {
|
|
2853
2912
|
const { value, setValue, disabled } = useBoundProp(import_editor_props20.booleanPropTypeUtil);
|
|
2854
2913
|
const handleChange = (event) => {
|
|
2855
2914
|
setValue(event.target.checked);
|
|
2856
2915
|
};
|
|
2857
|
-
return /* @__PURE__ */
|
|
2858
|
-
|
|
2916
|
+
return /* @__PURE__ */ React44.createElement("div", { style: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React44.createElement(
|
|
2917
|
+
import_ui36.Switch,
|
|
2859
2918
|
{
|
|
2860
2919
|
checked: !!value,
|
|
2861
2920
|
onChange: handleChange,
|
|
@@ -2873,7 +2932,7 @@ var SIZE3 = "tiny";
|
|
|
2873
2932
|
var LinkControl = createControl((props) => {
|
|
2874
2933
|
const { value, path, setValue, ...propContext } = useBoundProp(import_editor_props21.linkPropTypeUtil);
|
|
2875
2934
|
const [linkSessionValue, setLinkSessionValue] = (0, import_session.useSessionStorage)(path.join("/"));
|
|
2876
|
-
const [isActive, setIsActive] = (0,
|
|
2935
|
+
const [isActive, setIsActive] = (0, import_react26.useState)(!!value);
|
|
2877
2936
|
const {
|
|
2878
2937
|
allowCustomValues,
|
|
2879
2938
|
queryOptions: { endpoint = "", requestParams = {} },
|
|
@@ -2882,8 +2941,8 @@ var LinkControl = createControl((props) => {
|
|
|
2882
2941
|
context: { elementId },
|
|
2883
2942
|
label = (0, import_i18n14.__)("Link", "elementor")
|
|
2884
2943
|
} = props || {};
|
|
2885
|
-
const [linkInLinkRestriction, setLinkInLinkRestriction] = (0,
|
|
2886
|
-
const [options, setOptions] = (0,
|
|
2944
|
+
const [linkInLinkRestriction, setLinkInLinkRestriction] = (0, import_react26.useState)((0, import_editor_elements2.getLinkInLinkRestriction)(elementId));
|
|
2945
|
+
const [options, setOptions] = (0, import_react26.useState)(
|
|
2887
2946
|
generateFirstLoadedOption(value)
|
|
2888
2947
|
);
|
|
2889
2948
|
const shouldDisableAddingLink = !isActive && linkInLinkRestriction.shouldRestrict;
|
|
@@ -2934,7 +2993,7 @@ var LinkControl = createControl((props) => {
|
|
|
2934
2993
|
}
|
|
2935
2994
|
debounceFetch({ ...requestParams, term: newValue });
|
|
2936
2995
|
};
|
|
2937
|
-
const debounceFetch = (0,
|
|
2996
|
+
const debounceFetch = (0, import_react26.useMemo)(
|
|
2938
2997
|
() => (0, import_utils3.debounce)(
|
|
2939
2998
|
(params) => fetchOptions(endpoint, params).then((newOptions) => {
|
|
2940
2999
|
setOptions(formatOptions(newOptions));
|
|
@@ -2943,8 +3002,8 @@ var LinkControl = createControl((props) => {
|
|
|
2943
3002
|
),
|
|
2944
3003
|
[endpoint]
|
|
2945
3004
|
);
|
|
2946
|
-
return /* @__PURE__ */
|
|
2947
|
-
|
|
3005
|
+
return /* @__PURE__ */ React45.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React45.createElement(import_ui37.Stack, { gap: 1.5 }, /* @__PURE__ */ React45.createElement(
|
|
3006
|
+
import_ui37.Stack,
|
|
2948
3007
|
{
|
|
2949
3008
|
direction: "row",
|
|
2950
3009
|
sx: {
|
|
@@ -2953,8 +3012,8 @@ var LinkControl = createControl((props) => {
|
|
|
2953
3012
|
marginInlineEnd: -0.75
|
|
2954
3013
|
}
|
|
2955
3014
|
},
|
|
2956
|
-
/* @__PURE__ */
|
|
2957
|
-
/* @__PURE__ */
|
|
3015
|
+
/* @__PURE__ */ React45.createElement(ControlFormLabel, null, label),
|
|
3016
|
+
/* @__PURE__ */ React45.createElement(RestrictedLinkInfotip, { isVisible: !isActive, linkInLinkRestriction }, /* @__PURE__ */ React45.createElement(
|
|
2958
3017
|
ToggleIconControl,
|
|
2959
3018
|
{
|
|
2960
3019
|
disabled: shouldDisableAddingLink,
|
|
@@ -2963,7 +3022,7 @@ var LinkControl = createControl((props) => {
|
|
|
2963
3022
|
label: (0, import_i18n14.__)("Toggle link", "elementor")
|
|
2964
3023
|
}
|
|
2965
3024
|
))
|
|
2966
|
-
), /* @__PURE__ */
|
|
3025
|
+
), /* @__PURE__ */ React45.createElement(import_ui37.Collapse, { in: isActive, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React45.createElement(import_ui37.Stack, { gap: 1.5 }, /* @__PURE__ */ React45.createElement(PropKeyProvider, { bind: "destination" }, /* @__PURE__ */ React45.createElement(ControlActions, null, /* @__PURE__ */ React45.createElement(
|
|
2967
3026
|
Autocomplete,
|
|
2968
3027
|
{
|
|
2969
3028
|
options,
|
|
@@ -2974,10 +3033,10 @@ var LinkControl = createControl((props) => {
|
|
|
2974
3033
|
onTextChange,
|
|
2975
3034
|
minInputLength
|
|
2976
3035
|
}
|
|
2977
|
-
))), /* @__PURE__ */
|
|
3036
|
+
))), /* @__PURE__ */ React45.createElement(PropKeyProvider, { bind: "isTargetBlank" }, /* @__PURE__ */ React45.createElement(import_ui37.Grid, { container: true, alignItems: "center", flexWrap: "nowrap", justifyContent: "space-between" }, /* @__PURE__ */ React45.createElement(import_ui37.Grid, { item: true }, /* @__PURE__ */ React45.createElement(ControlFormLabel, null, (0, import_i18n14.__)("Open in a new tab", "elementor"))), /* @__PURE__ */ React45.createElement(import_ui37.Grid, { item: true, sx: { marginInlineEnd: -1 } }, /* @__PURE__ */ React45.createElement(SwitchControl, null))))))));
|
|
2978
3037
|
});
|
|
2979
3038
|
var ToggleIconControl = ({ disabled, active, onIconClick, label }) => {
|
|
2980
|
-
return /* @__PURE__ */
|
|
3039
|
+
return /* @__PURE__ */ React45.createElement(import_ui37.IconButton, { size: SIZE3, onClick: onIconClick, "aria-label": label, disabled }, active ? /* @__PURE__ */ React45.createElement(import_icons11.MinusIcon, { fontSize: SIZE3 }) : /* @__PURE__ */ React45.createElement(import_icons11.PlusIcon, { fontSize: SIZE3 }));
|
|
2981
3040
|
};
|
|
2982
3041
|
async function fetchOptions(ajaxUrl, params) {
|
|
2983
3042
|
if (!params || !ajaxUrl) {
|
|
@@ -3009,11 +3068,11 @@ function generateFirstLoadedOption(unionValue) {
|
|
|
3009
3068
|
}
|
|
3010
3069
|
|
|
3011
3070
|
// src/controls/gap-control.tsx
|
|
3012
|
-
var
|
|
3013
|
-
var
|
|
3071
|
+
var React46 = __toESM(require("react"));
|
|
3072
|
+
var import_react27 = require("react");
|
|
3014
3073
|
var import_editor_props22 = require("@elementor/editor-props");
|
|
3015
3074
|
var import_icons12 = require("@elementor/icons");
|
|
3016
|
-
var
|
|
3075
|
+
var import_ui38 = require("@elementor/ui");
|
|
3017
3076
|
var import_i18n15 = require("@wordpress/i18n");
|
|
3018
3077
|
var GapControl = createControl(({ label }) => {
|
|
3019
3078
|
const {
|
|
@@ -3022,7 +3081,7 @@ var GapControl = createControl(({ label }) => {
|
|
|
3022
3081
|
propType,
|
|
3023
3082
|
disabled: directionDisabled
|
|
3024
3083
|
} = useBoundProp(import_editor_props22.layoutDirectionPropTypeUtil);
|
|
3025
|
-
const stackRef = (0,
|
|
3084
|
+
const stackRef = (0, import_react27.useRef)(null);
|
|
3026
3085
|
const { value: sizeValue, setValue: setSizeValue, disabled: sizeDisabled } = useBoundProp(import_editor_props22.sizePropTypeUtil);
|
|
3027
3086
|
const isLinked = !directionValue && !sizeValue ? true : !!sizeValue;
|
|
3028
3087
|
const onLinkToggle = () => {
|
|
@@ -3041,8 +3100,8 @@ var GapControl = createControl(({ label }) => {
|
|
|
3041
3100
|
const linkedLabel = (0, import_i18n15.__)("Link %s", "elementor").replace("%s", tooltipLabel);
|
|
3042
3101
|
const unlinkedLabel = (0, import_i18n15.__)("Unlink %s", "elementor").replace("%s", tooltipLabel);
|
|
3043
3102
|
const disabled = sizeDisabled || directionDisabled;
|
|
3044
|
-
return /* @__PURE__ */
|
|
3045
|
-
|
|
3103
|
+
return /* @__PURE__ */ React46.createElement(PropProvider, { propType, value: directionValue, setValue: setDirectionValue }, /* @__PURE__ */ React46.createElement(import_ui38.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(ControlLabel, null, label), /* @__PURE__ */ React46.createElement(import_ui38.Tooltip, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React46.createElement(
|
|
3104
|
+
import_ui38.ToggleButton,
|
|
3046
3105
|
{
|
|
3047
3106
|
"aria-label": isLinked ? unlinkedLabel : linkedLabel,
|
|
3048
3107
|
size: "tiny",
|
|
@@ -3052,8 +3111,8 @@ var GapControl = createControl(({ label }) => {
|
|
|
3052
3111
|
onChange: onLinkToggle,
|
|
3053
3112
|
disabled
|
|
3054
3113
|
},
|
|
3055
|
-
/* @__PURE__ */
|
|
3056
|
-
))), /* @__PURE__ */
|
|
3114
|
+
/* @__PURE__ */ React46.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
3115
|
+
))), /* @__PURE__ */ React46.createElement(import_ui38.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", ref: stackRef }, /* @__PURE__ */ React46.createElement(import_ui38.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React46.createElement(import_ui38.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React46.createElement(ControlFormLabel, null, (0, import_i18n15.__)("Column", "elementor"))), /* @__PURE__ */ React46.createElement(import_ui38.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React46.createElement(Control4, { bind: "column", isLinked, anchorRef: stackRef }))), /* @__PURE__ */ React46.createElement(import_ui38.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React46.createElement(import_ui38.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React46.createElement(ControlFormLabel, null, (0, import_i18n15.__)("Row", "elementor"))), /* @__PURE__ */ React46.createElement(import_ui38.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React46.createElement(Control4, { bind: "row", isLinked, anchorRef: stackRef })))));
|
|
3057
3116
|
});
|
|
3058
3117
|
var Control4 = ({
|
|
3059
3118
|
bind,
|
|
@@ -3061,18 +3120,18 @@ var Control4 = ({
|
|
|
3061
3120
|
anchorRef
|
|
3062
3121
|
}) => {
|
|
3063
3122
|
if (isLinked) {
|
|
3064
|
-
return /* @__PURE__ */
|
|
3123
|
+
return /* @__PURE__ */ React46.createElement(SizeControl, { anchorRef });
|
|
3065
3124
|
}
|
|
3066
|
-
return /* @__PURE__ */
|
|
3125
|
+
return /* @__PURE__ */ React46.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React46.createElement(SizeControl, { anchorRef }));
|
|
3067
3126
|
};
|
|
3068
3127
|
|
|
3069
3128
|
// src/controls/aspect-ratio-control.tsx
|
|
3070
|
-
var
|
|
3071
|
-
var
|
|
3129
|
+
var React47 = __toESM(require("react"));
|
|
3130
|
+
var import_react28 = require("react");
|
|
3072
3131
|
var import_editor_props23 = require("@elementor/editor-props");
|
|
3073
3132
|
var import_editor_ui5 = require("@elementor/editor-ui");
|
|
3074
3133
|
var import_icons13 = require("@elementor/icons");
|
|
3075
|
-
var
|
|
3134
|
+
var import_ui39 = require("@elementor/ui");
|
|
3076
3135
|
var import_i18n16 = require("@wordpress/i18n");
|
|
3077
3136
|
var RATIO_OPTIONS = [
|
|
3078
3137
|
{ label: (0, import_i18n16.__)("Auto", "elementor"), value: "auto" },
|
|
@@ -3089,13 +3148,13 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
3089
3148
|
const { value: aspectRatioValue, setValue: setAspectRatioValue, disabled } = useBoundProp(import_editor_props23.stringPropTypeUtil);
|
|
3090
3149
|
const isCustomSelected = aspectRatioValue && !RATIO_OPTIONS.some((option) => option.value === aspectRatioValue);
|
|
3091
3150
|
const [initialWidth, initialHeight] = isCustomSelected ? aspectRatioValue.split("/") : ["", ""];
|
|
3092
|
-
const [isCustom, setIsCustom] = (0,
|
|
3093
|
-
const [customWidth, setCustomWidth] = (0,
|
|
3094
|
-
const [customHeight, setCustomHeight] = (0,
|
|
3095
|
-
const [selectedValue, setSelectedValue] = (0,
|
|
3151
|
+
const [isCustom, setIsCustom] = (0, import_react28.useState)(isCustomSelected);
|
|
3152
|
+
const [customWidth, setCustomWidth] = (0, import_react28.useState)(initialWidth);
|
|
3153
|
+
const [customHeight, setCustomHeight] = (0, import_react28.useState)(initialHeight);
|
|
3154
|
+
const [selectedValue, setSelectedValue] = (0, import_react28.useState)(
|
|
3096
3155
|
isCustomSelected ? CUSTOM_RATIO : aspectRatioValue || ""
|
|
3097
3156
|
);
|
|
3098
|
-
(0,
|
|
3157
|
+
(0, import_react28.useEffect)(() => {
|
|
3099
3158
|
const isCustomValue = aspectRatioValue && !RATIO_OPTIONS.some((option) => option.value === aspectRatioValue);
|
|
3100
3159
|
if (isCustomValue) {
|
|
3101
3160
|
const [width, height] = aspectRatioValue.split("/");
|
|
@@ -3134,8 +3193,8 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
3134
3193
|
setAspectRatioValue(`${customWidth}/${newHeight}`);
|
|
3135
3194
|
}
|
|
3136
3195
|
};
|
|
3137
|
-
return /* @__PURE__ */
|
|
3138
|
-
|
|
3196
|
+
return /* @__PURE__ */ React47.createElement(ControlActions, null, /* @__PURE__ */ React47.createElement(import_ui39.Stack, { direction: "column", gap: 2 }, /* @__PURE__ */ React47.createElement(import_ui39.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlLabel, null, label)), /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(
|
|
3197
|
+
import_ui39.Select,
|
|
3139
3198
|
{
|
|
3140
3199
|
size: "tiny",
|
|
3141
3200
|
displayEmpty: true,
|
|
@@ -3146,10 +3205,10 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
3146
3205
|
fullWidth: true
|
|
3147
3206
|
},
|
|
3148
3207
|
[...RATIO_OPTIONS, { label: (0, import_i18n16.__)("Custom", "elementor"), value: CUSTOM_RATIO }].map(
|
|
3149
|
-
({ label: optionLabel, ...props }) => /* @__PURE__ */
|
|
3208
|
+
({ label: optionLabel, ...props }) => /* @__PURE__ */ React47.createElement(import_editor_ui5.MenuListItem, { key: props.value, ...props, value: props.value ?? "" }, optionLabel)
|
|
3150
3209
|
)
|
|
3151
|
-
))), isCustom && /* @__PURE__ */
|
|
3152
|
-
|
|
3210
|
+
))), isCustom && /* @__PURE__ */ React47.createElement(import_ui39.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(
|
|
3211
|
+
import_ui39.TextField,
|
|
3153
3212
|
{
|
|
3154
3213
|
size: "tiny",
|
|
3155
3214
|
type: "number",
|
|
@@ -3158,11 +3217,11 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
3158
3217
|
value: customWidth,
|
|
3159
3218
|
onChange: handleCustomWidthChange,
|
|
3160
3219
|
InputProps: {
|
|
3161
|
-
startAdornment: /* @__PURE__ */
|
|
3220
|
+
startAdornment: /* @__PURE__ */ React47.createElement(import_icons13.ArrowsMoveHorizontalIcon, { fontSize: "tiny" })
|
|
3162
3221
|
}
|
|
3163
3222
|
}
|
|
3164
|
-
)), /* @__PURE__ */
|
|
3165
|
-
|
|
3223
|
+
)), /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(
|
|
3224
|
+
import_ui39.TextField,
|
|
3166
3225
|
{
|
|
3167
3226
|
size: "tiny",
|
|
3168
3227
|
type: "number",
|
|
@@ -3171,26 +3230,26 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
3171
3230
|
value: customHeight,
|
|
3172
3231
|
onChange: handleCustomHeightChange,
|
|
3173
3232
|
InputProps: {
|
|
3174
|
-
startAdornment: /* @__PURE__ */
|
|
3233
|
+
startAdornment: /* @__PURE__ */ React47.createElement(import_icons13.ArrowsMoveVerticalIcon, { fontSize: "tiny" })
|
|
3175
3234
|
}
|
|
3176
3235
|
}
|
|
3177
3236
|
)))));
|
|
3178
3237
|
});
|
|
3179
3238
|
|
|
3180
3239
|
// src/controls/svg-media-control.tsx
|
|
3181
|
-
var
|
|
3182
|
-
var
|
|
3240
|
+
var React49 = __toESM(require("react"));
|
|
3241
|
+
var import_react30 = require("react");
|
|
3183
3242
|
var import_editor_props24 = require("@elementor/editor-props");
|
|
3184
3243
|
var import_icons14 = require("@elementor/icons");
|
|
3185
|
-
var
|
|
3244
|
+
var import_ui41 = require("@elementor/ui");
|
|
3186
3245
|
var import_wp_media2 = require("@elementor/wp-media");
|
|
3187
3246
|
var import_i18n18 = require("@wordpress/i18n");
|
|
3188
3247
|
|
|
3189
3248
|
// src/components/enable-unfiltered-modal.tsx
|
|
3190
|
-
var
|
|
3191
|
-
var
|
|
3249
|
+
var React48 = __toESM(require("react"));
|
|
3250
|
+
var import_react29 = require("react");
|
|
3192
3251
|
var import_editor_current_user = require("@elementor/editor-current-user");
|
|
3193
|
-
var
|
|
3252
|
+
var import_ui40 = require("@elementor/ui");
|
|
3194
3253
|
var import_i18n17 = require("@wordpress/i18n");
|
|
3195
3254
|
var ADMIN_TITLE_TEXT = (0, import_i18n17.__)("Enable Unfiltered Uploads", "elementor");
|
|
3196
3255
|
var ADMIN_CONTENT_TEXT = (0, import_i18n17.__)(
|
|
@@ -3211,7 +3270,7 @@ var WAIT_FOR_CLOSE_TIMEOUT_MS = 300;
|
|
|
3211
3270
|
var EnableUnfilteredModal = (props) => {
|
|
3212
3271
|
const { mutateAsync, isPending } = useUpdateUnfilteredFilesUpload();
|
|
3213
3272
|
const { canUser } = (0, import_editor_current_user.useCurrentUserCapabilities)();
|
|
3214
|
-
const [isError, setIsError] = (0,
|
|
3273
|
+
const [isError, setIsError] = (0, import_react29.useState)(false);
|
|
3215
3274
|
const canManageOptions = canUser("manage_options");
|
|
3216
3275
|
const onClose = (enabled) => {
|
|
3217
3276
|
props.onClose(enabled);
|
|
@@ -3230,10 +3289,10 @@ var EnableUnfilteredModal = (props) => {
|
|
|
3230
3289
|
}
|
|
3231
3290
|
};
|
|
3232
3291
|
const dialogProps = { ...props, isPending, handleEnable, isError, onClose };
|
|
3233
|
-
return canManageOptions ? /* @__PURE__ */
|
|
3292
|
+
return canManageOptions ? /* @__PURE__ */ React48.createElement(AdminDialog, { ...dialogProps }) : /* @__PURE__ */ React48.createElement(NonAdminDialog, { ...dialogProps });
|
|
3234
3293
|
};
|
|
3235
|
-
var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @__PURE__ */
|
|
3236
|
-
|
|
3294
|
+
var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @__PURE__ */ React48.createElement(import_ui40.Dialog, { open, maxWidth: "sm", onClose: () => onClose(false) }, /* @__PURE__ */ React48.createElement(import_ui40.DialogHeader, { logo: false }, /* @__PURE__ */ React48.createElement(import_ui40.DialogTitle, null, ADMIN_TITLE_TEXT)), /* @__PURE__ */ React48.createElement(import_ui40.Divider, null), /* @__PURE__ */ React48.createElement(import_ui40.DialogContent, null, /* @__PURE__ */ React48.createElement(import_ui40.DialogContentText, null, isError ? /* @__PURE__ */ React48.createElement(React48.Fragment, null, ADMIN_FAILED_CONTENT_TEXT_PT1, " ", /* @__PURE__ */ React48.createElement("br", null), " ", ADMIN_FAILED_CONTENT_TEXT_PT2) : ADMIN_CONTENT_TEXT)), /* @__PURE__ */ React48.createElement(import_ui40.DialogActions, null, /* @__PURE__ */ React48.createElement(import_ui40.Button, { size: "medium", color: "secondary", onClick: () => onClose(false) }, (0, import_i18n17.__)("Cancel", "elementor")), /* @__PURE__ */ React48.createElement(
|
|
3295
|
+
import_ui40.Button,
|
|
3237
3296
|
{
|
|
3238
3297
|
size: "medium",
|
|
3239
3298
|
onClick: () => handleEnable(),
|
|
@@ -3241,16 +3300,16 @@ var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @_
|
|
|
3241
3300
|
color: "primary",
|
|
3242
3301
|
disabled: isPending
|
|
3243
3302
|
},
|
|
3244
|
-
isPending ? /* @__PURE__ */
|
|
3303
|
+
isPending ? /* @__PURE__ */ React48.createElement(import_ui40.CircularProgress, { size: 24 }) : (0, import_i18n17.__)("Enable", "elementor")
|
|
3245
3304
|
)));
|
|
3246
|
-
var NonAdminDialog = ({ open, onClose }) => /* @__PURE__ */
|
|
3305
|
+
var NonAdminDialog = ({ open, onClose }) => /* @__PURE__ */ React48.createElement(import_ui40.Dialog, { open, maxWidth: "sm", onClose: () => onClose(false) }, /* @__PURE__ */ React48.createElement(import_ui40.DialogHeader, { logo: false }, /* @__PURE__ */ React48.createElement(import_ui40.DialogTitle, null, NON_ADMIN_TITLE_TEXT)), /* @__PURE__ */ React48.createElement(import_ui40.Divider, null), /* @__PURE__ */ React48.createElement(import_ui40.DialogContent, null, /* @__PURE__ */ React48.createElement(import_ui40.DialogContentText, null, NON_ADMIN_CONTENT_TEXT)), /* @__PURE__ */ React48.createElement(import_ui40.DialogActions, null, /* @__PURE__ */ React48.createElement(import_ui40.Button, { size: "medium", onClick: () => onClose(false), variant: "contained", color: "primary" }, (0, import_i18n17.__)("Got it", "elementor"))));
|
|
3247
3306
|
|
|
3248
3307
|
// src/controls/svg-media-control.tsx
|
|
3249
3308
|
var TILE_SIZE = 8;
|
|
3250
3309
|
var TILE_WHITE = "transparent";
|
|
3251
3310
|
var TILE_BLACK = "#c1c1c1";
|
|
3252
3311
|
var TILES_GRADIENT_FORMULA = `linear-gradient(45deg, ${TILE_BLACK} 25%, ${TILE_WHITE} 0, ${TILE_WHITE} 75%, ${TILE_BLACK} 0, ${TILE_BLACK})`;
|
|
3253
|
-
var StyledCard = (0,
|
|
3312
|
+
var StyledCard = (0, import_ui41.styled)(import_ui41.Card)`
|
|
3254
3313
|
background-color: white;
|
|
3255
3314
|
background-image: ${TILES_GRADIENT_FORMULA}, ${TILES_GRADIENT_FORMULA};
|
|
3256
3315
|
background-size: ${TILE_SIZE}px ${TILE_SIZE}px;
|
|
@@ -3259,7 +3318,7 @@ var StyledCard = (0, import_ui40.styled)(import_ui40.Card)`
|
|
|
3259
3318
|
${TILE_SIZE / 2}px ${TILE_SIZE / 2}px;
|
|
3260
3319
|
border: none;
|
|
3261
3320
|
`;
|
|
3262
|
-
var StyledCardMediaContainer = (0,
|
|
3321
|
+
var StyledCardMediaContainer = (0, import_ui41.styled)(import_ui41.Stack)`
|
|
3263
3322
|
position: relative;
|
|
3264
3323
|
height: 140px;
|
|
3265
3324
|
object-fit: contain;
|
|
@@ -3276,7 +3335,7 @@ var SvgMediaControl = createControl(() => {
|
|
|
3276
3335
|
const { data: attachment, isFetching } = (0, import_wp_media2.useWpMediaAttachment)(id?.value || null);
|
|
3277
3336
|
const src = attachment?.url ?? url?.value ?? null;
|
|
3278
3337
|
const { data: allowSvgUpload } = useUnfilteredFilesUpload();
|
|
3279
|
-
const [unfilteredModalOpenState, setUnfilteredModalOpenState] = (0,
|
|
3338
|
+
const [unfilteredModalOpenState, setUnfilteredModalOpenState] = (0, import_react30.useState)(false);
|
|
3280
3339
|
const { open } = (0, import_wp_media2.useWpMediaFrame)({
|
|
3281
3340
|
mediaTypes: ["svg"],
|
|
3282
3341
|
multiple: false,
|
|
@@ -3304,16 +3363,16 @@ var SvgMediaControl = createControl(() => {
|
|
|
3304
3363
|
open(openOptions);
|
|
3305
3364
|
}
|
|
3306
3365
|
};
|
|
3307
|
-
return /* @__PURE__ */
|
|
3308
|
-
|
|
3366
|
+
return /* @__PURE__ */ React49.createElement(import_ui41.Stack, { gap: 1 }, /* @__PURE__ */ React49.createElement(EnableUnfilteredModal, { open: unfilteredModalOpenState, onClose: onCloseUnfilteredModal }), /* @__PURE__ */ React49.createElement(ControlActions, null, /* @__PURE__ */ React49.createElement(StyledCard, { variant: "outlined" }, /* @__PURE__ */ React49.createElement(StyledCardMediaContainer, null, isFetching ? /* @__PURE__ */ React49.createElement(import_ui41.CircularProgress, { role: "progressbar" }) : /* @__PURE__ */ React49.createElement(
|
|
3367
|
+
import_ui41.CardMedia,
|
|
3309
3368
|
{
|
|
3310
3369
|
component: "img",
|
|
3311
3370
|
image: src,
|
|
3312
3371
|
alt: (0, import_i18n18.__)("Preview SVG", "elementor"),
|
|
3313
3372
|
sx: { maxHeight: "140px", width: "50px" }
|
|
3314
3373
|
}
|
|
3315
|
-
)), /* @__PURE__ */
|
|
3316
|
-
|
|
3374
|
+
)), /* @__PURE__ */ React49.createElement(
|
|
3375
|
+
import_ui41.CardOverlay,
|
|
3317
3376
|
{
|
|
3318
3377
|
sx: {
|
|
3319
3378
|
"&:hover": {
|
|
@@ -3321,8 +3380,8 @@ var SvgMediaControl = createControl(() => {
|
|
|
3321
3380
|
}
|
|
3322
3381
|
}
|
|
3323
3382
|
},
|
|
3324
|
-
/* @__PURE__ */
|
|
3325
|
-
|
|
3383
|
+
/* @__PURE__ */ React49.createElement(import_ui41.Stack, { gap: 1 }, /* @__PURE__ */ React49.createElement(
|
|
3384
|
+
import_ui41.Button,
|
|
3326
3385
|
{
|
|
3327
3386
|
size: "tiny",
|
|
3328
3387
|
color: "inherit",
|
|
@@ -3330,13 +3389,13 @@ var SvgMediaControl = createControl(() => {
|
|
|
3330
3389
|
onClick: () => handleClick(MODE_BROWSE)
|
|
3331
3390
|
},
|
|
3332
3391
|
(0, import_i18n18.__)("Select SVG", "elementor")
|
|
3333
|
-
), /* @__PURE__ */
|
|
3334
|
-
|
|
3392
|
+
), /* @__PURE__ */ React49.createElement(
|
|
3393
|
+
import_ui41.Button,
|
|
3335
3394
|
{
|
|
3336
3395
|
size: "tiny",
|
|
3337
3396
|
variant: "text",
|
|
3338
3397
|
color: "inherit",
|
|
3339
|
-
startIcon: /* @__PURE__ */
|
|
3398
|
+
startIcon: /* @__PURE__ */ React49.createElement(import_icons14.UploadIcon, null),
|
|
3340
3399
|
onClick: () => handleClick(MODE_UPLOAD)
|
|
3341
3400
|
},
|
|
3342
3401
|
(0, import_i18n18.__)("Upload", "elementor")
|
|
@@ -3345,32 +3404,32 @@ var SvgMediaControl = createControl(() => {
|
|
|
3345
3404
|
});
|
|
3346
3405
|
|
|
3347
3406
|
// src/controls/background-control/background-control.tsx
|
|
3348
|
-
var
|
|
3407
|
+
var React69 = __toESM(require("react"));
|
|
3349
3408
|
var import_editor_props32 = require("@elementor/editor-props");
|
|
3350
|
-
var
|
|
3409
|
+
var import_ui60 = require("@elementor/ui");
|
|
3351
3410
|
var import_i18n32 = require("@wordpress/i18n");
|
|
3352
3411
|
|
|
3353
3412
|
// src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
|
|
3354
|
-
var
|
|
3413
|
+
var React68 = __toESM(require("react"));
|
|
3355
3414
|
var import_editor_props31 = require("@elementor/editor-props");
|
|
3356
|
-
var
|
|
3415
|
+
var import_ui59 = require("@elementor/ui");
|
|
3357
3416
|
var import_wp_media3 = require("@elementor/wp-media");
|
|
3358
3417
|
var import_i18n31 = require("@wordpress/i18n");
|
|
3359
3418
|
|
|
3360
3419
|
// src/components/unstable-repeater/actions/tooltip-add-item-action.tsx
|
|
3361
|
-
var
|
|
3420
|
+
var React51 = __toESM(require("react"));
|
|
3362
3421
|
var import_icons15 = require("@elementor/icons");
|
|
3363
|
-
var
|
|
3422
|
+
var import_ui43 = require("@elementor/ui");
|
|
3364
3423
|
var import_i18n19 = require("@wordpress/i18n");
|
|
3365
3424
|
|
|
3366
3425
|
// src/components/unstable-repeater/context/repeater-context.tsx
|
|
3367
|
-
var
|
|
3368
|
-
var
|
|
3369
|
-
var
|
|
3370
|
-
var RepeaterContext = (0,
|
|
3426
|
+
var React50 = __toESM(require("react"));
|
|
3427
|
+
var import_react31 = require("react");
|
|
3428
|
+
var import_ui42 = require("@elementor/ui");
|
|
3429
|
+
var RepeaterContext = (0, import_react31.createContext)(null);
|
|
3371
3430
|
var EMPTY_OPEN_ITEM2 = -1;
|
|
3372
3431
|
var useRepeaterContext = () => {
|
|
3373
|
-
const context =
|
|
3432
|
+
const context = React50.useContext(RepeaterContext);
|
|
3374
3433
|
if (!context) {
|
|
3375
3434
|
throw new Error("useRepeaterContext must be used within a RepeaterContextProvider");
|
|
3376
3435
|
}
|
|
@@ -3388,10 +3447,10 @@ var RepeaterContextProvider = ({
|
|
|
3388
3447
|
setExternal: setRepeaterValues,
|
|
3389
3448
|
persistWhen: () => true
|
|
3390
3449
|
});
|
|
3391
|
-
const [itemsWithKeys, setItemsWithKeys] = (0,
|
|
3450
|
+
const [itemsWithKeys, setItemsWithKeys] = (0, import_react31.useState)(() => {
|
|
3392
3451
|
return items2?.map((item) => ({ key: generateUniqueKey(), item })) ?? [];
|
|
3393
3452
|
});
|
|
3394
|
-
|
|
3453
|
+
React50.useEffect(() => {
|
|
3395
3454
|
setItemsWithKeys((prevItemsWithKeys) => {
|
|
3396
3455
|
const newItemsWithKeys = items2?.map((item) => {
|
|
3397
3456
|
const existingItem = prevItemsWithKeys.find((i) => i.item === item);
|
|
@@ -3403,10 +3462,10 @@ var RepeaterContextProvider = ({
|
|
|
3403
3462
|
const handleSetItems = (newItemsWithKeys) => {
|
|
3404
3463
|
setItems(newItemsWithKeys.map(({ item }) => item));
|
|
3405
3464
|
};
|
|
3406
|
-
const [openItemIndex, setOpenItemIndex] = (0,
|
|
3407
|
-
const [rowRef, setRowRef] = (0,
|
|
3465
|
+
const [openItemIndex, setOpenItemIndex] = (0, import_react31.useState)(EMPTY_OPEN_ITEM2);
|
|
3466
|
+
const [rowRef, setRowRef] = (0, import_react31.useState)(null);
|
|
3408
3467
|
const isOpen = openItemIndex !== EMPTY_OPEN_ITEM2;
|
|
3409
|
-
const popoverState = (0,
|
|
3468
|
+
const popoverState = (0, import_ui42.usePopupState)({ variant: "popover" });
|
|
3410
3469
|
const addItem = (ev, config) => {
|
|
3411
3470
|
const item = config?.item ?? initial;
|
|
3412
3471
|
const newIndex = config?.index ?? items2.length;
|
|
@@ -3423,7 +3482,7 @@ var RepeaterContextProvider = ({
|
|
|
3423
3482
|
const newItems = [...items2.slice(0, index), updatedItem, ...items2.slice(index + 1)];
|
|
3424
3483
|
setItems(newItems);
|
|
3425
3484
|
};
|
|
3426
|
-
return /* @__PURE__ */
|
|
3485
|
+
return /* @__PURE__ */ React50.createElement(
|
|
3427
3486
|
RepeaterContext.Provider,
|
|
3428
3487
|
{
|
|
3429
3488
|
value: {
|
|
@@ -3458,39 +3517,39 @@ var TooltipAddItemAction = ({
|
|
|
3458
3517
|
}) => {
|
|
3459
3518
|
const { addItem } = useRepeaterContext();
|
|
3460
3519
|
const onClick = (ev) => addItem(ev, { index: newItemIndex });
|
|
3461
|
-
return /* @__PURE__ */
|
|
3462
|
-
|
|
3520
|
+
return /* @__PURE__ */ React51.createElement(ConditionalToolTip, { content: tooltipContent, enable: enableTooltip }, /* @__PURE__ */ React51.createElement(import_ui43.Box, { sx: { ml: "auto", cursor: disabled ? "not-allowed" : "pointer" } }, /* @__PURE__ */ React51.createElement(
|
|
3521
|
+
import_ui43.IconButton,
|
|
3463
3522
|
{
|
|
3464
3523
|
size: SIZE4,
|
|
3465
3524
|
disabled,
|
|
3466
3525
|
onClick,
|
|
3467
3526
|
"aria-label": (0, import_i18n19.__)("Add item", "elementor")
|
|
3468
3527
|
},
|
|
3469
|
-
/* @__PURE__ */
|
|
3528
|
+
/* @__PURE__ */ React51.createElement(import_icons15.PlusIcon, { fontSize: SIZE4 })
|
|
3470
3529
|
)));
|
|
3471
3530
|
};
|
|
3472
3531
|
var ConditionalToolTip = ({
|
|
3473
3532
|
children,
|
|
3474
3533
|
enable,
|
|
3475
3534
|
content
|
|
3476
|
-
}) => enable && content ? /* @__PURE__ */
|
|
3535
|
+
}) => enable && content ? /* @__PURE__ */ React51.createElement(import_ui43.Infotip, { placement: "right", color: "secondary", content }, children) : children;
|
|
3477
3536
|
|
|
3478
3537
|
// src/components/unstable-repeater/header/header.tsx
|
|
3479
|
-
var
|
|
3480
|
-
var
|
|
3538
|
+
var React55 = __toESM(require("react"));
|
|
3539
|
+
var import_ui47 = require("@elementor/ui");
|
|
3481
3540
|
|
|
3482
3541
|
// src/controls/transform-control/transform-base-control.tsx
|
|
3483
|
-
var
|
|
3484
|
-
var
|
|
3542
|
+
var React54 = __toESM(require("react"));
|
|
3543
|
+
var import_react32 = require("react");
|
|
3485
3544
|
var import_editor_ui6 = require("@elementor/editor-ui");
|
|
3486
3545
|
var import_icons16 = require("@elementor/icons");
|
|
3487
|
-
var
|
|
3546
|
+
var import_ui46 = require("@elementor/ui");
|
|
3488
3547
|
var import_i18n22 = require("@wordpress/i18n");
|
|
3489
3548
|
|
|
3490
3549
|
// src/controls/transform-control/transform-base-controls/children-perspective-control.tsx
|
|
3491
|
-
var
|
|
3550
|
+
var React52 = __toESM(require("react"));
|
|
3492
3551
|
var import_editor_props25 = require("@elementor/editor-props");
|
|
3493
|
-
var
|
|
3552
|
+
var import_ui44 = require("@elementor/ui");
|
|
3494
3553
|
var import_i18n20 = require("@wordpress/i18n");
|
|
3495
3554
|
var ORIGIN_UNITS = ["px", "%", "em", "rem"];
|
|
3496
3555
|
var CHILDREN_PERSPECTIVE_FIELDS = [
|
|
@@ -3511,14 +3570,14 @@ var CHILDREN_PERSPECTIVE_FIELDS = [
|
|
|
3511
3570
|
}
|
|
3512
3571
|
];
|
|
3513
3572
|
var ChildrenPerspectiveControl = ({ rowRef }) => {
|
|
3514
|
-
return /* @__PURE__ */
|
|
3573
|
+
return /* @__PURE__ */ React52.createElement(import_ui44.Stack, { direction: "column", spacing: 1.5 }, /* @__PURE__ */ React52.createElement(ControlFormLabel, { sx: { pt: 1.5, pl: 1.5 } }, (0, import_i18n20.__)("Children perspective", "elementor")), /* @__PURE__ */ React52.createElement(import_ui44.Grid, { container: true, spacing: 1.5, ref: rowRef }, CHILDREN_PERSPECTIVE_FIELDS.map((control) => /* @__PURE__ */ React52.createElement(ControlFields, { control, rowRef, key: control.bindValue })), /* @__PURE__ */ React52.createElement(import_ui44.Divider, { sx: { py: 3 } })));
|
|
3515
3574
|
};
|
|
3516
3575
|
var ControlFields = ({
|
|
3517
3576
|
control,
|
|
3518
3577
|
rowRef
|
|
3519
3578
|
}) => {
|
|
3520
3579
|
const context = useBoundProp(import_editor_props25.sizePropTypeUtil);
|
|
3521
|
-
return /* @__PURE__ */
|
|
3580
|
+
return /* @__PURE__ */ React52.createElement(PropProvider, { ...context }, /* @__PURE__ */ React52.createElement(PropKeyProvider, { bind: control.bindValue }, /* @__PURE__ */ React52.createElement(import_ui44.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React52.createElement(import_ui44.Grid, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React52.createElement(import_ui44.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(ControlLabel, null, control.label)), /* @__PURE__ */ React52.createElement(import_ui44.Grid, { item: true, xs: 6, sx: { pr: 3 } }, /* @__PURE__ */ React52.createElement(
|
|
3522
3581
|
SizeControl,
|
|
3523
3582
|
{
|
|
3524
3583
|
variant: "length",
|
|
@@ -3530,9 +3589,9 @@ var ControlFields = ({
|
|
|
3530
3589
|
};
|
|
3531
3590
|
|
|
3532
3591
|
// src/controls/transform-control/transform-base-controls/transform-origin-control.tsx
|
|
3533
|
-
var
|
|
3592
|
+
var React53 = __toESM(require("react"));
|
|
3534
3593
|
var import_editor_props26 = require("@elementor/editor-props");
|
|
3535
|
-
var
|
|
3594
|
+
var import_ui45 = require("@elementor/ui");
|
|
3536
3595
|
var import_i18n21 = require("@wordpress/i18n");
|
|
3537
3596
|
var TRANSFORM_ORIGIN_UNITS = ["px", "%", "em", "rem"];
|
|
3538
3597
|
var TRANSFORM_ORIGIN_FIELDS = [
|
|
@@ -3553,35 +3612,35 @@ var TRANSFORM_ORIGIN_FIELDS = [
|
|
|
3553
3612
|
}
|
|
3554
3613
|
];
|
|
3555
3614
|
var TransformOriginControl = ({ rowRef }) => {
|
|
3556
|
-
return /* @__PURE__ */
|
|
3615
|
+
return /* @__PURE__ */ React53.createElement(import_ui45.Stack, { direction: "column", spacing: 1.5 }, /* @__PURE__ */ React53.createElement(ControlFormLabel, { sx: { pt: 1.5, pl: 1.5 } }, (0, import_i18n21.__)("Transform", "elementor")), /* @__PURE__ */ React53.createElement(import_ui45.Grid, { container: true, spacing: 1.5, ref: rowRef }, TRANSFORM_ORIGIN_FIELDS.map((control) => /* @__PURE__ */ React53.createElement(ControlFields2, { control, rowRef, key: control.bindValue })), /* @__PURE__ */ React53.createElement(import_ui45.Divider, { sx: { py: 3 } })));
|
|
3557
3616
|
};
|
|
3558
3617
|
var ControlFields2 = ({
|
|
3559
3618
|
control,
|
|
3560
3619
|
rowRef
|
|
3561
3620
|
}) => {
|
|
3562
3621
|
const context = useBoundProp(import_editor_props26.sizePropTypeUtil);
|
|
3563
|
-
return /* @__PURE__ */
|
|
3622
|
+
return /* @__PURE__ */ React53.createElement(PropProvider, { ...context }, /* @__PURE__ */ React53.createElement(PropKeyProvider, { bind: control.bindValue }, /* @__PURE__ */ React53.createElement(import_ui45.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React53.createElement(import_ui45.Grid, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React53.createElement(import_ui45.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React53.createElement(ControlLabel, null, control.label)), /* @__PURE__ */ React53.createElement(import_ui45.Grid, { item: true, xs: 6, sx: { pr: 3 } }, /* @__PURE__ */ React53.createElement(SizeControl, { variant: "length", units: control.units, anchorRef: rowRef, disableCustom: true }))))));
|
|
3564
3623
|
};
|
|
3565
3624
|
|
|
3566
3625
|
// src/controls/transform-control/transform-base-control.tsx
|
|
3567
3626
|
var SIZE5 = "tiny";
|
|
3568
3627
|
var TransformBaseControl = ({ anchorRef }) => {
|
|
3569
|
-
const rowRef = (0,
|
|
3570
|
-
const popupState = (0,
|
|
3571
|
-
const popupProps = (0,
|
|
3628
|
+
const rowRef = (0, import_react32.useRef)(null);
|
|
3629
|
+
const popupState = (0, import_ui46.usePopupState)({ variant: "popover" });
|
|
3630
|
+
const popupProps = (0, import_ui46.bindPopover)({
|
|
3572
3631
|
...popupState,
|
|
3573
3632
|
anchorEl: anchorRef.current ?? void 0
|
|
3574
3633
|
});
|
|
3575
|
-
return /* @__PURE__ */
|
|
3576
|
-
|
|
3634
|
+
return /* @__PURE__ */ React54.createElement(React54.Fragment, null, /* @__PURE__ */ React54.createElement(
|
|
3635
|
+
import_ui46.IconButton,
|
|
3577
3636
|
{
|
|
3578
3637
|
size: SIZE5,
|
|
3579
3638
|
"aria-label": (0, import_i18n22.__)("Base Transform", "elementor"),
|
|
3580
|
-
...(0,
|
|
3639
|
+
...(0, import_ui46.bindTrigger)(popupState)
|
|
3581
3640
|
},
|
|
3582
|
-
/* @__PURE__ */
|
|
3583
|
-
), /* @__PURE__ */
|
|
3584
|
-
|
|
3641
|
+
/* @__PURE__ */ React54.createElement(import_icons16.AdjustmentsIcon, { fontSize: SIZE5 })
|
|
3642
|
+
), /* @__PURE__ */ React54.createElement(
|
|
3643
|
+
import_ui46.Popover,
|
|
3585
3644
|
{
|
|
3586
3645
|
disablePortal: true,
|
|
3587
3646
|
slotProps: {
|
|
@@ -3593,26 +3652,26 @@ var TransformBaseControl = ({ anchorRef }) => {
|
|
|
3593
3652
|
},
|
|
3594
3653
|
...popupProps
|
|
3595
3654
|
},
|
|
3596
|
-
/* @__PURE__ */
|
|
3655
|
+
/* @__PURE__ */ React54.createElement(
|
|
3597
3656
|
import_editor_ui6.PopoverHeader,
|
|
3598
3657
|
{
|
|
3599
3658
|
title: (0, import_i18n22.__)("Base Transform", "elementor"),
|
|
3600
3659
|
onClose: popupState.close,
|
|
3601
|
-
icon: /* @__PURE__ */
|
|
3660
|
+
icon: /* @__PURE__ */ React54.createElement(import_icons16.AdjustmentsIcon, { fontSize: SIZE5 })
|
|
3602
3661
|
}
|
|
3603
3662
|
),
|
|
3604
|
-
/* @__PURE__ */
|
|
3605
|
-
/* @__PURE__ */
|
|
3606
|
-
/* @__PURE__ */
|
|
3607
|
-
/* @__PURE__ */
|
|
3663
|
+
/* @__PURE__ */ React54.createElement(import_ui46.Divider, null),
|
|
3664
|
+
/* @__PURE__ */ React54.createElement(TransformOriginControl, { rowRef }),
|
|
3665
|
+
/* @__PURE__ */ React54.createElement(import_ui46.Divider, null),
|
|
3666
|
+
/* @__PURE__ */ React54.createElement(ChildrenPerspectiveControl, { rowRef })
|
|
3608
3667
|
));
|
|
3609
3668
|
};
|
|
3610
3669
|
|
|
3611
3670
|
// src/components/unstable-repeater/header/header.tsx
|
|
3612
3671
|
var Header = ({ label, children }) => {
|
|
3613
3672
|
const { value } = useBoundProp();
|
|
3614
|
-
return /* @__PURE__ */
|
|
3615
|
-
|
|
3673
|
+
return /* @__PURE__ */ React55.createElement(
|
|
3674
|
+
import_ui47.Stack,
|
|
3616
3675
|
{
|
|
3617
3676
|
direction: "row",
|
|
3618
3677
|
justifyContent: "start",
|
|
@@ -3620,15 +3679,15 @@ var Header = ({ label, children }) => {
|
|
|
3620
3679
|
gap: 1,
|
|
3621
3680
|
sx: { marginInlineEnd: -0.75, py: 0.25 }
|
|
3622
3681
|
},
|
|
3623
|
-
/* @__PURE__ */
|
|
3624
|
-
/* @__PURE__ */
|
|
3625
|
-
/* @__PURE__ */
|
|
3626
|
-
/* @__PURE__ */
|
|
3682
|
+
/* @__PURE__ */ React55.createElement(import_ui47.Typography, { component: "label", variant: "caption", color: "text.secondary", sx: { lineHeight: 1 } }, label),
|
|
3683
|
+
/* @__PURE__ */ React55.createElement(ControlAdornments, null),
|
|
3684
|
+
/* @__PURE__ */ React55.createElement(RepeaterHeaderActionsSlot, { value }),
|
|
3685
|
+
/* @__PURE__ */ React55.createElement(import_ui47.Box, { sx: { ml: "auto" } }, /* @__PURE__ */ React55.createElement(SlotChildren, { whitelist: [TransformBaseControl, TooltipAddItemAction], sorted: true }, children))
|
|
3627
3686
|
);
|
|
3628
3687
|
};
|
|
3629
3688
|
|
|
3630
3689
|
// src/components/unstable-repeater/items/items-container.tsx
|
|
3631
|
-
var
|
|
3690
|
+
var React56 = __toESM(require("react"));
|
|
3632
3691
|
var ItemsContainer = ({
|
|
3633
3692
|
itemTemplate,
|
|
3634
3693
|
isSortable = true,
|
|
@@ -3647,9 +3706,9 @@ var ItemsContainer = ({
|
|
|
3647
3706
|
})
|
|
3648
3707
|
);
|
|
3649
3708
|
};
|
|
3650
|
-
return /* @__PURE__ */
|
|
3709
|
+
return /* @__PURE__ */ React56.createElement(React56.Fragment, null, /* @__PURE__ */ React56.createElement(SortableProvider, { value: keys, onChange: onChangeOrder }, keys.map((key, index) => {
|
|
3651
3710
|
const value = items2[index].item;
|
|
3652
|
-
return /* @__PURE__ */
|
|
3711
|
+
return /* @__PURE__ */ React56.createElement(SortableItem, { id: key, key: `sortable-${key}`, disabled: !isSortable }, React56.isValidElement(itemTemplate) ? React56.cloneElement(itemTemplate, {
|
|
3653
3712
|
key,
|
|
3654
3713
|
value,
|
|
3655
3714
|
index,
|
|
@@ -3659,14 +3718,14 @@ var ItemsContainer = ({
|
|
|
3659
3718
|
};
|
|
3660
3719
|
|
|
3661
3720
|
// src/components/unstable-repeater/items/item.tsx
|
|
3662
|
-
var
|
|
3663
|
-
var
|
|
3721
|
+
var React60 = __toESM(require("react"));
|
|
3722
|
+
var import_ui51 = require("@elementor/ui");
|
|
3664
3723
|
var import_i18n26 = require("@wordpress/i18n");
|
|
3665
3724
|
|
|
3666
3725
|
// src/components/unstable-repeater/actions/disable-item-action.tsx
|
|
3667
|
-
var
|
|
3726
|
+
var React57 = __toESM(require("react"));
|
|
3668
3727
|
var import_icons17 = require("@elementor/icons");
|
|
3669
|
-
var
|
|
3728
|
+
var import_ui48 = require("@elementor/ui");
|
|
3670
3729
|
var import_i18n23 = require("@wordpress/i18n");
|
|
3671
3730
|
var SIZE6 = "tiny";
|
|
3672
3731
|
var DisableItemAction = ({ index = -1 }) => {
|
|
@@ -3684,13 +3743,13 @@ var DisableItemAction = ({ index = -1 }) => {
|
|
|
3684
3743
|
}
|
|
3685
3744
|
updateItem(self, index);
|
|
3686
3745
|
};
|
|
3687
|
-
return /* @__PURE__ */
|
|
3746
|
+
return /* @__PURE__ */ React57.createElement(import_ui48.Tooltip, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React57.createElement(import_ui48.IconButton, { size: SIZE6, onClick, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React57.createElement(import_icons17.EyeOffIcon, { fontSize: SIZE6 }) : /* @__PURE__ */ React57.createElement(import_icons17.EyeIcon, { fontSize: SIZE6 })));
|
|
3688
3747
|
};
|
|
3689
3748
|
|
|
3690
3749
|
// src/components/unstable-repeater/actions/duplicate-item-action.tsx
|
|
3691
|
-
var
|
|
3750
|
+
var React58 = __toESM(require("react"));
|
|
3692
3751
|
var import_icons18 = require("@elementor/icons");
|
|
3693
|
-
var
|
|
3752
|
+
var import_ui49 = require("@elementor/ui");
|
|
3694
3753
|
var import_i18n24 = require("@wordpress/i18n");
|
|
3695
3754
|
var SIZE7 = "tiny";
|
|
3696
3755
|
var DuplicateItemAction = ({ index = -1 }) => {
|
|
@@ -3703,13 +3762,13 @@ var DuplicateItemAction = ({ index = -1 }) => {
|
|
|
3703
3762
|
const newItem = structuredClone(items2[index]?.item);
|
|
3704
3763
|
addItem(ev, { item: newItem, index: index + 1 });
|
|
3705
3764
|
};
|
|
3706
|
-
return /* @__PURE__ */
|
|
3765
|
+
return /* @__PURE__ */ React58.createElement(import_ui49.Tooltip, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React58.createElement(import_ui49.IconButton, { size: SIZE7, onClick, "aria-label": duplicateLabel }, /* @__PURE__ */ React58.createElement(import_icons18.CopyIcon, { fontSize: SIZE7 })));
|
|
3707
3766
|
};
|
|
3708
3767
|
|
|
3709
3768
|
// src/components/unstable-repeater/actions/remove-item-action.tsx
|
|
3710
|
-
var
|
|
3769
|
+
var React59 = __toESM(require("react"));
|
|
3711
3770
|
var import_icons19 = require("@elementor/icons");
|
|
3712
|
-
var
|
|
3771
|
+
var import_ui50 = require("@elementor/ui");
|
|
3713
3772
|
var import_i18n25 = require("@wordpress/i18n");
|
|
3714
3773
|
var SIZE8 = "tiny";
|
|
3715
3774
|
var RemoveItemAction = ({ index = -1 }) => {
|
|
@@ -3719,7 +3778,7 @@ var RemoveItemAction = ({ index = -1 }) => {
|
|
|
3719
3778
|
}
|
|
3720
3779
|
const removeLabel = (0, import_i18n25.__)("Remove", "elementor");
|
|
3721
3780
|
const onClick = () => removeItem(index);
|
|
3722
|
-
return /* @__PURE__ */
|
|
3781
|
+
return /* @__PURE__ */ React59.createElement(import_ui50.Tooltip, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React59.createElement(import_ui50.IconButton, { size: SIZE8, onClick, "aria-label": removeLabel }, /* @__PURE__ */ React59.createElement(import_icons19.XIcon, { fontSize: SIZE8 })));
|
|
3723
3782
|
};
|
|
3724
3783
|
|
|
3725
3784
|
// src/components/unstable-repeater/items/item.tsx
|
|
@@ -3731,18 +3790,18 @@ var Item = ({
|
|
|
3731
3790
|
children
|
|
3732
3791
|
}) => {
|
|
3733
3792
|
const { items: items2, popoverState, setRowRef, openItemIndex, setOpenItemIndex } = useRepeaterContext();
|
|
3734
|
-
const triggerProps = (0,
|
|
3793
|
+
const triggerProps = (0, import_ui51.bindTrigger)(popoverState);
|
|
3735
3794
|
const key = items2[index].key ?? -1;
|
|
3736
3795
|
const onClick = (ev) => {
|
|
3737
3796
|
triggerProps.onClick(ev);
|
|
3738
3797
|
setOpenItemIndex(index);
|
|
3739
3798
|
};
|
|
3740
|
-
return /* @__PURE__ */
|
|
3741
|
-
|
|
3799
|
+
return /* @__PURE__ */ React60.createElement(React60.Fragment, null, /* @__PURE__ */ React60.createElement(
|
|
3800
|
+
import_ui51.UnstableTag,
|
|
3742
3801
|
{
|
|
3743
3802
|
key,
|
|
3744
3803
|
disabled: false,
|
|
3745
|
-
label: /* @__PURE__ */
|
|
3804
|
+
label: /* @__PURE__ */ React60.createElement(RepeaterItemLabelSlot, { value }, /* @__PURE__ */ React60.createElement(Label3, { value })),
|
|
3746
3805
|
showActionsOnHover: true,
|
|
3747
3806
|
fullWidth: true,
|
|
3748
3807
|
ref: (ref) => ref && openItemIndex === index && setRowRef(ref),
|
|
@@ -3751,8 +3810,8 @@ var Item = ({
|
|
|
3751
3810
|
sx: { minHeight: (theme) => theme.spacing(4) },
|
|
3752
3811
|
...triggerProps,
|
|
3753
3812
|
onClick,
|
|
3754
|
-
startIcon: /* @__PURE__ */
|
|
3755
|
-
actions: /* @__PURE__ */
|
|
3813
|
+
startIcon: /* @__PURE__ */ React60.createElement(RepeaterItemIconSlot, { value }, /* @__PURE__ */ React60.createElement(Icon, { value })),
|
|
3814
|
+
actions: /* @__PURE__ */ React60.createElement(React60.Fragment, null, /* @__PURE__ */ React60.createElement(RepeaterItemActionsSlot, { index: index ?? -1 }), /* @__PURE__ */ React60.createElement(
|
|
3756
3815
|
SlotChildren,
|
|
3757
3816
|
{
|
|
3758
3817
|
whitelist: [DuplicateItemAction, DisableItemAction, RemoveItemAction],
|
|
@@ -3766,14 +3825,14 @@ var Item = ({
|
|
|
3766
3825
|
};
|
|
3767
3826
|
|
|
3768
3827
|
// src/components/unstable-repeater/unstable-repeater.tsx
|
|
3769
|
-
var
|
|
3828
|
+
var React62 = __toESM(require("react"));
|
|
3770
3829
|
|
|
3771
3830
|
// src/components/unstable-repeater/items/edit-item-popover.tsx
|
|
3772
|
-
var
|
|
3773
|
-
var
|
|
3831
|
+
var React61 = __toESM(require("react"));
|
|
3832
|
+
var import_ui52 = require("@elementor/ui");
|
|
3774
3833
|
var EditItemPopover = ({ children }) => {
|
|
3775
3834
|
const { popoverState, openItemIndex, isOpen, rowRef, setOpenItemIndex, setRowRef, items: items2 } = useRepeaterContext();
|
|
3776
|
-
const popoverProps = (0,
|
|
3835
|
+
const popoverProps = (0, import_ui52.bindPopover)(popoverState);
|
|
3777
3836
|
if (!isOpen || !rowRef) {
|
|
3778
3837
|
return null;
|
|
3779
3838
|
}
|
|
@@ -3783,8 +3842,8 @@ var EditItemPopover = ({ children }) => {
|
|
|
3783
3842
|
setRowRef(null);
|
|
3784
3843
|
setOpenItemIndex(EMPTY_OPEN_ITEM2);
|
|
3785
3844
|
};
|
|
3786
|
-
return /* @__PURE__ */
|
|
3787
|
-
|
|
3845
|
+
return /* @__PURE__ */ React61.createElement(
|
|
3846
|
+
import_ui52.Popover,
|
|
3788
3847
|
{
|
|
3789
3848
|
disablePortal: true,
|
|
3790
3849
|
slotProps: {
|
|
@@ -3797,7 +3856,7 @@ var EditItemPopover = ({ children }) => {
|
|
|
3797
3856
|
anchorEl: rowRef,
|
|
3798
3857
|
onClose
|
|
3799
3858
|
},
|
|
3800
|
-
/* @__PURE__ */
|
|
3859
|
+
/* @__PURE__ */ React61.createElement(PropKeyProvider, { bind: String(openItemIndex) }, /* @__PURE__ */ React61.createElement(import_ui52.Box, null, React61.isValidElement(children) && React61.cloneElement(children, { bind, index: openItemIndex })))
|
|
3801
3860
|
);
|
|
3802
3861
|
};
|
|
3803
3862
|
|
|
@@ -3807,7 +3866,7 @@ var UnstableRepeater = ({
|
|
|
3807
3866
|
initial,
|
|
3808
3867
|
propTypeUtil
|
|
3809
3868
|
}) => {
|
|
3810
|
-
return /* @__PURE__ */
|
|
3869
|
+
return /* @__PURE__ */ React62.createElement(SectionContent, null, /* @__PURE__ */ React62.createElement(RepeaterContextProvider, { initial, propTypeUtil }, /* @__PURE__ */ React62.createElement(SlotChildren, { whitelist: [Header, ItemsContainer, EditItemPopover], sorted: true }, children)));
|
|
3811
3870
|
};
|
|
3812
3871
|
|
|
3813
3872
|
// src/env.ts
|
|
@@ -3815,9 +3874,9 @@ var import_env = require("@elementor/env");
|
|
|
3815
3874
|
var { env } = (0, import_env.parseEnv)("@elementor/editor-controls");
|
|
3816
3875
|
|
|
3817
3876
|
// src/controls/background-control/background-gradient-color-control.tsx
|
|
3818
|
-
var
|
|
3877
|
+
var React63 = __toESM(require("react"));
|
|
3819
3878
|
var import_editor_props27 = require("@elementor/editor-props");
|
|
3820
|
-
var
|
|
3879
|
+
var import_ui53 = require("@elementor/ui");
|
|
3821
3880
|
var BackgroundGradientColorControl = createControl(() => {
|
|
3822
3881
|
const { value, setValue } = useBoundProp(import_editor_props27.backgroundGradientOverlayPropTypeUtil);
|
|
3823
3882
|
const handleChange = (newValue) => {
|
|
@@ -3855,8 +3914,8 @@ var BackgroundGradientColorControl = createControl(() => {
|
|
|
3855
3914
|
positions: positions?.value.split(" ")
|
|
3856
3915
|
};
|
|
3857
3916
|
};
|
|
3858
|
-
return /* @__PURE__ */
|
|
3859
|
-
|
|
3917
|
+
return /* @__PURE__ */ React63.createElement(ControlActions, null, /* @__PURE__ */ React63.createElement(
|
|
3918
|
+
import_ui53.UnstableGradientBox,
|
|
3860
3919
|
{
|
|
3861
3920
|
sx: { width: "auto", padding: 1.5 },
|
|
3862
3921
|
value: normalizeValue(),
|
|
@@ -3880,35 +3939,35 @@ var initialBackgroundGradientOverlay = import_editor_props27.backgroundGradientO
|
|
|
3880
3939
|
});
|
|
3881
3940
|
|
|
3882
3941
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-attachment.tsx
|
|
3883
|
-
var
|
|
3942
|
+
var React64 = __toESM(require("react"));
|
|
3884
3943
|
var import_icons20 = require("@elementor/icons");
|
|
3885
|
-
var
|
|
3944
|
+
var import_ui54 = require("@elementor/ui");
|
|
3886
3945
|
var import_i18n27 = require("@wordpress/i18n");
|
|
3887
3946
|
var attachmentControlOptions = [
|
|
3888
3947
|
{
|
|
3889
3948
|
value: "fixed",
|
|
3890
3949
|
label: (0, import_i18n27.__)("Fixed", "elementor"),
|
|
3891
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3950
|
+
renderContent: ({ size }) => /* @__PURE__ */ React64.createElement(import_icons20.PinIcon, { fontSize: size }),
|
|
3892
3951
|
showTooltip: true
|
|
3893
3952
|
},
|
|
3894
3953
|
{
|
|
3895
3954
|
value: "scroll",
|
|
3896
3955
|
label: (0, import_i18n27.__)("Scroll", "elementor"),
|
|
3897
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3956
|
+
renderContent: ({ size }) => /* @__PURE__ */ React64.createElement(import_icons20.PinnedOffIcon, { fontSize: size }),
|
|
3898
3957
|
showTooltip: true
|
|
3899
3958
|
}
|
|
3900
3959
|
];
|
|
3901
3960
|
var BackgroundImageOverlayAttachment = () => {
|
|
3902
|
-
return /* @__PURE__ */
|
|
3961
|
+
return /* @__PURE__ */ React64.createElement(PopoverGridContainer, null, /* @__PURE__ */ React64.createElement(import_ui54.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React64.createElement(ControlFormLabel, null, (0, import_i18n27.__)("Attachment", "elementor"))), /* @__PURE__ */ React64.createElement(import_ui54.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React64.createElement(ToggleControl, { options: attachmentControlOptions })));
|
|
3903
3962
|
};
|
|
3904
3963
|
|
|
3905
3964
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx
|
|
3906
|
-
var
|
|
3907
|
-
var
|
|
3965
|
+
var React65 = __toESM(require("react"));
|
|
3966
|
+
var import_react33 = require("react");
|
|
3908
3967
|
var import_editor_props28 = require("@elementor/editor-props");
|
|
3909
3968
|
var import_editor_ui7 = require("@elementor/editor-ui");
|
|
3910
3969
|
var import_icons21 = require("@elementor/icons");
|
|
3911
|
-
var
|
|
3970
|
+
var import_ui55 = require("@elementor/ui");
|
|
3912
3971
|
var import_i18n28 = require("@wordpress/i18n");
|
|
3913
3972
|
var backgroundPositionOptions = [
|
|
3914
3973
|
{ label: (0, import_i18n28.__)("Center center", "elementor"), value: "center center" },
|
|
@@ -3926,7 +3985,7 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
3926
3985
|
const backgroundImageOffsetContext = useBoundProp(import_editor_props28.backgroundImagePositionOffsetPropTypeUtil);
|
|
3927
3986
|
const stringPropContext = useBoundProp(import_editor_props28.stringPropTypeUtil);
|
|
3928
3987
|
const isCustom = !!backgroundImageOffsetContext.value;
|
|
3929
|
-
const rowRef = (0,
|
|
3988
|
+
const rowRef = (0, import_react33.useRef)(null);
|
|
3930
3989
|
const handlePositionChange = (event) => {
|
|
3931
3990
|
const value = event.target.value || null;
|
|
3932
3991
|
if (value === "custom") {
|
|
@@ -3935,8 +3994,8 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
3935
3994
|
stringPropContext.setValue(value);
|
|
3936
3995
|
}
|
|
3937
3996
|
};
|
|
3938
|
-
return /* @__PURE__ */
|
|
3939
|
-
|
|
3997
|
+
return /* @__PURE__ */ React65.createElement(import_ui55.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React65.createElement(import_ui55.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React65.createElement(PopoverGridContainer, null, /* @__PURE__ */ React65.createElement(import_ui55.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React65.createElement(ControlFormLabel, null, (0, import_i18n28.__)("Position", "elementor"))), /* @__PURE__ */ React65.createElement(import_ui55.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React65.createElement(
|
|
3998
|
+
import_ui55.Select,
|
|
3940
3999
|
{
|
|
3941
4000
|
fullWidth: true,
|
|
3942
4001
|
size: "tiny",
|
|
@@ -3944,87 +4003,89 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
3944
4003
|
disabled: stringPropContext.disabled,
|
|
3945
4004
|
value: (backgroundImageOffsetContext.value ? "custom" : stringPropContext.value) ?? ""
|
|
3946
4005
|
},
|
|
3947
|
-
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */
|
|
3948
|
-
)))), isCustom ? /* @__PURE__ */
|
|
4006
|
+
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */ React65.createElement(import_editor_ui7.MenuListItem, { key: value, value: value ?? "" }, label))
|
|
4007
|
+
)))), isCustom ? /* @__PURE__ */ React65.createElement(PropProvider, { ...backgroundImageOffsetContext }, /* @__PURE__ */ React65.createElement(import_ui55.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React65.createElement(import_ui55.Grid, { container: true, spacing: 1.5, ref: rowRef }, /* @__PURE__ */ React65.createElement(import_ui55.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React65.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React65.createElement(
|
|
3949
4008
|
SizeControl,
|
|
3950
4009
|
{
|
|
3951
|
-
startIcon: /* @__PURE__ */
|
|
3952
|
-
anchorRef: rowRef
|
|
4010
|
+
startIcon: /* @__PURE__ */ React65.createElement(import_icons21.LetterXIcon, { fontSize: "tiny" }),
|
|
4011
|
+
anchorRef: rowRef,
|
|
4012
|
+
min: -Number.MAX_SAFE_INTEGER
|
|
3953
4013
|
}
|
|
3954
|
-
))), /* @__PURE__ */
|
|
4014
|
+
))), /* @__PURE__ */ React65.createElement(import_ui55.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React65.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React65.createElement(
|
|
3955
4015
|
SizeControl,
|
|
3956
4016
|
{
|
|
3957
|
-
startIcon: /* @__PURE__ */
|
|
3958
|
-
anchorRef: rowRef
|
|
4017
|
+
startIcon: /* @__PURE__ */ React65.createElement(import_icons21.LetterYIcon, { fontSize: "tiny" }),
|
|
4018
|
+
anchorRef: rowRef,
|
|
4019
|
+
min: -Number.MAX_SAFE_INTEGER
|
|
3959
4020
|
}
|
|
3960
4021
|
)))))) : null);
|
|
3961
4022
|
};
|
|
3962
4023
|
|
|
3963
4024
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-repeat.tsx
|
|
3964
|
-
var
|
|
4025
|
+
var React66 = __toESM(require("react"));
|
|
3965
4026
|
var import_icons22 = require("@elementor/icons");
|
|
3966
|
-
var
|
|
4027
|
+
var import_ui56 = require("@elementor/ui");
|
|
3967
4028
|
var import_i18n29 = require("@wordpress/i18n");
|
|
3968
4029
|
var repeatControlOptions = [
|
|
3969
4030
|
{
|
|
3970
4031
|
value: "repeat",
|
|
3971
4032
|
label: (0, import_i18n29.__)("Repeat", "elementor"),
|
|
3972
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4033
|
+
renderContent: ({ size }) => /* @__PURE__ */ React66.createElement(import_icons22.GridDotsIcon, { fontSize: size }),
|
|
3973
4034
|
showTooltip: true
|
|
3974
4035
|
},
|
|
3975
4036
|
{
|
|
3976
4037
|
value: "repeat-x",
|
|
3977
4038
|
label: (0, import_i18n29.__)("Repeat-x", "elementor"),
|
|
3978
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4039
|
+
renderContent: ({ size }) => /* @__PURE__ */ React66.createElement(import_icons22.DotsHorizontalIcon, { fontSize: size }),
|
|
3979
4040
|
showTooltip: true
|
|
3980
4041
|
},
|
|
3981
4042
|
{
|
|
3982
4043
|
value: "repeat-y",
|
|
3983
4044
|
label: (0, import_i18n29.__)("Repeat-y", "elementor"),
|
|
3984
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4045
|
+
renderContent: ({ size }) => /* @__PURE__ */ React66.createElement(import_icons22.DotsVerticalIcon, { fontSize: size }),
|
|
3985
4046
|
showTooltip: true
|
|
3986
4047
|
},
|
|
3987
4048
|
{
|
|
3988
4049
|
value: "no-repeat",
|
|
3989
4050
|
label: (0, import_i18n29.__)("No-repeat", "elementor"),
|
|
3990
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4051
|
+
renderContent: ({ size }) => /* @__PURE__ */ React66.createElement(import_icons22.XIcon, { fontSize: size }),
|
|
3991
4052
|
showTooltip: true
|
|
3992
4053
|
}
|
|
3993
4054
|
];
|
|
3994
4055
|
var BackgroundImageOverlayRepeat = () => {
|
|
3995
|
-
return /* @__PURE__ */
|
|
4056
|
+
return /* @__PURE__ */ React66.createElement(PopoverGridContainer, null, /* @__PURE__ */ React66.createElement(import_ui56.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React66.createElement(ControlFormLabel, null, (0, import_i18n29.__)("Repeat", "elementor"))), /* @__PURE__ */ React66.createElement(import_ui56.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React66.createElement(ToggleControl, { options: repeatControlOptions })));
|
|
3996
4057
|
};
|
|
3997
4058
|
|
|
3998
4059
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx
|
|
3999
|
-
var
|
|
4000
|
-
var
|
|
4060
|
+
var React67 = __toESM(require("react"));
|
|
4061
|
+
var import_react34 = require("react");
|
|
4001
4062
|
var import_editor_props29 = require("@elementor/editor-props");
|
|
4002
4063
|
var import_icons23 = require("@elementor/icons");
|
|
4003
|
-
var
|
|
4064
|
+
var import_ui57 = require("@elementor/ui");
|
|
4004
4065
|
var import_i18n30 = require("@wordpress/i18n");
|
|
4005
4066
|
var sizeControlOptions = [
|
|
4006
4067
|
{
|
|
4007
4068
|
value: "auto",
|
|
4008
4069
|
label: (0, import_i18n30.__)("Auto", "elementor"),
|
|
4009
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4070
|
+
renderContent: ({ size }) => /* @__PURE__ */ React67.createElement(import_icons23.LetterAIcon, { fontSize: size }),
|
|
4010
4071
|
showTooltip: true
|
|
4011
4072
|
},
|
|
4012
4073
|
{
|
|
4013
4074
|
value: "cover",
|
|
4014
4075
|
label: (0, import_i18n30.__)("Cover", "elementor"),
|
|
4015
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4076
|
+
renderContent: ({ size }) => /* @__PURE__ */ React67.createElement(import_icons23.ArrowsMaximizeIcon, { fontSize: size }),
|
|
4016
4077
|
showTooltip: true
|
|
4017
4078
|
},
|
|
4018
4079
|
{
|
|
4019
4080
|
value: "contain",
|
|
4020
4081
|
label: (0, import_i18n30.__)("Contain", "elementor"),
|
|
4021
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4082
|
+
renderContent: ({ size }) => /* @__PURE__ */ React67.createElement(import_icons23.ArrowBarBothIcon, { fontSize: size }),
|
|
4022
4083
|
showTooltip: true
|
|
4023
4084
|
},
|
|
4024
4085
|
{
|
|
4025
4086
|
value: "custom",
|
|
4026
4087
|
label: (0, import_i18n30.__)("Custom", "elementor"),
|
|
4027
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4088
|
+
renderContent: ({ size }) => /* @__PURE__ */ React67.createElement(import_icons23.PencilIcon, { fontSize: size }),
|
|
4028
4089
|
showTooltip: true
|
|
4029
4090
|
}
|
|
4030
4091
|
];
|
|
@@ -4032,7 +4093,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
4032
4093
|
const backgroundImageScaleContext = useBoundProp(import_editor_props29.backgroundImageSizeScalePropTypeUtil);
|
|
4033
4094
|
const stringPropContext = useBoundProp(import_editor_props29.stringPropTypeUtil);
|
|
4034
4095
|
const isCustom = !!backgroundImageScaleContext.value;
|
|
4035
|
-
const rowRef = (0,
|
|
4096
|
+
const rowRef = (0, import_react34.useRef)(null);
|
|
4036
4097
|
const handleSizeChange = (size) => {
|
|
4037
4098
|
if (size === "custom") {
|
|
4038
4099
|
backgroundImageScaleContext.setValue({ width: null, height: null });
|
|
@@ -4040,7 +4101,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
4040
4101
|
stringPropContext.setValue(size);
|
|
4041
4102
|
}
|
|
4042
4103
|
};
|
|
4043
|
-
return /* @__PURE__ */
|
|
4104
|
+
return /* @__PURE__ */ React67.createElement(import_ui57.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React67.createElement(import_ui57.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React67.createElement(PopoverGridContainer, null, /* @__PURE__ */ React67.createElement(import_ui57.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React67.createElement(ControlFormLabel, null, (0, import_i18n30.__)("Size", "elementor"))), /* @__PURE__ */ React67.createElement(import_ui57.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React67.createElement(
|
|
4044
4105
|
ControlToggleButtonGroup,
|
|
4045
4106
|
{
|
|
4046
4107
|
exclusive: true,
|
|
@@ -4049,17 +4110,17 @@ var BackgroundImageOverlaySize = () => {
|
|
|
4049
4110
|
disabled: stringPropContext.disabled,
|
|
4050
4111
|
value: backgroundImageScaleContext.value ? "custom" : stringPropContext.value
|
|
4051
4112
|
}
|
|
4052
|
-
)))), isCustom ? /* @__PURE__ */
|
|
4113
|
+
)))), isCustom ? /* @__PURE__ */ React67.createElement(PropProvider, { ...backgroundImageScaleContext }, /* @__PURE__ */ React67.createElement(import_ui57.Grid, { item: true, xs: 12, ref: rowRef }, /* @__PURE__ */ React67.createElement(PopoverGridContainer, null, /* @__PURE__ */ React67.createElement(import_ui57.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React67.createElement(PropKeyProvider, { bind: "width" }, /* @__PURE__ */ React67.createElement(
|
|
4053
4114
|
SizeControl,
|
|
4054
4115
|
{
|
|
4055
|
-
startIcon: /* @__PURE__ */
|
|
4116
|
+
startIcon: /* @__PURE__ */ React67.createElement(import_icons23.ArrowsMoveHorizontalIcon, { fontSize: "tiny" }),
|
|
4056
4117
|
extendedOptions: ["auto"],
|
|
4057
4118
|
anchorRef: rowRef
|
|
4058
4119
|
}
|
|
4059
|
-
))), /* @__PURE__ */
|
|
4120
|
+
))), /* @__PURE__ */ React67.createElement(import_ui57.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React67.createElement(PropKeyProvider, { bind: "height" }, /* @__PURE__ */ React67.createElement(
|
|
4060
4121
|
SizeControl,
|
|
4061
4122
|
{
|
|
4062
|
-
startIcon: /* @__PURE__ */
|
|
4123
|
+
startIcon: /* @__PURE__ */ React67.createElement(import_icons23.ArrowsMoveVerticalIcon, { fontSize: "tiny" }),
|
|
4063
4124
|
extendedOptions: ["auto"],
|
|
4064
4125
|
anchorRef: rowRef
|
|
4065
4126
|
}
|
|
@@ -4067,9 +4128,9 @@ var BackgroundImageOverlaySize = () => {
|
|
|
4067
4128
|
};
|
|
4068
4129
|
|
|
4069
4130
|
// src/controls/background-control/background-overlay/use-background-tabs-history.ts
|
|
4070
|
-
var
|
|
4131
|
+
var import_react35 = require("react");
|
|
4071
4132
|
var import_editor_props30 = require("@elementor/editor-props");
|
|
4072
|
-
var
|
|
4133
|
+
var import_ui58 = require("@elementor/ui");
|
|
4073
4134
|
var useBackgroundTabsHistory = ({
|
|
4074
4135
|
color: initialBackgroundColorOverlay2,
|
|
4075
4136
|
image: initialBackgroundImageOverlay,
|
|
@@ -4087,8 +4148,8 @@ var useBackgroundTabsHistory = ({
|
|
|
4087
4148
|
}
|
|
4088
4149
|
return "image";
|
|
4089
4150
|
};
|
|
4090
|
-
const { getTabsProps, getTabProps, getTabPanelProps } = (0,
|
|
4091
|
-
const valuesHistory = (0,
|
|
4151
|
+
const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui58.useTabs)(getCurrentOverlayType());
|
|
4152
|
+
const valuesHistory = (0, import_react35.useRef)({
|
|
4092
4153
|
image: initialBackgroundImageOverlay,
|
|
4093
4154
|
color: initialBackgroundColorOverlay2,
|
|
4094
4155
|
gradient: initialBackgroundGradientOverlay2
|
|
@@ -4163,15 +4224,15 @@ var backgroundResolutionOptions = [
|
|
|
4163
4224
|
];
|
|
4164
4225
|
var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
4165
4226
|
const { propType, value: overlayValues, setValue } = useBoundProp(import_editor_props31.backgroundOverlayPropTypeUtil);
|
|
4166
|
-
return /* @__PURE__ */
|
|
4227
|
+
return /* @__PURE__ */ React68.createElement(PropProvider, { propType, value: overlayValues, setValue }, /* @__PURE__ */ React68.createElement(
|
|
4167
4228
|
UnstableRepeater,
|
|
4168
4229
|
{
|
|
4169
4230
|
initial: getInitialBackgroundOverlay(),
|
|
4170
4231
|
propTypeUtil: import_editor_props31.backgroundOverlayPropTypeUtil
|
|
4171
4232
|
},
|
|
4172
|
-
/* @__PURE__ */
|
|
4173
|
-
/* @__PURE__ */
|
|
4174
|
-
/* @__PURE__ */
|
|
4233
|
+
/* @__PURE__ */ React68.createElement(Header, { label: (0, import_i18n31.__)("Overlay", "elementor") }, /* @__PURE__ */ React68.createElement(TooltipAddItemAction, { newItemIndex: 0 })),
|
|
4234
|
+
/* @__PURE__ */ React68.createElement(ItemsContainer, { itemTemplate: /* @__PURE__ */ React68.createElement(Item, { Icon: ItemIcon3, Label: ItemLabel3 }) }, /* @__PURE__ */ React68.createElement(DuplicateItemAction, null), /* @__PURE__ */ React68.createElement(DisableItemAction, null), /* @__PURE__ */ React68.createElement(RemoveItemAction, null)),
|
|
4235
|
+
/* @__PURE__ */ React68.createElement(EditItemPopover, null, /* @__PURE__ */ React68.createElement(ItemContent3, null))
|
|
4175
4236
|
));
|
|
4176
4237
|
});
|
|
4177
4238
|
var ItemContent3 = () => {
|
|
@@ -4181,27 +4242,27 @@ var ItemContent3 = () => {
|
|
|
4181
4242
|
gradient: initialBackgroundGradientOverlay.value
|
|
4182
4243
|
});
|
|
4183
4244
|
const { rowRef } = useRepeaterContext();
|
|
4184
|
-
return /* @__PURE__ */
|
|
4185
|
-
|
|
4245
|
+
return /* @__PURE__ */ React68.createElement(import_ui59.Box, { sx: { width: "100%" } }, /* @__PURE__ */ React68.createElement(import_ui59.Box, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React68.createElement(
|
|
4246
|
+
import_ui59.Tabs,
|
|
4186
4247
|
{
|
|
4187
4248
|
size: "small",
|
|
4188
4249
|
variant: "fullWidth",
|
|
4189
4250
|
...getTabsProps(),
|
|
4190
4251
|
"aria-label": (0, import_i18n31.__)("Background Overlay", "elementor")
|
|
4191
4252
|
},
|
|
4192
|
-
/* @__PURE__ */
|
|
4193
|
-
/* @__PURE__ */
|
|
4194
|
-
/* @__PURE__ */
|
|
4195
|
-
)), /* @__PURE__ */
|
|
4253
|
+
/* @__PURE__ */ React68.createElement(import_ui59.Tab, { label: (0, import_i18n31.__)("Image", "elementor"), ...getTabProps("image") }),
|
|
4254
|
+
/* @__PURE__ */ React68.createElement(import_ui59.Tab, { label: (0, import_i18n31.__)("Gradient", "elementor"), ...getTabProps("gradient") }),
|
|
4255
|
+
/* @__PURE__ */ React68.createElement(import_ui59.Tab, { label: (0, import_i18n31.__)("Color", "elementor"), ...getTabProps("color") })
|
|
4256
|
+
)), /* @__PURE__ */ React68.createElement(import_ui59.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("image") }, /* @__PURE__ */ React68.createElement(PopoverContent, null, /* @__PURE__ */ React68.createElement(ImageOverlayContent, null))), /* @__PURE__ */ React68.createElement(import_ui59.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("gradient") }, /* @__PURE__ */ React68.createElement(BackgroundGradientColorControl, null)), /* @__PURE__ */ React68.createElement(import_ui59.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("color") }, /* @__PURE__ */ React68.createElement(PopoverContent, null, /* @__PURE__ */ React68.createElement(ColorOverlayContent, { anchorEl: rowRef }))));
|
|
4196
4257
|
};
|
|
4197
4258
|
var ItemIcon3 = ({ value }) => {
|
|
4198
4259
|
switch (value.$$type) {
|
|
4199
4260
|
case "background-image-overlay":
|
|
4200
|
-
return /* @__PURE__ */
|
|
4261
|
+
return /* @__PURE__ */ React68.createElement(ItemIconImage, { value });
|
|
4201
4262
|
case "background-color-overlay":
|
|
4202
|
-
return /* @__PURE__ */
|
|
4263
|
+
return /* @__PURE__ */ React68.createElement(ItemIconColor, { value });
|
|
4203
4264
|
case "background-gradient-overlay":
|
|
4204
|
-
return /* @__PURE__ */
|
|
4265
|
+
return /* @__PURE__ */ React68.createElement(ItemIconGradient, { value });
|
|
4205
4266
|
default:
|
|
4206
4267
|
return null;
|
|
4207
4268
|
}
|
|
@@ -4214,12 +4275,12 @@ var extractColorFrom = (prop) => {
|
|
|
4214
4275
|
};
|
|
4215
4276
|
var ItemIconColor = ({ value: prop }) => {
|
|
4216
4277
|
const color = extractColorFrom(prop);
|
|
4217
|
-
return /* @__PURE__ */
|
|
4278
|
+
return /* @__PURE__ */ React68.createElement(StyledUnstableColorIndicator2, { size: "inherit", component: "span", value: color });
|
|
4218
4279
|
};
|
|
4219
4280
|
var ItemIconImage = ({ value }) => {
|
|
4220
4281
|
const { imageUrl } = useImage(value);
|
|
4221
|
-
return /* @__PURE__ */
|
|
4222
|
-
|
|
4282
|
+
return /* @__PURE__ */ React68.createElement(
|
|
4283
|
+
import_ui59.CardMedia,
|
|
4223
4284
|
{
|
|
4224
4285
|
image: imageUrl,
|
|
4225
4286
|
sx: (theme) => ({
|
|
@@ -4233,43 +4294,43 @@ var ItemIconImage = ({ value }) => {
|
|
|
4233
4294
|
};
|
|
4234
4295
|
var ItemIconGradient = ({ value }) => {
|
|
4235
4296
|
const gradient = getGradientValue(value);
|
|
4236
|
-
return /* @__PURE__ */
|
|
4297
|
+
return /* @__PURE__ */ React68.createElement(StyledUnstableColorIndicator2, { size: "inherit", component: "span", value: gradient });
|
|
4237
4298
|
};
|
|
4238
4299
|
var ItemLabel3 = ({ value }) => {
|
|
4239
4300
|
switch (value.$$type) {
|
|
4240
4301
|
case "background-image-overlay":
|
|
4241
|
-
return /* @__PURE__ */
|
|
4302
|
+
return /* @__PURE__ */ React68.createElement(ItemLabelImage, { value });
|
|
4242
4303
|
case "background-color-overlay":
|
|
4243
|
-
return /* @__PURE__ */
|
|
4304
|
+
return /* @__PURE__ */ React68.createElement(ItemLabelColor, { value });
|
|
4244
4305
|
case "background-gradient-overlay":
|
|
4245
|
-
return /* @__PURE__ */
|
|
4306
|
+
return /* @__PURE__ */ React68.createElement(ItemLabelGradient, { value });
|
|
4246
4307
|
default:
|
|
4247
4308
|
return null;
|
|
4248
4309
|
}
|
|
4249
4310
|
};
|
|
4250
4311
|
var ItemLabelColor = ({ value: prop }) => {
|
|
4251
4312
|
const color = extractColorFrom(prop);
|
|
4252
|
-
return /* @__PURE__ */
|
|
4313
|
+
return /* @__PURE__ */ React68.createElement("span", null, color);
|
|
4253
4314
|
};
|
|
4254
4315
|
var ItemLabelImage = ({ value }) => {
|
|
4255
4316
|
const { imageTitle } = useImage(value);
|
|
4256
|
-
return /* @__PURE__ */
|
|
4317
|
+
return /* @__PURE__ */ React68.createElement("span", null, imageTitle);
|
|
4257
4318
|
};
|
|
4258
4319
|
var ItemLabelGradient = ({ value }) => {
|
|
4259
4320
|
if (value.value.type.value === "linear") {
|
|
4260
|
-
return /* @__PURE__ */
|
|
4321
|
+
return /* @__PURE__ */ React68.createElement("span", null, (0, import_i18n31.__)("Linear Gradient", "elementor"));
|
|
4261
4322
|
}
|
|
4262
|
-
return /* @__PURE__ */
|
|
4323
|
+
return /* @__PURE__ */ React68.createElement("span", null, (0, import_i18n31.__)("Radial Gradient", "elementor"));
|
|
4263
4324
|
};
|
|
4264
4325
|
var ColorOverlayContent = ({ anchorEl }) => {
|
|
4265
4326
|
const propContext = useBoundProp(import_editor_props31.backgroundColorOverlayPropTypeUtil);
|
|
4266
|
-
return /* @__PURE__ */
|
|
4327
|
+
return /* @__PURE__ */ React68.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React68.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React68.createElement(ColorControl, { anchorEl })));
|
|
4267
4328
|
};
|
|
4268
4329
|
var ImageOverlayContent = () => {
|
|
4269
4330
|
const propContext = useBoundProp(import_editor_props31.backgroundImageOverlayPropTypeUtil);
|
|
4270
|
-
return /* @__PURE__ */
|
|
4331
|
+
return /* @__PURE__ */ React68.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React68.createElement(PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React68.createElement(ImageControl, { sizes: backgroundResolutionOptions })), /* @__PURE__ */ React68.createElement(PropKeyProvider, { bind: "position" }, /* @__PURE__ */ React68.createElement(BackgroundImageOverlayPosition, null)), /* @__PURE__ */ React68.createElement(PropKeyProvider, { bind: "repeat" }, /* @__PURE__ */ React68.createElement(BackgroundImageOverlayRepeat, null)), /* @__PURE__ */ React68.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React68.createElement(BackgroundImageOverlaySize, null)), /* @__PURE__ */ React68.createElement(PropKeyProvider, { bind: "attachment" }, /* @__PURE__ */ React68.createElement(BackgroundImageOverlayAttachment, null)));
|
|
4271
4332
|
};
|
|
4272
|
-
var StyledUnstableColorIndicator2 = (0,
|
|
4333
|
+
var StyledUnstableColorIndicator2 = (0, import_ui59.styled)(import_ui59.UnstableColorIndicator)(({ theme }) => ({
|
|
4273
4334
|
height: "1rem",
|
|
4274
4335
|
width: "1rem",
|
|
4275
4336
|
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
@@ -4308,20 +4369,20 @@ var getGradientValue = (value) => {
|
|
|
4308
4369
|
var BackgroundControl = createControl(() => {
|
|
4309
4370
|
const propContext = useBoundProp(import_editor_props32.backgroundPropTypeUtil);
|
|
4310
4371
|
const colorLabel = (0, import_i18n32.__)("Color", "elementor");
|
|
4311
|
-
return /* @__PURE__ */
|
|
4372
|
+
return /* @__PURE__ */ React69.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React69.createElement(PropKeyProvider, { bind: "background-overlay" }, /* @__PURE__ */ React69.createElement(BackgroundOverlayRepeaterControl, null)), /* @__PURE__ */ React69.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React69.createElement(import_ui60.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React69.createElement(import_ui60.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React69.createElement(ControlLabel, null, colorLabel)), /* @__PURE__ */ React69.createElement(import_ui60.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React69.createElement(ColorControl, null)))));
|
|
4312
4373
|
});
|
|
4313
4374
|
|
|
4314
4375
|
// src/controls/repeatable-control.tsx
|
|
4315
|
-
var
|
|
4316
|
-
var
|
|
4376
|
+
var React70 = __toESM(require("react"));
|
|
4377
|
+
var import_react37 = require("react");
|
|
4317
4378
|
var import_editor_props33 = require("@elementor/editor-props");
|
|
4318
|
-
var
|
|
4379
|
+
var import_ui61 = require("@elementor/ui");
|
|
4319
4380
|
|
|
4320
4381
|
// src/hooks/use-repeatable-control-context.ts
|
|
4321
|
-
var
|
|
4322
|
-
var RepeatableControlContext = (0,
|
|
4382
|
+
var import_react36 = require("react");
|
|
4383
|
+
var RepeatableControlContext = (0, import_react36.createContext)(void 0);
|
|
4323
4384
|
var useRepeatableControlContext = () => {
|
|
4324
|
-
const context = (0,
|
|
4385
|
+
const context = (0, import_react36.useContext)(RepeatableControlContext);
|
|
4325
4386
|
if (!context) {
|
|
4326
4387
|
throw new Error("useRepeatableControlContext must be used within RepeatableControl");
|
|
4327
4388
|
}
|
|
@@ -4346,11 +4407,11 @@ var RepeatableControl = createControl(
|
|
|
4346
4407
|
if (!childPropTypeUtil) {
|
|
4347
4408
|
return null;
|
|
4348
4409
|
}
|
|
4349
|
-
const childArrayPropTypeUtil = (0,
|
|
4410
|
+
const childArrayPropTypeUtil = (0, import_react37.useMemo)(
|
|
4350
4411
|
() => (0, import_editor_props33.createArrayPropUtils)(childPropTypeUtil.key, childPropTypeUtil.schema, propKey),
|
|
4351
4412
|
[childPropTypeUtil.key, childPropTypeUtil.schema, propKey]
|
|
4352
4413
|
);
|
|
4353
|
-
const contextValue = (0,
|
|
4414
|
+
const contextValue = (0, import_react37.useMemo)(
|
|
4354
4415
|
() => ({
|
|
4355
4416
|
...childControlConfig,
|
|
4356
4417
|
placeholder: placeholder || "",
|
|
@@ -4359,31 +4420,31 @@ var RepeatableControl = createControl(
|
|
|
4359
4420
|
[childControlConfig, placeholder, patternLabel]
|
|
4360
4421
|
);
|
|
4361
4422
|
const { propType, value, setValue } = useBoundProp(childArrayPropTypeUtil);
|
|
4362
|
-
return /* @__PURE__ */
|
|
4423
|
+
return /* @__PURE__ */ React70.createElement(PropProvider, { propType, value, setValue }, /* @__PURE__ */ React70.createElement(RepeatableControlContext.Provider, { value: contextValue }, /* @__PURE__ */ React70.createElement(
|
|
4363
4424
|
UnstableRepeater,
|
|
4364
4425
|
{
|
|
4365
4426
|
initial: childPropTypeUtil.create(initialValues || null),
|
|
4366
4427
|
propTypeUtil: childArrayPropTypeUtil
|
|
4367
4428
|
},
|
|
4368
|
-
/* @__PURE__ */
|
|
4369
|
-
/* @__PURE__ */
|
|
4429
|
+
/* @__PURE__ */ React70.createElement(Header, { label: repeaterLabel }, /* @__PURE__ */ React70.createElement(TooltipAddItemAction, { ...addItemTooltipProps, newItemIndex: 0 })),
|
|
4430
|
+
/* @__PURE__ */ React70.createElement(
|
|
4370
4431
|
ItemsContainer,
|
|
4371
4432
|
{
|
|
4372
4433
|
isSortable: false,
|
|
4373
|
-
itemTemplate: /* @__PURE__ */
|
|
4434
|
+
itemTemplate: /* @__PURE__ */ React70.createElement(Item, { Icon: ItemIcon4, Label: ItemLabel4 })
|
|
4374
4435
|
},
|
|
4375
|
-
showDuplicate && /* @__PURE__ */
|
|
4376
|
-
showToggle && /* @__PURE__ */
|
|
4377
|
-
/* @__PURE__ */
|
|
4436
|
+
showDuplicate && /* @__PURE__ */ React70.createElement(DuplicateItemAction, null),
|
|
4437
|
+
showToggle && /* @__PURE__ */ React70.createElement(DisableItemAction, null),
|
|
4438
|
+
/* @__PURE__ */ React70.createElement(RemoveItemAction, null)
|
|
4378
4439
|
),
|
|
4379
|
-
/* @__PURE__ */
|
|
4440
|
+
/* @__PURE__ */ React70.createElement(EditItemPopover, null, /* @__PURE__ */ React70.createElement(Content3, null))
|
|
4380
4441
|
)));
|
|
4381
4442
|
}
|
|
4382
4443
|
);
|
|
4383
|
-
var ItemIcon4 = () => /* @__PURE__ */
|
|
4444
|
+
var ItemIcon4 = () => /* @__PURE__ */ React70.createElement(React70.Fragment, null);
|
|
4384
4445
|
var Content3 = () => {
|
|
4385
4446
|
const { component: ChildControl, props = {} } = useRepeatableControlContext();
|
|
4386
|
-
return /* @__PURE__ */
|
|
4447
|
+
return /* @__PURE__ */ React70.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React70.createElement(PopoverGridContainer, null, /* @__PURE__ */ React70.createElement(ChildControl, { ...props })));
|
|
4387
4448
|
};
|
|
4388
4449
|
var interpolate = (template, data) => {
|
|
4389
4450
|
if (!data) {
|
|
@@ -4445,7 +4506,7 @@ var ItemLabel4 = ({ value }) => {
|
|
|
4445
4506
|
const showPlaceholder = shouldShowPlaceholder(patternLabel, value);
|
|
4446
4507
|
const label = showPlaceholder ? placeholder : interpolate(patternLabel, value);
|
|
4447
4508
|
const color = showPlaceholder ? "text.tertiary" : "text.primary";
|
|
4448
|
-
return /* @__PURE__ */
|
|
4509
|
+
return /* @__PURE__ */ React70.createElement(import_ui61.Box, { component: "span", color }, label);
|
|
4449
4510
|
};
|
|
4450
4511
|
var getAllProperties = (pattern) => {
|
|
4451
4512
|
const properties = pattern.match(PLACEHOLDER_REGEX)?.map((match) => match.slice(2, -1)) || [];
|
|
@@ -4453,16 +4514,16 @@ var getAllProperties = (pattern) => {
|
|
|
4453
4514
|
};
|
|
4454
4515
|
|
|
4455
4516
|
// src/controls/key-value-control.tsx
|
|
4456
|
-
var
|
|
4457
|
-
var
|
|
4517
|
+
var React71 = __toESM(require("react"));
|
|
4518
|
+
var import_react38 = require("react");
|
|
4458
4519
|
var import_editor_props34 = require("@elementor/editor-props");
|
|
4459
|
-
var
|
|
4520
|
+
var import_ui62 = require("@elementor/ui");
|
|
4460
4521
|
var import_i18n33 = require("@wordpress/i18n");
|
|
4461
4522
|
var KeyValueControl = createControl((props = {}) => {
|
|
4462
4523
|
const { value, setValue, ...propContext } = useBoundProp(import_editor_props34.keyValuePropTypeUtil);
|
|
4463
|
-
const [keyError, setKeyError] = (0,
|
|
4464
|
-
const [valueError, setValueError] = (0,
|
|
4465
|
-
const [sessionState, setSessionState] = (0,
|
|
4524
|
+
const [keyError, setKeyError] = (0, import_react38.useState)("");
|
|
4525
|
+
const [valueError, setValueError] = (0, import_react38.useState)("");
|
|
4526
|
+
const [sessionState, setSessionState] = (0, import_react38.useState)({
|
|
4466
4527
|
key: value?.key?.value || "",
|
|
4467
4528
|
value: value?.value?.value || ""
|
|
4468
4529
|
});
|
|
@@ -4472,7 +4533,7 @@ var KeyValueControl = createControl((props = {}) => {
|
|
|
4472
4533
|
keyHelper: void 0,
|
|
4473
4534
|
valueHelper: void 0
|
|
4474
4535
|
};
|
|
4475
|
-
const [keyRegex, valueRegex, errMsg] = (0,
|
|
4536
|
+
const [keyRegex, valueRegex, errMsg] = (0, import_react38.useMemo)(
|
|
4476
4537
|
() => [
|
|
4477
4538
|
props.regexKey ? new RegExp(props.regexKey) : void 0,
|
|
4478
4539
|
props.regexValue ? new RegExp(props.regexValue) : void 0,
|
|
@@ -4525,7 +4586,7 @@ var KeyValueControl = createControl((props = {}) => {
|
|
|
4525
4586
|
});
|
|
4526
4587
|
}
|
|
4527
4588
|
};
|
|
4528
|
-
return /* @__PURE__ */
|
|
4589
|
+
return /* @__PURE__ */ React71.createElement(PropProvider, { ...propContext, value, setValue: handleChange }, /* @__PURE__ */ React71.createElement(import_ui62.Grid, { container: true, gap: 1.5 }, /* @__PURE__ */ React71.createElement(import_ui62.Grid, { item: true, xs: 12, display: "flex", flexDirection: "column" }, /* @__PURE__ */ React71.createElement(import_ui62.FormLabel, { size: "tiny", sx: { pb: 1 } }, keyLabel), /* @__PURE__ */ React71.createElement(PropKeyProvider, { bind: "key" }, /* @__PURE__ */ React71.createElement(TextControl, { inputValue: sessionState.key, error: !!keyError, helperText: keyHelper })), !!keyError && /* @__PURE__ */ React71.createElement(import_ui62.FormHelperText, { error: true }, keyError)), /* @__PURE__ */ React71.createElement(import_ui62.Grid, { item: true, xs: 12, display: "flex", flexDirection: "column" }, /* @__PURE__ */ React71.createElement(import_ui62.FormLabel, { size: "tiny", sx: { pb: 1 } }, valueLabel), /* @__PURE__ */ React71.createElement(PropKeyProvider, { bind: "value" }, /* @__PURE__ */ React71.createElement(
|
|
4529
4590
|
TextControl,
|
|
4530
4591
|
{
|
|
4531
4592
|
inputValue: sessionState.value,
|
|
@@ -4533,15 +4594,15 @@ var KeyValueControl = createControl((props = {}) => {
|
|
|
4533
4594
|
inputDisabled: !!keyError,
|
|
4534
4595
|
helperText: valueHelper
|
|
4535
4596
|
}
|
|
4536
|
-
)), !!valueError && /* @__PURE__ */
|
|
4597
|
+
)), !!valueError && /* @__PURE__ */ React71.createElement(import_ui62.FormHelperText, { error: true }, valueError))));
|
|
4537
4598
|
});
|
|
4538
4599
|
|
|
4539
4600
|
// src/controls/position-control.tsx
|
|
4540
|
-
var
|
|
4601
|
+
var React72 = __toESM(require("react"));
|
|
4541
4602
|
var import_editor_props35 = require("@elementor/editor-props");
|
|
4542
4603
|
var import_editor_ui8 = require("@elementor/editor-ui");
|
|
4543
4604
|
var import_icons24 = require("@elementor/icons");
|
|
4544
|
-
var
|
|
4605
|
+
var import_ui63 = require("@elementor/ui");
|
|
4545
4606
|
var import_i18n34 = require("@wordpress/i18n");
|
|
4546
4607
|
var positionOptions = [
|
|
4547
4608
|
{ label: (0, import_i18n34.__)("Center center", "elementor"), value: "center center" },
|
|
@@ -4567,8 +4628,8 @@ var PositionControl = () => {
|
|
|
4567
4628
|
stringPropContext.setValue(value);
|
|
4568
4629
|
}
|
|
4569
4630
|
};
|
|
4570
|
-
return /* @__PURE__ */
|
|
4571
|
-
|
|
4631
|
+
return /* @__PURE__ */ React72.createElement(import_ui63.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React72.createElement(import_ui63.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React72.createElement(import_ui63.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React72.createElement(import_ui63.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React72.createElement(ControlFormLabel, null, (0, import_i18n34.__)("Object position", "elementor"))), /* @__PURE__ */ React72.createElement(import_ui63.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React72.createElement(
|
|
4632
|
+
import_ui63.Select,
|
|
4572
4633
|
{
|
|
4573
4634
|
size: "tiny",
|
|
4574
4635
|
disabled: stringPropContext.disabled,
|
|
@@ -4576,15 +4637,27 @@ var PositionControl = () => {
|
|
|
4576
4637
|
onChange: handlePositionChange,
|
|
4577
4638
|
fullWidth: true
|
|
4578
4639
|
},
|
|
4579
|
-
positionOptions.map(({ label, value }) => /* @__PURE__ */
|
|
4580
|
-
)))), isCustom && /* @__PURE__ */
|
|
4640
|
+
positionOptions.map(({ label, value }) => /* @__PURE__ */ React72.createElement(import_editor_ui8.MenuListItem, { key: value, value: value ?? "" }, label))
|
|
4641
|
+
)))), isCustom && /* @__PURE__ */ React72.createElement(PropProvider, { ...positionContext }, /* @__PURE__ */ React72.createElement(import_ui63.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React72.createElement(import_ui63.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React72.createElement(import_ui63.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React72.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React72.createElement(
|
|
4642
|
+
SizeControl,
|
|
4643
|
+
{
|
|
4644
|
+
startIcon: /* @__PURE__ */ React72.createElement(import_icons24.LetterXIcon, { fontSize: "tiny" }),
|
|
4645
|
+
min: -Number.MAX_SAFE_INTEGER
|
|
4646
|
+
}
|
|
4647
|
+
))), /* @__PURE__ */ React72.createElement(import_ui63.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React72.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React72.createElement(
|
|
4648
|
+
SizeControl,
|
|
4649
|
+
{
|
|
4650
|
+
startIcon: /* @__PURE__ */ React72.createElement(import_icons24.LetterYIcon, { fontSize: "tiny" }),
|
|
4651
|
+
min: -Number.MAX_SAFE_INTEGER
|
|
4652
|
+
}
|
|
4653
|
+
)))))));
|
|
4581
4654
|
};
|
|
4582
4655
|
|
|
4583
4656
|
// src/controls/transform-control/transform-repeater-control.tsx
|
|
4584
|
-
var
|
|
4657
|
+
var React82 = __toESM(require("react"));
|
|
4585
4658
|
var import_editor_props42 = require("@elementor/editor-props");
|
|
4586
4659
|
var import_icons30 = require("@elementor/icons");
|
|
4587
|
-
var
|
|
4660
|
+
var import_ui73 = require("@elementor/ui");
|
|
4588
4661
|
var import_i18n41 = require("@wordpress/i18n");
|
|
4589
4662
|
|
|
4590
4663
|
// src/controls/transform-control/initial-values.ts
|
|
@@ -4634,29 +4707,30 @@ var initialSkewValue = import_editor_props36.skewTransformPropTypeUtil.create({
|
|
|
4634
4707
|
});
|
|
4635
4708
|
|
|
4636
4709
|
// src/controls/transform-control/transform-content.tsx
|
|
4637
|
-
var
|
|
4638
|
-
var
|
|
4710
|
+
var React79 = __toESM(require("react"));
|
|
4711
|
+
var import_ui71 = require("@elementor/ui");
|
|
4639
4712
|
var import_i18n39 = require("@wordpress/i18n");
|
|
4640
4713
|
|
|
4641
4714
|
// src/controls/transform-control/functions/move.tsx
|
|
4642
|
-
var
|
|
4643
|
-
var
|
|
4715
|
+
var React74 = __toESM(require("react"));
|
|
4716
|
+
var import_react39 = require("react");
|
|
4644
4717
|
var import_editor_props37 = require("@elementor/editor-props");
|
|
4645
4718
|
var import_icons25 = require("@elementor/icons");
|
|
4646
|
-
var
|
|
4719
|
+
var import_ui65 = require("@elementor/ui");
|
|
4647
4720
|
var import_i18n35 = require("@wordpress/i18n");
|
|
4648
4721
|
|
|
4649
4722
|
// src/controls/transform-control/functions/axis-row.tsx
|
|
4650
|
-
var
|
|
4651
|
-
var
|
|
4723
|
+
var React73 = __toESM(require("react"));
|
|
4724
|
+
var import_ui64 = require("@elementor/ui");
|
|
4652
4725
|
var AxisRow = ({ label, bind, startIcon, anchorRef, units: units2, variant = "angle" }) => {
|
|
4653
|
-
return /* @__PURE__ */
|
|
4726
|
+
return /* @__PURE__ */ React73.createElement(import_ui64.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React73.createElement(PopoverGridContainer, { ref: anchorRef }, /* @__PURE__ */ React73.createElement(import_ui64.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React73.createElement(ControlLabel, null, label)), /* @__PURE__ */ React73.createElement(import_ui64.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React73.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React73.createElement(
|
|
4654
4727
|
SizeControl,
|
|
4655
4728
|
{
|
|
4656
4729
|
anchorRef,
|
|
4657
4730
|
startIcon,
|
|
4658
4731
|
units: units2,
|
|
4659
|
-
variant
|
|
4732
|
+
variant,
|
|
4733
|
+
min: -Number.MAX_SAFE_INTEGER
|
|
4660
4734
|
}
|
|
4661
4735
|
)))));
|
|
4662
4736
|
};
|
|
@@ -4666,26 +4740,26 @@ var moveAxisControls = [
|
|
|
4666
4740
|
{
|
|
4667
4741
|
label: (0, import_i18n35.__)("Move X", "elementor"),
|
|
4668
4742
|
bind: "x",
|
|
4669
|
-
startIcon: /* @__PURE__ */
|
|
4743
|
+
startIcon: /* @__PURE__ */ React74.createElement(import_icons25.ArrowRightIcon, { fontSize: "tiny" }),
|
|
4670
4744
|
units: ["px", "%", "em", "rem", "vw"]
|
|
4671
4745
|
},
|
|
4672
4746
|
{
|
|
4673
4747
|
label: (0, import_i18n35.__)("Move Y", "elementor"),
|
|
4674
4748
|
bind: "y",
|
|
4675
|
-
startIcon: /* @__PURE__ */
|
|
4749
|
+
startIcon: /* @__PURE__ */ React74.createElement(import_icons25.ArrowDownSmallIcon, { fontSize: "tiny" }),
|
|
4676
4750
|
units: ["px", "%", "em", "rem", "vh"]
|
|
4677
4751
|
},
|
|
4678
4752
|
{
|
|
4679
4753
|
label: (0, import_i18n35.__)("Move Z", "elementor"),
|
|
4680
4754
|
bind: "z",
|
|
4681
|
-
startIcon: /* @__PURE__ */
|
|
4755
|
+
startIcon: /* @__PURE__ */ React74.createElement(import_icons25.ArrowDownLeftIcon, { fontSize: "tiny" }),
|
|
4682
4756
|
units: ["px", "%", "em", "rem", "vw", "vh"]
|
|
4683
4757
|
}
|
|
4684
4758
|
];
|
|
4685
4759
|
var Move = () => {
|
|
4686
4760
|
const context = useBoundProp(import_editor_props37.moveTransformPropTypeUtil);
|
|
4687
|
-
const rowRefs = [(0,
|
|
4688
|
-
return /* @__PURE__ */
|
|
4761
|
+
const rowRefs = [(0, import_react39.useRef)(null), (0, import_react39.useRef)(null), (0, import_react39.useRef)(null)];
|
|
4762
|
+
return /* @__PURE__ */ React74.createElement(import_ui65.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React74.createElement(PropProvider, { ...context }, /* @__PURE__ */ React74.createElement(PropKeyProvider, { bind: TransformFunctionKeys.move }, moveAxisControls.map((control, index) => /* @__PURE__ */ React74.createElement(
|
|
4689
4763
|
AxisRow,
|
|
4690
4764
|
{
|
|
4691
4765
|
key: control.bind,
|
|
@@ -4698,34 +4772,34 @@ var Move = () => {
|
|
|
4698
4772
|
};
|
|
4699
4773
|
|
|
4700
4774
|
// src/controls/transform-control/functions/rotate.tsx
|
|
4701
|
-
var
|
|
4702
|
-
var
|
|
4775
|
+
var React75 = __toESM(require("react"));
|
|
4776
|
+
var import_react40 = require("react");
|
|
4703
4777
|
var import_editor_props38 = require("@elementor/editor-props");
|
|
4704
4778
|
var import_icons26 = require("@elementor/icons");
|
|
4705
|
-
var
|
|
4779
|
+
var import_ui66 = require("@elementor/ui");
|
|
4706
4780
|
var import_i18n36 = require("@wordpress/i18n");
|
|
4707
4781
|
var rotateAxisControls = [
|
|
4708
4782
|
{
|
|
4709
4783
|
label: (0, import_i18n36.__)("Rotate X", "elementor"),
|
|
4710
4784
|
bind: "x",
|
|
4711
|
-
startIcon: /* @__PURE__ */
|
|
4785
|
+
startIcon: /* @__PURE__ */ React75.createElement(import_icons26.Arrow360Icon, { fontSize: "tiny" })
|
|
4712
4786
|
},
|
|
4713
4787
|
{
|
|
4714
4788
|
label: (0, import_i18n36.__)("Rotate Y", "elementor"),
|
|
4715
4789
|
bind: "y",
|
|
4716
|
-
startIcon: /* @__PURE__ */
|
|
4790
|
+
startIcon: /* @__PURE__ */ React75.createElement(import_icons26.Arrow360Icon, { fontSize: "tiny", style: { transform: "scaleX(-1) rotate(-90deg)" } })
|
|
4717
4791
|
},
|
|
4718
4792
|
{
|
|
4719
4793
|
label: (0, import_i18n36.__)("Rotate Z", "elementor"),
|
|
4720
4794
|
bind: "z",
|
|
4721
|
-
startIcon: /* @__PURE__ */
|
|
4795
|
+
startIcon: /* @__PURE__ */ React75.createElement(import_icons26.RotateClockwiseIcon, { fontSize: "tiny" })
|
|
4722
4796
|
}
|
|
4723
4797
|
];
|
|
4724
4798
|
var rotateUnits = ["deg", "rad", "grad", "turn"];
|
|
4725
4799
|
var Rotate = () => {
|
|
4726
4800
|
const context = useBoundProp(import_editor_props38.rotateTransformPropTypeUtil);
|
|
4727
|
-
const rowRefs = [(0,
|
|
4728
|
-
return /* @__PURE__ */
|
|
4801
|
+
const rowRefs = [(0, import_react40.useRef)(null), (0, import_react40.useRef)(null), (0, import_react40.useRef)(null)];
|
|
4802
|
+
return /* @__PURE__ */ React75.createElement(import_ui66.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React75.createElement(PropProvider, { ...context }, /* @__PURE__ */ React75.createElement(PropKeyProvider, { bind: TransformFunctionKeys.rotate }, rotateAxisControls.map((control, index) => /* @__PURE__ */ React75.createElement(
|
|
4729
4803
|
AxisRow,
|
|
4730
4804
|
{
|
|
4731
4805
|
key: control.bind,
|
|
@@ -4737,18 +4811,18 @@ var Rotate = () => {
|
|
|
4737
4811
|
};
|
|
4738
4812
|
|
|
4739
4813
|
// src/controls/transform-control/functions/scale.tsx
|
|
4740
|
-
var
|
|
4741
|
-
var
|
|
4814
|
+
var React77 = __toESM(require("react"));
|
|
4815
|
+
var import_react41 = require("react");
|
|
4742
4816
|
var import_editor_props39 = require("@elementor/editor-props");
|
|
4743
4817
|
var import_icons27 = require("@elementor/icons");
|
|
4744
|
-
var
|
|
4818
|
+
var import_ui68 = require("@elementor/ui");
|
|
4745
4819
|
var import_i18n37 = require("@wordpress/i18n");
|
|
4746
4820
|
|
|
4747
4821
|
// src/controls/transform-control/functions/scale-axis-row.tsx
|
|
4748
|
-
var
|
|
4749
|
-
var
|
|
4822
|
+
var React76 = __toESM(require("react"));
|
|
4823
|
+
var import_ui67 = require("@elementor/ui");
|
|
4750
4824
|
var ScaleAxisRow = ({ label, bind, startIcon, anchorRef }) => {
|
|
4751
|
-
return /* @__PURE__ */
|
|
4825
|
+
return /* @__PURE__ */ React76.createElement(import_ui67.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React76.createElement(PopoverGridContainer, { ref: anchorRef }, /* @__PURE__ */ React76.createElement(import_ui67.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React76.createElement(ControlLabel, null, label)), /* @__PURE__ */ React76.createElement(import_ui67.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React76.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React76.createElement(NumberControl, { step: 0.1, placeholder: "1", startIcon })))));
|
|
4752
4826
|
};
|
|
4753
4827
|
|
|
4754
4828
|
// src/controls/transform-control/functions/scale.tsx
|
|
@@ -4756,49 +4830,49 @@ var scaleAxisControls = [
|
|
|
4756
4830
|
{
|
|
4757
4831
|
label: (0, import_i18n37.__)("Scale X", "elementor"),
|
|
4758
4832
|
bind: "x",
|
|
4759
|
-
startIcon: /* @__PURE__ */
|
|
4833
|
+
startIcon: /* @__PURE__ */ React77.createElement(import_icons27.ArrowRightIcon, { fontSize: "tiny" })
|
|
4760
4834
|
},
|
|
4761
4835
|
{
|
|
4762
4836
|
label: (0, import_i18n37.__)("Scale Y", "elementor"),
|
|
4763
4837
|
bind: "y",
|
|
4764
|
-
startIcon: /* @__PURE__ */
|
|
4838
|
+
startIcon: /* @__PURE__ */ React77.createElement(import_icons27.ArrowDownSmallIcon, { fontSize: "tiny" })
|
|
4765
4839
|
},
|
|
4766
4840
|
{
|
|
4767
4841
|
label: (0, import_i18n37.__)("Scale Z", "elementor"),
|
|
4768
4842
|
bind: "z",
|
|
4769
|
-
startIcon: /* @__PURE__ */
|
|
4843
|
+
startIcon: /* @__PURE__ */ React77.createElement(import_icons27.ArrowDownLeftIcon, { fontSize: "tiny" })
|
|
4770
4844
|
}
|
|
4771
4845
|
];
|
|
4772
4846
|
var Scale = () => {
|
|
4773
4847
|
const context = useBoundProp(import_editor_props39.scaleTransformPropTypeUtil);
|
|
4774
|
-
const rowRefs = [(0,
|
|
4775
|
-
return /* @__PURE__ */
|
|
4848
|
+
const rowRefs = [(0, import_react41.useRef)(null), (0, import_react41.useRef)(null), (0, import_react41.useRef)(null)];
|
|
4849
|
+
return /* @__PURE__ */ React77.createElement(import_ui68.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React77.createElement(PropProvider, { ...context }, /* @__PURE__ */ React77.createElement(PropKeyProvider, { bind: TransformFunctionKeys.scale }, scaleAxisControls.map((control, index) => /* @__PURE__ */ React77.createElement(ScaleAxisRow, { key: control.bind, ...control, anchorRef: rowRefs[index] })))));
|
|
4776
4850
|
};
|
|
4777
4851
|
|
|
4778
4852
|
// src/controls/transform-control/functions/skew.tsx
|
|
4779
|
-
var
|
|
4780
|
-
var
|
|
4853
|
+
var React78 = __toESM(require("react"));
|
|
4854
|
+
var import_react42 = require("react");
|
|
4781
4855
|
var import_editor_props40 = require("@elementor/editor-props");
|
|
4782
4856
|
var import_icons28 = require("@elementor/icons");
|
|
4783
|
-
var
|
|
4857
|
+
var import_ui69 = require("@elementor/ui");
|
|
4784
4858
|
var import_i18n38 = require("@wordpress/i18n");
|
|
4785
4859
|
var skewAxisControls = [
|
|
4786
4860
|
{
|
|
4787
4861
|
label: (0, import_i18n38.__)("Skew X", "elementor"),
|
|
4788
4862
|
bind: "x",
|
|
4789
|
-
startIcon: /* @__PURE__ */
|
|
4863
|
+
startIcon: /* @__PURE__ */ React78.createElement(import_icons28.ArrowRightIcon, { fontSize: "tiny" })
|
|
4790
4864
|
},
|
|
4791
4865
|
{
|
|
4792
4866
|
label: (0, import_i18n38.__)("Skew Y", "elementor"),
|
|
4793
4867
|
bind: "y",
|
|
4794
|
-
startIcon: /* @__PURE__ */
|
|
4868
|
+
startIcon: /* @__PURE__ */ React78.createElement(import_icons28.ArrowLeftIcon, { fontSize: "tiny", style: { transform: "scaleX(-1) rotate(-90deg)" } })
|
|
4795
4869
|
}
|
|
4796
4870
|
];
|
|
4797
4871
|
var skewUnits = ["deg", "rad", "grad", "turn"];
|
|
4798
4872
|
var Skew = () => {
|
|
4799
4873
|
const context = useBoundProp(import_editor_props40.skewTransformPropTypeUtil);
|
|
4800
|
-
const rowRefs = [(0,
|
|
4801
|
-
return /* @__PURE__ */
|
|
4874
|
+
const rowRefs = [(0, import_react42.useRef)(null), (0, import_react42.useRef)(null), (0, import_react42.useRef)(null)];
|
|
4875
|
+
return /* @__PURE__ */ React78.createElement(import_ui69.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React78.createElement(PropProvider, { ...context }, /* @__PURE__ */ React78.createElement(PropKeyProvider, { bind: TransformFunctionKeys.skew }, skewAxisControls.map((control, index) => /* @__PURE__ */ React78.createElement(
|
|
4802
4876
|
AxisRow,
|
|
4803
4877
|
{
|
|
4804
4878
|
key: control.bind,
|
|
@@ -4810,9 +4884,9 @@ var Skew = () => {
|
|
|
4810
4884
|
};
|
|
4811
4885
|
|
|
4812
4886
|
// src/controls/transform-control/use-transform-tabs-history.tsx
|
|
4813
|
-
var
|
|
4887
|
+
var import_react43 = require("react");
|
|
4814
4888
|
var import_editor_props41 = require("@elementor/editor-props");
|
|
4815
|
-
var
|
|
4889
|
+
var import_ui70 = require("@elementor/ui");
|
|
4816
4890
|
var useTransformTabsHistory = ({
|
|
4817
4891
|
move: initialMove,
|
|
4818
4892
|
scale: initialScale,
|
|
@@ -4836,8 +4910,8 @@ var useTransformTabsHistory = ({
|
|
|
4836
4910
|
return TransformFunctionKeys.move;
|
|
4837
4911
|
}
|
|
4838
4912
|
};
|
|
4839
|
-
const { getTabsProps, getTabProps, getTabPanelProps } = (0,
|
|
4840
|
-
const valuesHistory = (0,
|
|
4913
|
+
const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui70.useTabs)(getCurrentTransformType());
|
|
4914
|
+
const valuesHistory = (0, import_react43.useRef)({
|
|
4841
4915
|
move: initialMove,
|
|
4842
4916
|
scale: initialScale,
|
|
4843
4917
|
rotate: initialRotate,
|
|
@@ -4898,8 +4972,8 @@ var TransformContent = () => {
|
|
|
4898
4972
|
rotate: initialRotateValue.value,
|
|
4899
4973
|
skew: initialSkewValue.value
|
|
4900
4974
|
});
|
|
4901
|
-
return /* @__PURE__ */
|
|
4902
|
-
|
|
4975
|
+
return /* @__PURE__ */ React79.createElement(PopoverContent, null, /* @__PURE__ */ React79.createElement(import_ui71.Box, { sx: { width: "100%" } }, /* @__PURE__ */ React79.createElement(import_ui71.Box, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React79.createElement(
|
|
4976
|
+
import_ui71.Tabs,
|
|
4903
4977
|
{
|
|
4904
4978
|
size: "small",
|
|
4905
4979
|
variant: "fullWidth",
|
|
@@ -4911,34 +4985,34 @@ var TransformContent = () => {
|
|
|
4911
4985
|
...getTabsProps(),
|
|
4912
4986
|
"aria-label": (0, import_i18n39.__)("Transform", "elementor")
|
|
4913
4987
|
},
|
|
4914
|
-
/* @__PURE__ */
|
|
4915
|
-
/* @__PURE__ */
|
|
4916
|
-
/* @__PURE__ */
|
|
4917
|
-
/* @__PURE__ */
|
|
4918
|
-
)), /* @__PURE__ */
|
|
4988
|
+
/* @__PURE__ */ React79.createElement(import_ui71.Tab, { label: (0, import_i18n39.__)("Move", "elementor"), ...getTabProps(TransformFunctionKeys.move) }),
|
|
4989
|
+
/* @__PURE__ */ React79.createElement(import_ui71.Tab, { label: (0, import_i18n39.__)("Scale", "elementor"), ...getTabProps(TransformFunctionKeys.scale) }),
|
|
4990
|
+
/* @__PURE__ */ React79.createElement(import_ui71.Tab, { label: (0, import_i18n39.__)("Rotate", "elementor"), ...getTabProps(TransformFunctionKeys.rotate) }),
|
|
4991
|
+
/* @__PURE__ */ React79.createElement(import_ui71.Tab, { label: (0, import_i18n39.__)("Skew", "elementor"), ...getTabProps(TransformFunctionKeys.skew) })
|
|
4992
|
+
)), /* @__PURE__ */ React79.createElement(import_ui71.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.move) }, /* @__PURE__ */ React79.createElement(Move, null)), /* @__PURE__ */ React79.createElement(import_ui71.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.scale) }, /* @__PURE__ */ React79.createElement(Scale, null)), /* @__PURE__ */ React79.createElement(import_ui71.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.rotate) }, /* @__PURE__ */ React79.createElement(Rotate, null)), /* @__PURE__ */ React79.createElement(import_ui71.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.skew) }, /* @__PURE__ */ React79.createElement(Skew, null))));
|
|
4919
4993
|
};
|
|
4920
4994
|
|
|
4921
4995
|
// src/controls/transform-control/transform-icon.tsx
|
|
4922
|
-
var
|
|
4996
|
+
var React80 = __toESM(require("react"));
|
|
4923
4997
|
var import_icons29 = require("@elementor/icons");
|
|
4924
4998
|
var TransformIcon = ({ value }) => {
|
|
4925
4999
|
switch (value.$$type) {
|
|
4926
5000
|
case TransformFunctionKeys.move:
|
|
4927
|
-
return /* @__PURE__ */
|
|
5001
|
+
return /* @__PURE__ */ React80.createElement(import_icons29.ArrowsMaximizeIcon, { fontSize: "tiny" });
|
|
4928
5002
|
case TransformFunctionKeys.scale:
|
|
4929
|
-
return /* @__PURE__ */
|
|
5003
|
+
return /* @__PURE__ */ React80.createElement(import_icons29.ExpandIcon, { fontSize: "tiny" });
|
|
4930
5004
|
case TransformFunctionKeys.rotate:
|
|
4931
|
-
return /* @__PURE__ */
|
|
5005
|
+
return /* @__PURE__ */ React80.createElement(import_icons29.RotateClockwise2Icon, { fontSize: "tiny" });
|
|
4932
5006
|
case TransformFunctionKeys.skew:
|
|
4933
|
-
return /* @__PURE__ */
|
|
5007
|
+
return /* @__PURE__ */ React80.createElement(import_icons29.SkewXIcon, { fontSize: "tiny" });
|
|
4934
5008
|
default:
|
|
4935
5009
|
return null;
|
|
4936
5010
|
}
|
|
4937
5011
|
};
|
|
4938
5012
|
|
|
4939
5013
|
// src/controls/transform-control/transform-label.tsx
|
|
4940
|
-
var
|
|
4941
|
-
var
|
|
5014
|
+
var React81 = __toESM(require("react"));
|
|
5015
|
+
var import_ui72 = require("@elementor/ui");
|
|
4942
5016
|
var import_i18n40 = require("@wordpress/i18n");
|
|
4943
5017
|
var transformMoveValue = (value) => Object.values(value).map((axis) => {
|
|
4944
5018
|
const size = axis?.value?.size ?? defaultValues.move.size;
|
|
@@ -4960,35 +5034,35 @@ var TransformLabel = (props) => {
|
|
|
4960
5034
|
const { $$type, value } = props.value;
|
|
4961
5035
|
switch ($$type) {
|
|
4962
5036
|
case TransformFunctionKeys.move:
|
|
4963
|
-
return /* @__PURE__ */
|
|
5037
|
+
return /* @__PURE__ */ React81.createElement(Label2, { label: (0, import_i18n40.__)("Move", "elementor"), value: transformMoveValue(value) });
|
|
4964
5038
|
case TransformFunctionKeys.scale:
|
|
4965
|
-
return /* @__PURE__ */
|
|
5039
|
+
return /* @__PURE__ */ React81.createElement(Label2, { label: (0, import_i18n40.__)("Scale", "elementor"), value: transformScaleValue(value) });
|
|
4966
5040
|
case TransformFunctionKeys.rotate:
|
|
4967
|
-
return /* @__PURE__ */
|
|
5041
|
+
return /* @__PURE__ */ React81.createElement(Label2, { label: (0, import_i18n40.__)("Rotate", "elementor"), value: transformRotateValue(value) });
|
|
4968
5042
|
case TransformFunctionKeys.skew:
|
|
4969
|
-
return /* @__PURE__ */
|
|
5043
|
+
return /* @__PURE__ */ React81.createElement(Label2, { label: (0, import_i18n40.__)("Skew", "elementor"), value: transformSkewValue(value) });
|
|
4970
5044
|
default:
|
|
4971
5045
|
return "";
|
|
4972
5046
|
}
|
|
4973
5047
|
};
|
|
4974
5048
|
var Label2 = ({ label, value }) => {
|
|
4975
|
-
return /* @__PURE__ */
|
|
5049
|
+
return /* @__PURE__ */ React81.createElement(import_ui72.Box, { component: "span" }, label, ": ", value);
|
|
4976
5050
|
};
|
|
4977
5051
|
|
|
4978
5052
|
// src/controls/transform-control/transform-repeater-control.tsx
|
|
4979
5053
|
var TransformRepeaterControl = createControl(() => {
|
|
4980
5054
|
const context = useBoundProp(import_editor_props42.transformPropTypeUtil);
|
|
4981
|
-
return /* @__PURE__ */
|
|
5055
|
+
return /* @__PURE__ */ React82.createElement(PropProvider, { ...context }, /* @__PURE__ */ React82.createElement(PropKeyProvider, { bind: "transform-functions" }, /* @__PURE__ */ React82.createElement(Repeater2, null)));
|
|
4982
5056
|
});
|
|
4983
|
-
var ToolTip = /* @__PURE__ */
|
|
4984
|
-
|
|
5057
|
+
var ToolTip = /* @__PURE__ */ React82.createElement(
|
|
5058
|
+
import_ui73.Box,
|
|
4985
5059
|
{
|
|
4986
5060
|
component: "span",
|
|
4987
5061
|
"aria-label": void 0,
|
|
4988
5062
|
sx: { display: "flex", gap: 0.5, p: 2, width: 320, borderRadius: 1 }
|
|
4989
5063
|
},
|
|
4990
|
-
/* @__PURE__ */
|
|
4991
|
-
/* @__PURE__ */
|
|
5064
|
+
/* @__PURE__ */ React82.createElement(import_icons30.InfoCircleFilledIcon, { sx: { color: "secondary.main" } }),
|
|
5065
|
+
/* @__PURE__ */ React82.createElement(import_ui73.Typography, { variant: "body2", color: "text.secondary", fontSize: "14px" }, (0, import_i18n41.__)("You can use each kind of transform only once per element.", "elementor"))
|
|
4992
5066
|
);
|
|
4993
5067
|
var Repeater2 = () => {
|
|
4994
5068
|
const transformFunctionsContext = useBoundProp(import_editor_props42.transformFunctionsPropTypeUtil);
|
|
@@ -4998,13 +5072,13 @@ var Repeater2 = () => {
|
|
|
4998
5072
|
return availableValues.find((value) => !transformValues?.some((item) => item.$$type === value.$$type));
|
|
4999
5073
|
};
|
|
5000
5074
|
const shouldDisableAddItem = !getInitialValue();
|
|
5001
|
-
return /* @__PURE__ */
|
|
5075
|
+
return /* @__PURE__ */ React82.createElement(PropProvider, { ...transformFunctionsContext }, /* @__PURE__ */ React82.createElement(
|
|
5002
5076
|
UnstableRepeater,
|
|
5003
5077
|
{
|
|
5004
5078
|
initial: getInitialValue() ?? initialTransformValue,
|
|
5005
5079
|
propTypeUtil: import_editor_props42.transformFunctionsPropTypeUtil
|
|
5006
5080
|
},
|
|
5007
|
-
/* @__PURE__ */
|
|
5081
|
+
/* @__PURE__ */ React82.createElement(Header, { label: (0, import_i18n41.__)("Transform", "elementor") }, /* @__PURE__ */ React82.createElement(
|
|
5008
5082
|
TooltipAddItemAction,
|
|
5009
5083
|
{
|
|
5010
5084
|
disabled: shouldDisableAddItem,
|
|
@@ -5012,28 +5086,28 @@ var Repeater2 = () => {
|
|
|
5012
5086
|
enableTooltip: shouldDisableAddItem
|
|
5013
5087
|
}
|
|
5014
5088
|
)),
|
|
5015
|
-
/* @__PURE__ */
|
|
5016
|
-
/* @__PURE__ */
|
|
5089
|
+
/* @__PURE__ */ React82.createElement(ItemsContainer, { itemTemplate: /* @__PURE__ */ React82.createElement(Item, { Icon: TransformIcon, Label: TransformLabel }) }, /* @__PURE__ */ React82.createElement(DisableItemAction, null), /* @__PURE__ */ React82.createElement(RemoveItemAction, null)),
|
|
5090
|
+
/* @__PURE__ */ React82.createElement(EditItemPopover, null, /* @__PURE__ */ React82.createElement(TransformContent, null))
|
|
5017
5091
|
));
|
|
5018
5092
|
};
|
|
5019
5093
|
|
|
5020
5094
|
// src/controls/transition-control/transition-repeater-control.tsx
|
|
5021
|
-
var
|
|
5095
|
+
var React85 = __toESM(require("react"));
|
|
5022
5096
|
var import_editor_props45 = require("@elementor/editor-props");
|
|
5023
5097
|
var import_icons32 = require("@elementor/icons");
|
|
5024
|
-
var
|
|
5098
|
+
var import_ui76 = require("@elementor/ui");
|
|
5025
5099
|
var import_i18n44 = require("@wordpress/i18n");
|
|
5026
5100
|
|
|
5027
5101
|
// src/controls/selection-size-control.tsx
|
|
5028
|
-
var
|
|
5029
|
-
var
|
|
5102
|
+
var React83 = __toESM(require("react"));
|
|
5103
|
+
var import_react44 = require("react");
|
|
5030
5104
|
var import_editor_props43 = require("@elementor/editor-props");
|
|
5031
|
-
var
|
|
5105
|
+
var import_ui74 = require("@elementor/ui");
|
|
5032
5106
|
var SelectionSizeControl = createControl(
|
|
5033
5107
|
({ selectionLabel, sizeLabel, selectionConfig, sizeConfigMap }) => {
|
|
5034
5108
|
const { value, setValue, propType } = useBoundProp(import_editor_props43.selectionSizePropTypeUtil);
|
|
5035
|
-
const rowRef = (0,
|
|
5036
|
-
const currentSizeConfig = (0,
|
|
5109
|
+
const rowRef = (0, import_react44.useRef)(null);
|
|
5110
|
+
const currentSizeConfig = (0, import_react44.useMemo)(() => {
|
|
5037
5111
|
switch (value.selection.$$type) {
|
|
5038
5112
|
case "key-value":
|
|
5039
5113
|
return sizeConfigMap[value?.selection?.value.value.value || ""];
|
|
@@ -5044,7 +5118,7 @@ var SelectionSizeControl = createControl(
|
|
|
5044
5118
|
}
|
|
5045
5119
|
}, [value, sizeConfigMap]);
|
|
5046
5120
|
const SelectionComponent = selectionConfig.component;
|
|
5047
|
-
return /* @__PURE__ */
|
|
5121
|
+
return /* @__PURE__ */ React83.createElement(PropProvider, { value, setValue, propType }, /* @__PURE__ */ React83.createElement(import_ui74.Grid, { container: true, spacing: 1.5, ref: rowRef }, /* @__PURE__ */ React83.createElement(import_ui74.Grid, { item: true, xs: 6, sx: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ React83.createElement(ControlFormLabel, null, selectionLabel)), /* @__PURE__ */ React83.createElement(import_ui74.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React83.createElement(PropKeyProvider, { bind: "selection" }, /* @__PURE__ */ React83.createElement(SelectionComponent, { ...selectionConfig.props }))), currentSizeConfig && /* @__PURE__ */ React83.createElement(React83.Fragment, null, /* @__PURE__ */ React83.createElement(import_ui74.Grid, { item: true, xs: 6, sx: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ React83.createElement(ControlFormLabel, null, sizeLabel)), /* @__PURE__ */ React83.createElement(import_ui74.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React83.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React83.createElement(
|
|
5048
5122
|
SizeControl,
|
|
5049
5123
|
{
|
|
5050
5124
|
anchorRef: rowRef,
|
|
@@ -5081,11 +5155,11 @@ var transitionsItemsList = transitionProperties.map((category) => ({
|
|
|
5081
5155
|
}));
|
|
5082
5156
|
|
|
5083
5157
|
// src/controls/transition-control/transition-selector.tsx
|
|
5084
|
-
var
|
|
5085
|
-
var
|
|
5158
|
+
var React84 = __toESM(require("react"));
|
|
5159
|
+
var import_react45 = require("react");
|
|
5086
5160
|
var import_editor_props44 = require("@elementor/editor-props");
|
|
5087
5161
|
var import_icons31 = require("@elementor/icons");
|
|
5088
|
-
var
|
|
5162
|
+
var import_ui75 = require("@elementor/ui");
|
|
5089
5163
|
var import_i18n43 = require("@wordpress/i18n");
|
|
5090
5164
|
var toTransitionSelectorValue = (label) => {
|
|
5091
5165
|
for (const category of transitionProperties) {
|
|
@@ -5113,8 +5187,8 @@ var TransitionSelector = ({ recentlyUsedList }) => {
|
|
|
5113
5187
|
value: { value: transitionValue },
|
|
5114
5188
|
key: { value: transitionLabel }
|
|
5115
5189
|
} = value;
|
|
5116
|
-
const defaultRef = (0,
|
|
5117
|
-
const popoverState = (0,
|
|
5190
|
+
const defaultRef = (0, import_react45.useRef)(null);
|
|
5191
|
+
const popoverState = (0, import_ui75.usePopupState)({ variant: "popover" });
|
|
5118
5192
|
const getItemList = () => {
|
|
5119
5193
|
const recentItems = recentlyUsedList.map((item) => findByValue(item)).filter((item) => !!item);
|
|
5120
5194
|
const filteredItems = transitionsItemsList.map((category) => {
|
|
@@ -5154,27 +5228,27 @@ var TransitionSelector = ({ recentlyUsedList }) => {
|
|
|
5154
5228
|
left: rect.right + 36
|
|
5155
5229
|
};
|
|
5156
5230
|
};
|
|
5157
|
-
return /* @__PURE__ */
|
|
5158
|
-
|
|
5231
|
+
return /* @__PURE__ */ React84.createElement(import_ui75.Box, { ref: defaultRef }, /* @__PURE__ */ React84.createElement(
|
|
5232
|
+
import_ui75.UnstableTag,
|
|
5159
5233
|
{
|
|
5160
5234
|
variant: "outlined",
|
|
5161
5235
|
label: transitionLabel,
|
|
5162
|
-
endIcon: /* @__PURE__ */
|
|
5163
|
-
...(0,
|
|
5236
|
+
endIcon: /* @__PURE__ */ React84.createElement(import_icons31.ChevronDownIcon, { fontSize: "tiny" }),
|
|
5237
|
+
...(0, import_ui75.bindTrigger)(popoverState),
|
|
5164
5238
|
fullWidth: true
|
|
5165
5239
|
}
|
|
5166
|
-
), /* @__PURE__ */
|
|
5167
|
-
|
|
5240
|
+
), /* @__PURE__ */ React84.createElement(
|
|
5241
|
+
import_ui75.Popover,
|
|
5168
5242
|
{
|
|
5169
5243
|
disablePortal: true,
|
|
5170
5244
|
disableScrollLock: true,
|
|
5171
|
-
...(0,
|
|
5245
|
+
...(0, import_ui75.bindPopover)(popoverState),
|
|
5172
5246
|
anchorReference: "anchorPosition",
|
|
5173
5247
|
anchorPosition: getAnchorPosition(),
|
|
5174
5248
|
anchorOrigin: { vertical: "top", horizontal: "right" },
|
|
5175
5249
|
transformOrigin: { vertical: "top", horizontal: "left" }
|
|
5176
5250
|
},
|
|
5177
|
-
/* @__PURE__ */
|
|
5251
|
+
/* @__PURE__ */ React84.createElement(
|
|
5178
5252
|
ItemSelector,
|
|
5179
5253
|
{
|
|
5180
5254
|
itemsList: getItemList(),
|
|
@@ -5225,18 +5299,18 @@ function getChildControlConfig(recentlyUsedList) {
|
|
|
5225
5299
|
props: getSelectionSizeProps(recentlyUsedList)
|
|
5226
5300
|
};
|
|
5227
5301
|
}
|
|
5228
|
-
var disableAddItemTooltipContent = /* @__PURE__ */
|
|
5229
|
-
|
|
5302
|
+
var disableAddItemTooltipContent = /* @__PURE__ */ React85.createElement(
|
|
5303
|
+
import_ui76.Alert,
|
|
5230
5304
|
{
|
|
5231
5305
|
sx: {
|
|
5232
5306
|
width: 280,
|
|
5233
5307
|
gap: 0.5
|
|
5234
5308
|
},
|
|
5235
5309
|
color: "secondary",
|
|
5236
|
-
icon: /* @__PURE__ */
|
|
5310
|
+
icon: /* @__PURE__ */ React85.createElement(import_icons32.InfoCircleFilledIcon, null)
|
|
5237
5311
|
},
|
|
5238
|
-
/* @__PURE__ */
|
|
5239
|
-
/* @__PURE__ */
|
|
5312
|
+
/* @__PURE__ */ React85.createElement(import_ui76.AlertTitle, null, (0, import_i18n44.__)("Transitions", "elementor")),
|
|
5313
|
+
/* @__PURE__ */ React85.createElement(import_ui76.Box, { component: "span" }, /* @__PURE__ */ React85.createElement(import_ui76.Typography, { variant: "body2" }, (0, import_i18n44.__)("Switch to 'Normal' state to add a transition.", "elementor")))
|
|
5240
5314
|
);
|
|
5241
5315
|
var TransitionRepeaterControl = createControl(
|
|
5242
5316
|
({
|
|
@@ -5244,7 +5318,7 @@ var TransitionRepeaterControl = createControl(
|
|
|
5244
5318
|
currentStyleState
|
|
5245
5319
|
}) => {
|
|
5246
5320
|
const currentStyleIsNormal = currentStyleState === null;
|
|
5247
|
-
return /* @__PURE__ */
|
|
5321
|
+
return /* @__PURE__ */ React85.createElement(
|
|
5248
5322
|
RepeatableControl,
|
|
5249
5323
|
{
|
|
5250
5324
|
label: (0, import_i18n44.__)("Transitions", "elementor"),
|
|
@@ -5267,14 +5341,14 @@ var TransitionRepeaterControl = createControl(
|
|
|
5267
5341
|
);
|
|
5268
5342
|
|
|
5269
5343
|
// src/components/css-code-editor/css-editor.tsx
|
|
5270
|
-
var
|
|
5344
|
+
var React87 = __toESM(require("react"));
|
|
5271
5345
|
var import_editor_responsive2 = require("@elementor/editor-responsive");
|
|
5272
|
-
var
|
|
5273
|
-
var
|
|
5346
|
+
var import_ui78 = require("@elementor/ui");
|
|
5347
|
+
var import_react46 = require("@monaco-editor/react");
|
|
5274
5348
|
|
|
5275
5349
|
// src/components/css-code-editor/css-editor.styles.ts
|
|
5276
|
-
var
|
|
5277
|
-
var EditorWrapper = (0,
|
|
5350
|
+
var import_ui77 = require("@elementor/ui");
|
|
5351
|
+
var EditorWrapper = (0, import_ui77.styled)(import_ui77.Box)`
|
|
5278
5352
|
border: 1px solid var( --e-a-border-color );
|
|
5279
5353
|
border-radius: 8px;
|
|
5280
5354
|
padding: 10px 12px;
|
|
@@ -5285,7 +5359,7 @@ var EditorWrapper = (0, import_ui76.styled)(import_ui76.Box)`
|
|
|
5285
5359
|
z-index: 99999999 !important;
|
|
5286
5360
|
}
|
|
5287
5361
|
`;
|
|
5288
|
-
var ResizeHandle = (0,
|
|
5362
|
+
var ResizeHandle = (0, import_ui77.styled)(import_ui77.Button)`
|
|
5289
5363
|
position: absolute;
|
|
5290
5364
|
bottom: 0;
|
|
5291
5365
|
left: 0;
|
|
@@ -5375,9 +5449,9 @@ function validate(editor, monaco) {
|
|
|
5375
5449
|
}
|
|
5376
5450
|
|
|
5377
5451
|
// src/components/css-code-editor/resize-handle.tsx
|
|
5378
|
-
var
|
|
5452
|
+
var React86 = __toESM(require("react"));
|
|
5379
5453
|
var ResizeHandleComponent = ({ onResize, containerRef, onHeightChange }) => {
|
|
5380
|
-
const handleResizeMove =
|
|
5454
|
+
const handleResizeMove = React86.useCallback(
|
|
5381
5455
|
(e) => {
|
|
5382
5456
|
const container = containerRef.current;
|
|
5383
5457
|
if (!container) {
|
|
@@ -5390,11 +5464,11 @@ var ResizeHandleComponent = ({ onResize, containerRef, onHeightChange }) => {
|
|
|
5390
5464
|
},
|
|
5391
5465
|
[containerRef, onResize, onHeightChange]
|
|
5392
5466
|
);
|
|
5393
|
-
const handleResizeEnd =
|
|
5467
|
+
const handleResizeEnd = React86.useCallback(() => {
|
|
5394
5468
|
document.removeEventListener("mousemove", handleResizeMove);
|
|
5395
5469
|
document.removeEventListener("mouseup", handleResizeEnd);
|
|
5396
5470
|
}, [handleResizeMove]);
|
|
5397
|
-
const handleResizeStart =
|
|
5471
|
+
const handleResizeStart = React86.useCallback(
|
|
5398
5472
|
(e) => {
|
|
5399
5473
|
e.preventDefault();
|
|
5400
5474
|
e.stopPropagation();
|
|
@@ -5403,13 +5477,13 @@ var ResizeHandleComponent = ({ onResize, containerRef, onHeightChange }) => {
|
|
|
5403
5477
|
},
|
|
5404
5478
|
[handleResizeMove, handleResizeEnd]
|
|
5405
5479
|
);
|
|
5406
|
-
|
|
5480
|
+
React86.useEffect(() => {
|
|
5407
5481
|
return () => {
|
|
5408
5482
|
document.removeEventListener("mousemove", handleResizeMove);
|
|
5409
5483
|
document.removeEventListener("mouseup", handleResizeEnd);
|
|
5410
5484
|
};
|
|
5411
5485
|
}, [handleResizeMove, handleResizeEnd]);
|
|
5412
|
-
return /* @__PURE__ */
|
|
5486
|
+
return /* @__PURE__ */ React86.createElement(
|
|
5413
5487
|
ResizeHandle,
|
|
5414
5488
|
{
|
|
5415
5489
|
onMouseDown: handleResizeStart,
|
|
@@ -5492,22 +5566,22 @@ var createEditorDidMountHandler = (editorRef, monacoRef, debounceTimer, onChange
|
|
|
5492
5566
|
};
|
|
5493
5567
|
};
|
|
5494
5568
|
var CssEditor = ({ value, onChange }) => {
|
|
5495
|
-
const theme = (0,
|
|
5496
|
-
const containerRef =
|
|
5497
|
-
const editorRef =
|
|
5498
|
-
const monacoRef =
|
|
5499
|
-
const debounceTimer =
|
|
5569
|
+
const theme = (0, import_ui78.useTheme)();
|
|
5570
|
+
const containerRef = React87.useRef(null);
|
|
5571
|
+
const editorRef = React87.useRef(null);
|
|
5572
|
+
const monacoRef = React87.useRef(null);
|
|
5573
|
+
const debounceTimer = React87.useRef(null);
|
|
5500
5574
|
const activeBreakpoint = (0, import_editor_responsive2.useActiveBreakpoint)();
|
|
5501
|
-
const handleResize =
|
|
5575
|
+
const handleResize = React87.useCallback(() => {
|
|
5502
5576
|
editorRef.current?.layout();
|
|
5503
5577
|
}, []);
|
|
5504
|
-
const handleHeightChange =
|
|
5578
|
+
const handleHeightChange = React87.useCallback((height) => {
|
|
5505
5579
|
if (containerRef.current) {
|
|
5506
5580
|
containerRef.current.style.height = `${height}px`;
|
|
5507
5581
|
}
|
|
5508
5582
|
}, []);
|
|
5509
5583
|
const handleEditorDidMount = createEditorDidMountHandler(editorRef, monacoRef, debounceTimer, onChange);
|
|
5510
|
-
|
|
5584
|
+
React87.useEffect(() => {
|
|
5511
5585
|
const timerRef = debounceTimer;
|
|
5512
5586
|
return () => {
|
|
5513
5587
|
const timer = timerRef.current;
|
|
@@ -5516,8 +5590,8 @@ var CssEditor = ({ value, onChange }) => {
|
|
|
5516
5590
|
}
|
|
5517
5591
|
};
|
|
5518
5592
|
}, []);
|
|
5519
|
-
return /* @__PURE__ */
|
|
5520
|
-
|
|
5593
|
+
return /* @__PURE__ */ React87.createElement(EditorWrapper, { ref: containerRef }, /* @__PURE__ */ React87.createElement(
|
|
5594
|
+
import_react46.Editor,
|
|
5521
5595
|
{
|
|
5522
5596
|
key: activeBreakpoint,
|
|
5523
5597
|
height: "100%",
|
|
@@ -5537,7 +5611,7 @@ var CssEditor = ({ value, onChange }) => {
|
|
|
5537
5611
|
fixedOverflowWidgets: true
|
|
5538
5612
|
}
|
|
5539
5613
|
}
|
|
5540
|
-
), /* @__PURE__ */
|
|
5614
|
+
), /* @__PURE__ */ React87.createElement(
|
|
5541
5615
|
ResizeHandleComponent,
|
|
5542
5616
|
{
|
|
5543
5617
|
onResize: handleResize,
|