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

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elementor/editor-controls",
3
3
  "description": "This package contains the controls model and utils for the Elementor editor",
4
- "version": "4.1.0-792",
4
+ "version": "4.1.0-793",
5
5
  "private": false,
6
6
  "author": "Elementor Team",
7
7
  "homepage": "https://elementor.com/",
@@ -40,22 +40,22 @@
40
40
  "dev": "tsup --config=../../tsup.dev.ts"
41
41
  },
42
42
  "dependencies": {
43
- "@elementor/editor-current-user": "4.1.0-792",
44
- "@elementor/editor-elements": "4.1.0-792",
45
- "@elementor/editor-props": "4.1.0-792",
46
- "@elementor/editor-responsive": "4.1.0-792",
47
- "@elementor/editor-ui": "4.1.0-792",
48
- "@elementor/editor-v1-adapters": "4.1.0-792",
49
- "@elementor/env": "4.1.0-792",
50
- "@elementor/events": "4.1.0-792",
51
- "@elementor/http-client": "4.1.0-792",
43
+ "@elementor/editor-current-user": "4.1.0-793",
44
+ "@elementor/editor-elements": "4.1.0-793",
45
+ "@elementor/editor-props": "4.1.0-793",
46
+ "@elementor/editor-responsive": "4.1.0-793",
47
+ "@elementor/editor-ui": "4.1.0-793",
48
+ "@elementor/editor-v1-adapters": "4.1.0-793",
49
+ "@elementor/env": "4.1.0-793",
50
+ "@elementor/events": "4.1.0-793",
51
+ "@elementor/http-client": "4.1.0-793",
52
52
  "@elementor/icons": "^1.68.0",
53
- "@elementor/locations": "4.1.0-792",
54
- "@elementor/query": "4.1.0-792",
55
- "@elementor/session": "4.1.0-792",
53
+ "@elementor/locations": "4.1.0-793",
54
+ "@elementor/query": "4.1.0-793",
55
+ "@elementor/session": "4.1.0-793",
56
56
  "@elementor/ui": "1.37.5",
57
- "@elementor/utils": "4.1.0-792",
58
- "@elementor/wp-media": "4.1.0-792",
57
+ "@elementor/utils": "4.1.0-793",
58
+ "@elementor/wp-media": "4.1.0-793",
59
59
  "@monaco-editor/react": "^4.7.0",
60
60
  "@tiptap/extension-bold": "^3.11.1",
61
61
  "@tiptap/extension-document": "^3.11.1",
@@ -114,7 +114,7 @@ export const SizeControl = createControl(
114
114
  const popupState = usePopupState( { variant: 'popover' } );
115
115
 
116
116
  const memorizedExternalState = useMemo(
117
- () => ( sizeValue ? createStateFromSizeProp( sizeValue, actualDefaultUnit ) : null ),
117
+ () => createStateFromSizeProp( sizeValue, actualDefaultUnit ),
118
118
  [ sizeValue, actualDefaultUnit ]
119
119
  );
120
120
 
@@ -133,14 +133,6 @@ export const SizeControl = createControl(
133
133
  const { size: controlSize = DEFAULT_SIZE, unit: controlUnit = actualDefaultUnit } =
134
134
  extractValueFromState( state, true ) || {};
135
135
 
136
- const handleBlur = () => {
137
- if ( ! extractValueFromState( state ) ) {
138
- setState( ( prev ) => ( { ...prev, unit: actualDefaultUnit } ) );
139
- }
140
-
141
- restoreValue();
142
- };
143
-
144
136
  const handleUnitChange = ( newUnit: Unit | ExtendedOption ) => {
145
137
  if ( newUnit === 'custom' ) {
146
138
  popupState.open( anchorRef?.current );
@@ -198,7 +190,7 @@ export const SizeControl = createControl(
198
190
  startIcon={ startIcon }
199
191
  handleSizeChange={ handleSizeChange }
200
192
  handleUnitChange={ handleUnitChange }
201
- onBlur={ handleBlur }
193
+ onBlur={ restoreValue }
202
194
  onClick={ onInputClick }
203
195
  popupState={ popupState }
204
196
  min={ min }