@elementor/editor-controls 4.1.0-792 → 4.1.0-796

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.mjs CHANGED
@@ -1172,7 +1172,7 @@ var SizeControl = createControl(
1172
1172
  const actualUnits = resolveUnits(propType, enablePropTypeUnits, variant, units2, actualExtendedOptions);
1173
1173
  const popupState = usePopupState2({ variant: "popover" });
1174
1174
  const memorizedExternalState = useMemo2(
1175
- () => sizeValue ? createStateFromSizeProp(sizeValue, actualDefaultUnit) : null,
1175
+ () => createStateFromSizeProp(sizeValue, actualDefaultUnit),
1176
1176
  [sizeValue, actualDefaultUnit]
1177
1177
  );
1178
1178
  const [state, setState] = useSyncExternalState({
@@ -1186,12 +1186,6 @@ var SizeControl = createControl(
1186
1186
  })
1187
1187
  });
1188
1188
  const { size: controlSize = DEFAULT_SIZE, unit: controlUnit = actualDefaultUnit } = extractValueFromState(state, true) || {};
1189
- const handleBlur = () => {
1190
- if (!extractValueFromState(state)) {
1191
- setState((prev) => ({ ...prev, unit: actualDefaultUnit }));
1192
- }
1193
- restoreValue();
1194
- };
1195
1189
  const handleUnitChange = (newUnit) => {
1196
1190
  if (newUnit === "custom") {
1197
1191
  popupState.open(anchorRef?.current);
@@ -1239,7 +1233,7 @@ var SizeControl = createControl(
1239
1233
  startIcon,
1240
1234
  handleSizeChange,
1241
1235
  handleUnitChange,
1242
- onBlur: handleBlur,
1236
+ onBlur: restoreValue,
1243
1237
  onClick: onInputClick,
1244
1238
  popupState,
1245
1239
  min,