@elementor/editor-editing-panel 3.35.0-371 → 3.35.0-372

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@elementor/editor-editing-panel",
3
- "version": "3.35.0-371",
3
+ "version": "3.35.0-372",
4
4
  "private": false,
5
5
  "author": "Elementor Team",
6
6
  "homepage": "https://elementor.com/",
@@ -39,27 +39,27 @@
39
39
  "dev": "tsup --config=../../tsup.dev.ts"
40
40
  },
41
41
  "dependencies": {
42
- "@elementor/editor": "3.35.0-371",
43
- "@elementor/editor-canvas": "3.35.0-371",
44
- "@elementor/editor-controls": "3.35.0-371",
45
- "@elementor/editor-documents": "3.35.0-371",
46
- "@elementor/editor-elements": "3.35.0-371",
47
- "@elementor/editor-interactions": "3.35.0-371",
48
- "@elementor/editor-panels": "3.35.0-371",
49
- "@elementor/editor-props": "3.35.0-371",
50
- "@elementor/editor-responsive": "3.35.0-371",
51
- "@elementor/editor-styles": "3.35.0-371",
52
- "@elementor/editor-styles-repository": "3.35.0-371",
53
- "@elementor/editor-ui": "3.35.0-371",
54
- "@elementor/editor-v1-adapters": "3.35.0-371",
42
+ "@elementor/editor": "3.35.0-372",
43
+ "@elementor/editor-canvas": "3.35.0-372",
44
+ "@elementor/editor-controls": "3.35.0-372",
45
+ "@elementor/editor-documents": "3.35.0-372",
46
+ "@elementor/editor-elements": "3.35.0-372",
47
+ "@elementor/editor-interactions": "3.35.0-372",
48
+ "@elementor/editor-panels": "3.35.0-372",
49
+ "@elementor/editor-props": "3.35.0-372",
50
+ "@elementor/editor-responsive": "3.35.0-372",
51
+ "@elementor/editor-styles": "3.35.0-372",
52
+ "@elementor/editor-styles-repository": "3.35.0-372",
53
+ "@elementor/editor-ui": "3.35.0-372",
54
+ "@elementor/editor-v1-adapters": "3.35.0-372",
55
55
  "@elementor/icons": "^1.63.0",
56
- "@elementor/locations": "3.35.0-371",
57
- "@elementor/menus": "3.35.0-371",
58
- "@elementor/schema": "3.35.0-371",
59
- "@elementor/session": "3.35.0-371",
56
+ "@elementor/locations": "3.35.0-372",
57
+ "@elementor/menus": "3.35.0-372",
58
+ "@elementor/schema": "3.35.0-372",
59
+ "@elementor/session": "3.35.0-372",
60
60
  "@elementor/ui": "1.36.17",
61
- "@elementor/utils": "3.35.0-371",
62
- "@elementor/wp-media": "3.35.0-371",
61
+ "@elementor/utils": "3.35.0-372",
62
+ "@elementor/wp-media": "3.35.0-372",
63
63
  "@wordpress/i18n": "^5.13.0"
64
64
  },
65
65
  "peerDependencies": {
@@ -9,7 +9,7 @@ import {
9
9
  type ToggleButtonGroupItem,
10
10
  useBoundProp,
11
11
  } from '@elementor/editor-controls';
12
- import { flexPropTypeUtil, type FlexPropValue, numberPropTypeUtil } from '@elementor/editor-props';
12
+ import { flexPropTypeUtil, type FlexPropValue, numberPropTypeUtil, sizePropTypeUtil } from '@elementor/editor-props';
13
13
  import { ExpandIcon, PencilIcon, ShrinkIcon } from '@elementor/icons';
14
14
  import { __ } from '@wordpress/i18n';
15
15
 
@@ -130,16 +130,16 @@ const createFlexValueForGroup = ( group: GroupItem | null, flexValue: FlexPropVa
130
130
  if ( group === 'flex-grow' ) {
131
131
  return flexPropTypeUtil.create( {
132
132
  flexGrow: numberPropTypeUtil.create( DEFAULT ),
133
- flexShrink: null,
134
- flexBasis: null,
133
+ flexShrink: numberPropTypeUtil.create( 0 ),
134
+ flexBasis: sizePropTypeUtil.create( { unit: 'auto', size: '' } ),
135
135
  } );
136
136
  }
137
137
 
138
138
  if ( group === 'flex-shrink' ) {
139
139
  return flexPropTypeUtil.create( {
140
- flexGrow: null,
140
+ flexGrow: numberPropTypeUtil.create( 0 ),
141
141
  flexShrink: numberPropTypeUtil.create( DEFAULT ),
142
- flexBasis: null,
142
+ flexBasis: sizePropTypeUtil.create( { unit: 'auto', size: '' } ),
143
143
  } );
144
144
  }
145
145
 
@@ -197,15 +197,17 @@ const getActiveGroup = ( {
197
197
  return null;
198
198
  }
199
199
 
200
- if ( ( shrink && grow ) || basis ) {
200
+ const isAutoBasis = basis === null || ( typeof basis === 'object' && basis.unit === 'auto' );
201
+
202
+ if ( basis && ! isAutoBasis ) {
201
203
  return 'custom';
202
204
  }
203
205
 
204
- if ( grow === DEFAULT ) {
206
+ if ( grow === DEFAULT && ( shrink === null || shrink === 0 ) && isAutoBasis ) {
205
207
  return 'flex-grow';
206
208
  }
207
209
 
208
- if ( shrink === DEFAULT ) {
210
+ if ( shrink === DEFAULT && ( grow === null || grow === 0 ) && isAutoBasis ) {
209
211
  return 'flex-shrink';
210
212
  }
211
213