@elementor/editor-editing-panel 3.32.0-54 → 3.32.0-55
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 +55 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +55 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +19 -19
- package/src/styles-inheritance/components/styles-inheritance-indicator.tsx +15 -5
- package/src/styles-inheritance/components/styles-inheritance-infotip.tsx +43 -7
package/dist/index.js
CHANGED
|
@@ -2753,10 +2753,27 @@ var ActionIcons = () => /* @__PURE__ */ React29.createElement(import_ui23.Box, {
|
|
|
2753
2753
|
|
|
2754
2754
|
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
2755
2755
|
var SECTION_PADDING_INLINE = 32;
|
|
2756
|
-
var StylesInheritanceInfotip = ({
|
|
2756
|
+
var StylesInheritanceInfotip = ({
|
|
2757
|
+
inheritanceChain,
|
|
2758
|
+
propType,
|
|
2759
|
+
path,
|
|
2760
|
+
label,
|
|
2761
|
+
children,
|
|
2762
|
+
isDisabled
|
|
2763
|
+
}) => {
|
|
2757
2764
|
const [showInfotip, setShowInfotip] = (0, import_react24.useState)(false);
|
|
2758
|
-
const toggleInfotip = () =>
|
|
2759
|
-
|
|
2765
|
+
const toggleInfotip = () => {
|
|
2766
|
+
if (isDisabled) {
|
|
2767
|
+
return;
|
|
2768
|
+
}
|
|
2769
|
+
setShowInfotip((prev) => !prev);
|
|
2770
|
+
};
|
|
2771
|
+
const closeInfotip = () => {
|
|
2772
|
+
if (isDisabled) {
|
|
2773
|
+
return;
|
|
2774
|
+
}
|
|
2775
|
+
setShowInfotip(false);
|
|
2776
|
+
};
|
|
2760
2777
|
const key = path.join(".");
|
|
2761
2778
|
const sectionWidth = useSectionWidth();
|
|
2762
2779
|
const resolve = (0, import_react24.useMemo)(() => {
|
|
@@ -2824,16 +2841,33 @@ var StylesInheritanceInfotip = ({ inheritanceChain, propType, path, label, child
|
|
|
2824
2841
|
}))
|
|
2825
2842
|
)
|
|
2826
2843
|
));
|
|
2827
|
-
|
|
2844
|
+
if (isDisabled) {
|
|
2845
|
+
return /* @__PURE__ */ React30.createElement(import_ui24.Box, { sx: { display: "inline-flex" } }, children);
|
|
2846
|
+
}
|
|
2847
|
+
return /* @__PURE__ */ React30.createElement(
|
|
2848
|
+
TooltipOrInfotip,
|
|
2849
|
+
{
|
|
2850
|
+
showInfotip,
|
|
2851
|
+
onClose: closeInfotip,
|
|
2852
|
+
infotipContent,
|
|
2853
|
+
isDisabled
|
|
2854
|
+
},
|
|
2855
|
+
/* @__PURE__ */ React30.createElement(import_ui24.IconButton, { onClick: toggleInfotip, "aria-label": label, sx: { my: "-1px" }, disabled: isDisabled }, children)
|
|
2856
|
+
);
|
|
2828
2857
|
};
|
|
2829
2858
|
function TooltipOrInfotip({
|
|
2830
2859
|
children,
|
|
2831
2860
|
showInfotip,
|
|
2832
2861
|
onClose,
|
|
2833
|
-
infotipContent
|
|
2862
|
+
infotipContent,
|
|
2863
|
+
isDisabled
|
|
2834
2864
|
}) {
|
|
2835
|
-
const
|
|
2865
|
+
const direction = useDirection();
|
|
2866
|
+
const isSiteRtl = direction.isSiteRtl;
|
|
2836
2867
|
const forceInfotipAlignLeft = isSiteRtl ? 9999999 : -9999999;
|
|
2868
|
+
if (isDisabled) {
|
|
2869
|
+
return /* @__PURE__ */ React30.createElement(import_ui24.Box, { sx: { display: "inline-flex" } }, children);
|
|
2870
|
+
}
|
|
2837
2871
|
if (showInfotip) {
|
|
2838
2872
|
return /* @__PURE__ */ React30.createElement(React30.Fragment, null, /* @__PURE__ */ React30.createElement(
|
|
2839
2873
|
import_ui24.Backdrop,
|
|
@@ -2876,16 +2910,25 @@ function TooltipOrInfotip({
|
|
|
2876
2910
|
}
|
|
2877
2911
|
|
|
2878
2912
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
2879
|
-
var
|
|
2913
|
+
var disabledControls = ["box-shadow", "background-overlay", "filter", "backdrop-filter", "transform"];
|
|
2880
2914
|
var StylesInheritanceIndicator = () => {
|
|
2881
2915
|
const { path, propType } = (0, import_editor_controls7.useBoundProp)();
|
|
2882
2916
|
const inheritanceChain = useStylesInheritanceChain(path);
|
|
2883
|
-
if (!path ||
|
|
2917
|
+
if (!path || !inheritanceChain.length) {
|
|
2884
2918
|
return null;
|
|
2885
2919
|
}
|
|
2886
|
-
|
|
2920
|
+
const isDisabled = path.some((pathItem) => disabledControls.includes(pathItem));
|
|
2921
|
+
return /* @__PURE__ */ React31.createElement(
|
|
2922
|
+
Indicator,
|
|
2923
|
+
{
|
|
2924
|
+
inheritanceChain,
|
|
2925
|
+
path,
|
|
2926
|
+
propType,
|
|
2927
|
+
isDisabled
|
|
2928
|
+
}
|
|
2929
|
+
);
|
|
2887
2930
|
};
|
|
2888
|
-
var Indicator = ({ inheritanceChain, path, propType }) => {
|
|
2931
|
+
var Indicator = ({ inheritanceChain, path, propType, isDisabled }) => {
|
|
2889
2932
|
const { id: currentStyleId, provider: currentStyleProvider, meta: currentStyleMeta } = useStyle();
|
|
2890
2933
|
const currentItem = currentStyleId ? getValueFromInheritanceChain(inheritanceChain, currentStyleId, currentStyleMeta) : null;
|
|
2891
2934
|
const hasValue = !(0, import_editor_props10.isEmpty)(currentItem?.value);
|
|
@@ -2905,7 +2948,8 @@ var Indicator = ({ inheritanceChain, path, propType }) => {
|
|
|
2905
2948
|
inheritanceChain,
|
|
2906
2949
|
path,
|
|
2907
2950
|
propType,
|
|
2908
|
-
label
|
|
2951
|
+
label,
|
|
2952
|
+
isDisabled
|
|
2909
2953
|
},
|
|
2910
2954
|
/* @__PURE__ */ React31.createElement(StyleIndicator, { ...styleIndicatorProps })
|
|
2911
2955
|
);
|