@elementor/editor-controls 4.1.0-760 → 4.1.0-761
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
|
@@ -6980,9 +6980,12 @@ var useUnitSync = ({ unit, setUnit, persistWhen }) => {
|
|
|
6980
6980
|
setState(unit);
|
|
6981
6981
|
}
|
|
6982
6982
|
}, [unit]);
|
|
6983
|
+
const isExtendedUnit2 = (value) => {
|
|
6984
|
+
return Object.values(EXTENDED_UNITS).includes(value);
|
|
6985
|
+
};
|
|
6983
6986
|
const setInternalValue = (newUnit) => {
|
|
6984
6987
|
setState(newUnit);
|
|
6985
|
-
if (persistWhen()) {
|
|
6988
|
+
if (isExtendedUnit2(newUnit) || persistWhen()) {
|
|
6986
6989
|
setUnit(newUnit);
|
|
6987
6990
|
}
|
|
6988
6991
|
};
|
|
@@ -7373,9 +7376,10 @@ var resolveBoundPropValue = (value, boundPropPlaceholder, propPlaceholder) => {
|
|
|
7373
7376
|
{ candidate: boundPropPlaceholder, resolve: toUnitPlaceholder }
|
|
7374
7377
|
]);
|
|
7375
7378
|
const placeholderSource = propPlaceholder ?? boundPropPlaceholder;
|
|
7379
|
+
const hasValue2 = Boolean(value);
|
|
7376
7380
|
return {
|
|
7377
7381
|
sizeValue,
|
|
7378
|
-
placeholder: resolvePlaceholder(placeholderSource)
|
|
7382
|
+
placeholder: hasValue2 ? void 0 : resolvePlaceholder(placeholderSource)
|
|
7379
7383
|
};
|
|
7380
7384
|
};
|
|
7381
7385
|
var toUnitPlaceholder = (v) => ({ ...v, size: "" });
|