@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/dist/index.js +2 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -15
- package/src/controls/size-control.tsx +2 -10
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-
|
|
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-
|
|
44
|
-
"@elementor/editor-elements": "4.1.0-
|
|
45
|
-
"@elementor/editor-props": "4.1.0-
|
|
46
|
-
"@elementor/editor-responsive": "4.1.0-
|
|
47
|
-
"@elementor/editor-ui": "4.1.0-
|
|
48
|
-
"@elementor/editor-v1-adapters": "4.1.0-
|
|
49
|
-
"@elementor/env": "4.1.0-
|
|
50
|
-
"@elementor/events": "4.1.0-
|
|
51
|
-
"@elementor/http-client": "4.1.0-
|
|
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-
|
|
54
|
-
"@elementor/query": "4.1.0-
|
|
55
|
-
"@elementor/session": "4.1.0-
|
|
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-
|
|
58
|
-
"@elementor/wp-media": "4.1.0-
|
|
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
|
-
() =>
|
|
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={
|
|
193
|
+
onBlur={ restoreValue }
|
|
202
194
|
onClick={ onInputClick }
|
|
203
195
|
popupState={ popupState }
|
|
204
196
|
min={ min }
|