@elementor/editor-editing-panel 4.2.0-beta2 → 4.3.0-1000
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
CHANGED
|
@@ -4828,6 +4828,9 @@ var DEPENDENT_PROP_NAMES = [
|
|
|
4828
4828
|
];
|
|
4829
4829
|
var PositionSection = () => {
|
|
4830
4830
|
const { value: position } = useStylesField("position", withHistoryLabel(POSITION_LABEL2));
|
|
4831
|
+
const inheritedPosition = useInheritedValues(["position"]).position;
|
|
4832
|
+
const resolvedPosition = position ?? inheritedPosition ?? null;
|
|
4833
|
+
const isPositionUnsetOrStatic = !resolvedPosition || resolvedPosition.value === POSITION_STATIC;
|
|
4831
4834
|
const positionPrevRef = (0, import_react29.useRef)(position);
|
|
4832
4835
|
const { values: dependentValues, setValues: setDependentValues } = useStylesFields(DEPENDENT_PROP_NAMES);
|
|
4833
4836
|
const [savedDependentValues, saveToHistory, clearHistory] = usePersistDimensions();
|
|
@@ -4839,12 +4842,12 @@ var PositionSection = () => {
|
|
|
4839
4842
|
setDependentValues({ ...savedDependentValues }, withHistoryLabel(DIMENSIONS_LABEL));
|
|
4840
4843
|
clearHistory();
|
|
4841
4844
|
}
|
|
4842
|
-
if (
|
|
4845
|
+
if (isPositionUnsetOrStatic && dependentValues?.["z-index"]) {
|
|
4843
4846
|
setDependentValues({ "z-index": null }, withHistoryLabel(DIMENSIONS_LABEL));
|
|
4844
4847
|
}
|
|
4845
4848
|
positionPrevRef.current = position;
|
|
4846
|
-
}, [position?.value]);
|
|
4847
|
-
return /* @__PURE__ */ React66.createElement(StyledSectionContent, null, /* @__PURE__ */ React66.createElement(PositionField, null), /* @__PURE__ */ React66.createElement(DimensionsField, null), /* @__PURE__ */ React66.createElement(ZIndexField, { disabled:
|
|
4849
|
+
}, [position?.value, isPositionUnsetOrStatic]);
|
|
4850
|
+
return /* @__PURE__ */ React66.createElement(StyledSectionContent, null, /* @__PURE__ */ React66.createElement(PositionField, null), /* @__PURE__ */ React66.createElement(DimensionsField, null), /* @__PURE__ */ React66.createElement(ZIndexField, { disabled: isPositionUnsetOrStatic }), /* @__PURE__ */ React66.createElement(PanelDivider, null), /* @__PURE__ */ React66.createElement(OffsetField, null));
|
|
4848
4851
|
};
|
|
4849
4852
|
var usePersistDimensions = () => {
|
|
4850
4853
|
const { id: styleDefID, meta } = useStyle();
|