@elementor/editor-controls 3.32.0-62 → 3.32.0-64
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.js +72 -31
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +73 -32
- package/dist/index.mjs.map +1 -1
- package/package.json +14 -14
- package/src/controls/transform-control/functions/axis-row.tsx +12 -6
- package/src/controls/transform-control/functions/move.tsx +20 -8
- package/src/controls/transform-control/functions/rotate.tsx +13 -8
- package/src/controls/transform-control/functions/scale-axis-row.tsx +3 -3
- package/src/controls/transform-control/functions/scale.tsx +8 -8
- package/src/controls/transform-control/functions/skew.tsx +12 -7
- package/src/controls/transform-control/initial-values.ts +2 -2
- package/src/controls/transform-control/transform-icon.tsx +2 -2
- package/src/controls/transform-control/transform-label.tsx +6 -6
- package/src/controls/transform-control/transform-repeater-control.tsx +28 -15
- package/src/controls/transform-control/use-transform-tabs-history.tsx +6 -6
package/dist/index.mjs
CHANGED
|
@@ -4600,7 +4600,7 @@ var PositionControl = () => {
|
|
|
4600
4600
|
|
|
4601
4601
|
// src/controls/transform-control/transform-repeater-control.tsx
|
|
4602
4602
|
import * as React81 from "react";
|
|
4603
|
-
import { transformPropTypeUtil } from "@elementor/editor-props";
|
|
4603
|
+
import { transformFunctionsPropTypeUtil, transformPropTypeUtil } from "@elementor/editor-props";
|
|
4604
4604
|
import { InfoCircleFilledIcon as InfoCircleFilledIcon2 } from "@elementor/icons";
|
|
4605
4605
|
import { Typography as Typography6 } from "@elementor/ui";
|
|
4606
4606
|
import { __ as __41 } from "@wordpress/i18n";
|
|
@@ -4672,32 +4672,52 @@ import { __ as __35 } from "@wordpress/i18n";
|
|
|
4672
4672
|
// src/controls/transform-control/functions/axis-row.tsx
|
|
4673
4673
|
import * as React72 from "react";
|
|
4674
4674
|
import { Grid as Grid21 } from "@elementor/ui";
|
|
4675
|
-
var AxisRow = ({ label,
|
|
4676
|
-
return /* @__PURE__ */ React72.createElement(Grid21, { item: true, xs: 12 }, /* @__PURE__ */ React72.createElement(PopoverGridContainer, { ref: anchorRef }, /* @__PURE__ */ React72.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React72.createElement(ControlLabel, null, label)), /* @__PURE__ */ React72.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React72.createElement(PropKeyProvider, { bind
|
|
4675
|
+
var AxisRow = ({ label, bind, startIcon, anchorRef, units: units2, variant = "angle" }) => {
|
|
4676
|
+
return /* @__PURE__ */ React72.createElement(Grid21, { item: true, xs: 12 }, /* @__PURE__ */ React72.createElement(PopoverGridContainer, { ref: anchorRef }, /* @__PURE__ */ React72.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React72.createElement(ControlLabel, null, label)), /* @__PURE__ */ React72.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React72.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React72.createElement(
|
|
4677
|
+
SizeControl,
|
|
4678
|
+
{
|
|
4679
|
+
anchorRef,
|
|
4680
|
+
startIcon,
|
|
4681
|
+
units: units2,
|
|
4682
|
+
variant
|
|
4683
|
+
}
|
|
4684
|
+
)))));
|
|
4677
4685
|
};
|
|
4678
4686
|
|
|
4679
4687
|
// src/controls/transform-control/functions/move.tsx
|
|
4680
4688
|
var moveAxisControls = [
|
|
4681
4689
|
{
|
|
4682
4690
|
label: __35("Move X", "elementor"),
|
|
4683
|
-
|
|
4684
|
-
startIcon: /* @__PURE__ */ React73.createElement(ArrowRightIcon, { fontSize: "tiny" })
|
|
4691
|
+
bind: "x",
|
|
4692
|
+
startIcon: /* @__PURE__ */ React73.createElement(ArrowRightIcon, { fontSize: "tiny" }),
|
|
4693
|
+
units: ["px", "%", "em", "rem", "vw"]
|
|
4685
4694
|
},
|
|
4686
4695
|
{
|
|
4687
4696
|
label: __35("Move Y", "elementor"),
|
|
4688
|
-
|
|
4689
|
-
startIcon: /* @__PURE__ */ React73.createElement(ArrowDownSmallIcon, { fontSize: "tiny" })
|
|
4697
|
+
bind: "y",
|
|
4698
|
+
startIcon: /* @__PURE__ */ React73.createElement(ArrowDownSmallIcon, { fontSize: "tiny" }),
|
|
4699
|
+
units: ["px", "%", "em", "rem", "vh"]
|
|
4690
4700
|
},
|
|
4691
4701
|
{
|
|
4692
4702
|
label: __35("Move Z", "elementor"),
|
|
4693
|
-
|
|
4694
|
-
startIcon: /* @__PURE__ */ React73.createElement(ArrowDownLeftIcon, { fontSize: "tiny" })
|
|
4703
|
+
bind: "z",
|
|
4704
|
+
startIcon: /* @__PURE__ */ React73.createElement(ArrowDownLeftIcon, { fontSize: "tiny" }),
|
|
4705
|
+
units: ["px", "%", "em", "rem", "vw", "vh"]
|
|
4695
4706
|
}
|
|
4696
4707
|
];
|
|
4697
4708
|
var Move = () => {
|
|
4698
4709
|
const context = useBoundProp(moveTransformPropTypeUtil);
|
|
4699
|
-
const
|
|
4700
|
-
return /* @__PURE__ */ React73.createElement(Grid22, { container: true, spacing: 1.5 }, /* @__PURE__ */ React73.createElement(PropProvider, { ...context }, /* @__PURE__ */ React73.createElement(PropKeyProvider, { bind: TransformFunctionKeys.move }, moveAxisControls.map((control) => /* @__PURE__ */ React73.createElement(
|
|
4710
|
+
const rowRefs = [useRef15(null), useRef15(null), useRef15(null)];
|
|
4711
|
+
return /* @__PURE__ */ React73.createElement(Grid22, { container: true, spacing: 1.5 }, /* @__PURE__ */ React73.createElement(PropProvider, { ...context }, /* @__PURE__ */ React73.createElement(PropKeyProvider, { bind: TransformFunctionKeys.move }, moveAxisControls.map((control, index) => /* @__PURE__ */ React73.createElement(
|
|
4712
|
+
AxisRow,
|
|
4713
|
+
{
|
|
4714
|
+
key: control.bind,
|
|
4715
|
+
...control,
|
|
4716
|
+
anchorRef: rowRefs[index],
|
|
4717
|
+
units: control.units,
|
|
4718
|
+
variant: "length"
|
|
4719
|
+
}
|
|
4720
|
+
)))));
|
|
4701
4721
|
};
|
|
4702
4722
|
|
|
4703
4723
|
// src/controls/transform-control/functions/rotate.tsx
|
|
@@ -4710,25 +4730,33 @@ import { __ as __36 } from "@wordpress/i18n";
|
|
|
4710
4730
|
var rotateAxisControls = [
|
|
4711
4731
|
{
|
|
4712
4732
|
label: __36("Rotate X", "elementor"),
|
|
4713
|
-
|
|
4733
|
+
bind: "x",
|
|
4714
4734
|
startIcon: /* @__PURE__ */ React74.createElement(Arrow360Icon, { fontSize: "tiny" })
|
|
4715
4735
|
},
|
|
4716
4736
|
{
|
|
4717
4737
|
label: __36("Rotate Y", "elementor"),
|
|
4718
|
-
|
|
4738
|
+
bind: "y",
|
|
4719
4739
|
startIcon: /* @__PURE__ */ React74.createElement(Arrow360Icon, { fontSize: "tiny", style: { transform: "scaleX(-1) rotate(-90deg)" } })
|
|
4720
4740
|
},
|
|
4721
4741
|
{
|
|
4722
4742
|
label: __36("Rotate Z", "elementor"),
|
|
4723
|
-
|
|
4743
|
+
bind: "z",
|
|
4724
4744
|
startIcon: /* @__PURE__ */ React74.createElement(RotateClockwiseIcon, { fontSize: "tiny" })
|
|
4725
4745
|
}
|
|
4726
4746
|
];
|
|
4727
4747
|
var rotateUnits = ["deg", "rad", "grad", "turn"];
|
|
4728
4748
|
var Rotate = () => {
|
|
4729
4749
|
const context = useBoundProp(rotateTransformPropTypeUtil2);
|
|
4730
|
-
const
|
|
4731
|
-
return /* @__PURE__ */ React74.createElement(Grid23, { container: true, spacing: 1.5 }, /* @__PURE__ */ React74.createElement(PropProvider, { ...context }, /* @__PURE__ */ React74.createElement(PropKeyProvider, { bind: TransformFunctionKeys.rotate }, rotateAxisControls.map((control) => /* @__PURE__ */ React74.createElement(
|
|
4750
|
+
const rowRefs = [useRef16(null), useRef16(null), useRef16(null)];
|
|
4751
|
+
return /* @__PURE__ */ React74.createElement(Grid23, { container: true, spacing: 1.5 }, /* @__PURE__ */ React74.createElement(PropProvider, { ...context }, /* @__PURE__ */ React74.createElement(PropKeyProvider, { bind: TransformFunctionKeys.rotate }, rotateAxisControls.map((control, index) => /* @__PURE__ */ React74.createElement(
|
|
4752
|
+
AxisRow,
|
|
4753
|
+
{
|
|
4754
|
+
key: control.bind,
|
|
4755
|
+
...control,
|
|
4756
|
+
anchorRef: rowRefs[index],
|
|
4757
|
+
units: rotateUnits
|
|
4758
|
+
}
|
|
4759
|
+
)))));
|
|
4732
4760
|
};
|
|
4733
4761
|
|
|
4734
4762
|
// src/controls/transform-control/functions/scale.tsx
|
|
@@ -4742,32 +4770,32 @@ import { __ as __37 } from "@wordpress/i18n";
|
|
|
4742
4770
|
// src/controls/transform-control/functions/scale-axis-row.tsx
|
|
4743
4771
|
import * as React75 from "react";
|
|
4744
4772
|
import { Grid as Grid24 } from "@elementor/ui";
|
|
4745
|
-
var ScaleAxisRow = ({ label,
|
|
4746
|
-
return /* @__PURE__ */ React75.createElement(Grid24, { item: true, xs: 12 }, /* @__PURE__ */ React75.createElement(PopoverGridContainer, { ref: anchorRef }, /* @__PURE__ */ React75.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React75.createElement(ControlLabel, null, label)), /* @__PURE__ */ React75.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React75.createElement(PropKeyProvider, { bind
|
|
4773
|
+
var ScaleAxisRow = ({ label, bind, startIcon, anchorRef }) => {
|
|
4774
|
+
return /* @__PURE__ */ React75.createElement(Grid24, { item: true, xs: 12 }, /* @__PURE__ */ React75.createElement(PopoverGridContainer, { ref: anchorRef }, /* @__PURE__ */ React75.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React75.createElement(ControlLabel, null, label)), /* @__PURE__ */ React75.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React75.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React75.createElement(NumberControl, { step: 0.1, placeholder: "1", startIcon })))));
|
|
4747
4775
|
};
|
|
4748
4776
|
|
|
4749
4777
|
// src/controls/transform-control/functions/scale.tsx
|
|
4750
4778
|
var scaleAxisControls = [
|
|
4751
4779
|
{
|
|
4752
4780
|
label: __37("Scale X", "elementor"),
|
|
4753
|
-
|
|
4781
|
+
bind: "x",
|
|
4754
4782
|
startIcon: /* @__PURE__ */ React76.createElement(ArrowRightIcon2, { fontSize: "tiny" })
|
|
4755
4783
|
},
|
|
4756
4784
|
{
|
|
4757
4785
|
label: __37("Scale Y", "elementor"),
|
|
4758
|
-
|
|
4786
|
+
bind: "y",
|
|
4759
4787
|
startIcon: /* @__PURE__ */ React76.createElement(ArrowDownSmallIcon2, { fontSize: "tiny" })
|
|
4760
4788
|
},
|
|
4761
4789
|
{
|
|
4762
4790
|
label: __37("Scale Z", "elementor"),
|
|
4763
|
-
|
|
4791
|
+
bind: "z",
|
|
4764
4792
|
startIcon: /* @__PURE__ */ React76.createElement(ArrowDownLeftIcon2, { fontSize: "tiny" })
|
|
4765
4793
|
}
|
|
4766
4794
|
];
|
|
4767
4795
|
var Scale = () => {
|
|
4768
4796
|
const context = useBoundProp(scaleTransformPropTypeUtil2);
|
|
4769
|
-
const
|
|
4770
|
-
return /* @__PURE__ */ React76.createElement(Grid25, { container: true, spacing: 1.5 }, /* @__PURE__ */ React76.createElement(PropProvider, { ...context }, /* @__PURE__ */ React76.createElement(PropKeyProvider, { bind: TransformFunctionKeys.scale }, scaleAxisControls.map((control) => /* @__PURE__ */ React76.createElement(ScaleAxisRow, { key: control.
|
|
4797
|
+
const rowRefs = [useRef17(null), useRef17(null), useRef17(null)];
|
|
4798
|
+
return /* @__PURE__ */ React76.createElement(Grid25, { container: true, spacing: 1.5 }, /* @__PURE__ */ React76.createElement(PropProvider, { ...context }, /* @__PURE__ */ React76.createElement(PropKeyProvider, { bind: TransformFunctionKeys.scale }, scaleAxisControls.map((control, index) => /* @__PURE__ */ React76.createElement(ScaleAxisRow, { key: control.bind, ...control, anchorRef: rowRefs[index] })))));
|
|
4771
4799
|
};
|
|
4772
4800
|
|
|
4773
4801
|
// src/controls/transform-control/functions/skew.tsx
|
|
@@ -4780,20 +4808,28 @@ import { __ as __38 } from "@wordpress/i18n";
|
|
|
4780
4808
|
var skewAxisControls = [
|
|
4781
4809
|
{
|
|
4782
4810
|
label: __38("Skew X", "elementor"),
|
|
4783
|
-
|
|
4811
|
+
bind: "x",
|
|
4784
4812
|
startIcon: /* @__PURE__ */ React77.createElement(ArrowRightIcon3, { fontSize: "tiny" })
|
|
4785
4813
|
},
|
|
4786
4814
|
{
|
|
4787
4815
|
label: __38("Skew Y", "elementor"),
|
|
4788
|
-
|
|
4816
|
+
bind: "y",
|
|
4789
4817
|
startIcon: /* @__PURE__ */ React77.createElement(ArrowLeftIcon, { fontSize: "tiny", style: { transform: "scaleX(-1) rotate(-90deg)" } })
|
|
4790
4818
|
}
|
|
4791
4819
|
];
|
|
4792
4820
|
var skewUnits = ["deg", "rad", "grad", "turn"];
|
|
4793
4821
|
var Skew = () => {
|
|
4794
4822
|
const context = useBoundProp(skewTransformPropTypeUtil2);
|
|
4795
|
-
const
|
|
4796
|
-
return /* @__PURE__ */ React77.createElement(Grid26, { container: true, spacing: 1.5 }, /* @__PURE__ */ React77.createElement(PropProvider, { ...context }, /* @__PURE__ */ React77.createElement(PropKeyProvider, { bind: TransformFunctionKeys.skew }, skewAxisControls.map((control) => /* @__PURE__ */ React77.createElement(
|
|
4823
|
+
const rowRefs = [useRef18(null), useRef18(null), useRef18(null)];
|
|
4824
|
+
return /* @__PURE__ */ React77.createElement(Grid26, { container: true, spacing: 1.5 }, /* @__PURE__ */ React77.createElement(PropProvider, { ...context }, /* @__PURE__ */ React77.createElement(PropKeyProvider, { bind: TransformFunctionKeys.skew }, skewAxisControls.map((control, index) => /* @__PURE__ */ React77.createElement(
|
|
4825
|
+
AxisRow,
|
|
4826
|
+
{
|
|
4827
|
+
key: control.bind,
|
|
4828
|
+
...control,
|
|
4829
|
+
anchorRef: rowRefs[index],
|
|
4830
|
+
units: skewUnits
|
|
4831
|
+
}
|
|
4832
|
+
)))));
|
|
4797
4833
|
};
|
|
4798
4834
|
|
|
4799
4835
|
// src/controls/transform-control/use-transform-tabs-history.tsx
|
|
@@ -4969,17 +5005,23 @@ var Label2 = ({ label, value }) => {
|
|
|
4969
5005
|
|
|
4970
5006
|
// src/controls/transform-control/transform-repeater-control.tsx
|
|
4971
5007
|
var TransformRepeaterControl = createControl(() => {
|
|
4972
|
-
const
|
|
5008
|
+
const context = useBoundProp(transformPropTypeUtil);
|
|
5009
|
+
return /* @__PURE__ */ React81.createElement(PropProvider, { ...context }, /* @__PURE__ */ React81.createElement(PropKeyProvider, { bind: "transform-functions" }, /* @__PURE__ */ React81.createElement(Repeater2, null)));
|
|
5010
|
+
});
|
|
5011
|
+
var ToolTip = /* @__PURE__ */ React81.createElement(React81.Fragment, null, /* @__PURE__ */ React81.createElement(InfoCircleFilledIcon2, { sx: { color: "secondary.main" } }), /* @__PURE__ */ React81.createElement(Typography6, { variant: "body2", color: "text.secondary", fontSize: "14px" }, __41("You can use each kind of transform only once per element.", "elementor")));
|
|
5012
|
+
var Repeater2 = () => {
|
|
5013
|
+
const transformFunctionsContext = useBoundProp(transformFunctionsPropTypeUtil);
|
|
4973
5014
|
const availableValues = [initialTransformValue, initialScaleValue, initialRotateValue, initialSkewValue];
|
|
5015
|
+
const { value: transformValues } = transformFunctionsContext;
|
|
4974
5016
|
const getInitialValue = () => {
|
|
4975
5017
|
return availableValues.find((value) => !transformValues?.some((item) => item.$$type === value.$$type));
|
|
4976
5018
|
};
|
|
4977
5019
|
const shouldDisableAddItem = !getInitialValue();
|
|
4978
|
-
return /* @__PURE__ */ React81.createElement(PropProvider, {
|
|
5020
|
+
return /* @__PURE__ */ React81.createElement(PropProvider, { ...transformFunctionsContext }, /* @__PURE__ */ React81.createElement(
|
|
4979
5021
|
UnstableRepeater,
|
|
4980
5022
|
{
|
|
4981
5023
|
initial: getInitialValue() ?? initialTransformValue,
|
|
4982
|
-
propTypeUtil:
|
|
5024
|
+
propTypeUtil: transformFunctionsPropTypeUtil
|
|
4983
5025
|
},
|
|
4984
5026
|
/* @__PURE__ */ React81.createElement(Header, { label: __41("Transform", "elementor") }, /* @__PURE__ */ React81.createElement(
|
|
4985
5027
|
TooltipAddItemAction,
|
|
@@ -4992,8 +5034,7 @@ var TransformRepeaterControl = createControl(() => {
|
|
|
4992
5034
|
/* @__PURE__ */ React81.createElement(ItemsContainer, { itemTemplate: /* @__PURE__ */ React81.createElement(Item, { Icon: TransformIcon, Label: TransformLabel }) }, /* @__PURE__ */ React81.createElement(DisableItemAction, null), /* @__PURE__ */ React81.createElement(RemoveItemAction, null)),
|
|
4993
5035
|
/* @__PURE__ */ React81.createElement(EditItemPopover, null, /* @__PURE__ */ React81.createElement(TransformContent, null))
|
|
4994
5036
|
));
|
|
4995
|
-
}
|
|
4996
|
-
var ToolTip = /* @__PURE__ */ React81.createElement(React81.Fragment, null, /* @__PURE__ */ React81.createElement(InfoCircleFilledIcon2, { sx: { color: "secondary.main" } }), /* @__PURE__ */ React81.createElement(Typography6, { variant: "body2", color: "text.secondary", fontSize: "14px" }, __41("You can use each kind of transform only once per element.", "elementor")));
|
|
5037
|
+
};
|
|
4997
5038
|
|
|
4998
5039
|
// src/controls/transition-control/transition-repeater-control.tsx
|
|
4999
5040
|
import * as React84 from "react";
|