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

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
@@ -3693,7 +3693,7 @@ import {
3693
3693
  SizeControl as SizeControl3,
3694
3694
  useBoundProp as useBoundProp3
3695
3695
  } from "@elementor/editor-controls";
3696
- import { flexPropTypeUtil, numberPropTypeUtil as numberPropTypeUtil2 } from "@elementor/editor-props";
3696
+ import { flexPropTypeUtil, numberPropTypeUtil as numberPropTypeUtil2, sizePropTypeUtil as sizePropTypeUtil2 } from "@elementor/editor-props";
3697
3697
  import { ExpandIcon, PencilIcon as PencilIcon2, ShrinkIcon } from "@elementor/icons";
3698
3698
  import { __ as __24 } from "@wordpress/i18n";
3699
3699
  var FLEX_SIZE_LABEL = __24("Flex Size", "elementor");
@@ -3774,15 +3774,15 @@ var createFlexValueForGroup = (group, flexValue) => {
3774
3774
  if (group === "flex-grow") {
3775
3775
  return flexPropTypeUtil.create({
3776
3776
  flexGrow: numberPropTypeUtil2.create(DEFAULT),
3777
- flexShrink: null,
3778
- flexBasis: null
3777
+ flexShrink: numberPropTypeUtil2.create(0),
3778
+ flexBasis: sizePropTypeUtil2.create({ unit: "auto", size: "" })
3779
3779
  });
3780
3780
  }
3781
3781
  if (group === "flex-shrink") {
3782
3782
  return flexPropTypeUtil.create({
3783
- flexGrow: null,
3783
+ flexGrow: numberPropTypeUtil2.create(0),
3784
3784
  flexShrink: numberPropTypeUtil2.create(DEFAULT),
3785
- flexBasis: null
3785
+ flexBasis: sizePropTypeUtil2.create({ unit: "auto", size: "" })
3786
3786
  });
3787
3787
  }
3788
3788
  if (group === "custom") {
@@ -3810,13 +3810,14 @@ var getActiveGroup = ({
3810
3810
  if (null === grow && null === shrink && !basis) {
3811
3811
  return null;
3812
3812
  }
3813
- if (shrink && grow || basis) {
3813
+ const isAutoBasis = basis === null || typeof basis === "object" && basis.unit === "auto";
3814
+ if (basis && !isAutoBasis) {
3814
3815
  return "custom";
3815
3816
  }
3816
- if (grow === DEFAULT) {
3817
+ if (grow === DEFAULT && (shrink === null || shrink === 0) && isAutoBasis) {
3817
3818
  return "flex-grow";
3818
3819
  }
3819
- if (shrink === DEFAULT) {
3820
+ if (shrink === DEFAULT && (grow === null || grow === 0) && isAutoBasis) {
3820
3821
  return "flex-shrink";
3821
3822
  }
3822
3823
  return "custom";