@elementor/editor-editing-panel 1.39.0 → 1.40.0

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
@@ -283,6 +283,7 @@ function useFilterOptions(parameters) {
283
283
  }
284
284
 
285
285
  // src/components/creatable-autocomplete/creatable-autocomplete.tsx
286
+ var MIN_INPUT_LENGTH = 2;
286
287
  var CreatableAutocomplete = React4.forwardRef(CreatableAutocompleteInner);
287
288
  function CreatableAutocompleteInner({
288
289
  selected,
@@ -311,6 +312,7 @@ function CreatableAutocompleteInner({
311
312
  });
312
313
  const filterOptions = useFilterOptions({ options: options12, selected, onCreate, entityName });
313
314
  const isCreatable = Boolean(onCreate);
315
+ const freeSolo = isCreatable || inputValue.length < MIN_INPUT_LENGTH || void 0;
314
316
  return /* @__PURE__ */ React4.createElement(
315
317
  Autocomplete,
316
318
  {
@@ -327,8 +329,8 @@ function CreatableAutocompleteInner({
327
329
  },
328
330
  ...props,
329
331
  ref,
330
- freeSolo: isCreatable || void 0,
331
- forcePopupIcon: isCreatable ? false : void 0,
332
+ freeSolo,
333
+ forcePopupIcon: false,
332
334
  multiple: true,
333
335
  clearOnBlur: true,
334
336
  selectOnFocus: true,
@@ -969,7 +971,7 @@ var EmptyState = ({ searchValue, onClear }) => /* @__PURE__ */ React8.createElem
969
971
  },
970
972
  /* @__PURE__ */ React8.createElement(ColorSwatchIcon, { sx: { transform: "rotate(90deg)" }, fontSize: "large" }),
971
973
  /* @__PURE__ */ React8.createElement(Typography3, { align: "center", variant: "subtitle2" }, __4("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React8.createElement("br", null), "\u201C", searchValue, "\u201D."),
972
- /* @__PURE__ */ React8.createElement(Typography3, { align: "center", variant: "caption", sx: { mb: 2 } }, __4("With your role as an editor,", "elementor"), /* @__PURE__ */ React8.createElement("br", null), __4("you can only use existing classes.", "elementor")),
974
+ /* @__PURE__ */ React8.createElement(Typography3, { align: "center", variant: "caption", sx: { mb: 2 } }, __4("With your current role,", "elementor"), /* @__PURE__ */ React8.createElement("br", null), __4("you can only use existing classes.", "elementor")),
973
975
  /* @__PURE__ */ React8.createElement(Link, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, __4("Clear & try again", "elementor"))
974
976
  ));
975
977
  var updateClassByProvider = (provider, data) => {
@@ -3090,7 +3092,7 @@ var positionOptions2 = [
3090
3092
  { label: __28("Scale down", "elementor"), value: "scale-down" }
3091
3093
  ];
3092
3094
  var ObjectFitField = ({ onChange }) => {
3093
- return /* @__PURE__ */ React52.createElement(StylesField, { bind: "object-fit" }, /* @__PURE__ */ React52.createElement(Grid13, { container: true, pt: 2, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React52.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(ControlLabel, null, __28("Object fit", "elementor"))), /* @__PURE__ */ React52.createElement(Grid13, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React52.createElement(SelectControl4, { options: positionOptions2, onChange }))));
3095
+ return /* @__PURE__ */ React52.createElement(StylesField, { bind: "object-fit" }, /* @__PURE__ */ React52.createElement(Grid13, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React52.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(ControlLabel, null, __28("Object fit", "elementor"))), /* @__PURE__ */ React52.createElement(Grid13, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React52.createElement(SelectControl4, { options: positionOptions2, onChange }))));
3094
3096
  };
3095
3097
 
3096
3098
  // src/components/style-sections/size-section/object-position-field.tsx
@@ -3110,7 +3112,7 @@ var positionOptions3 = [
3110
3112
  { label: __29("Bottom right", "elementor"), value: "bottom right" }
3111
3113
  ];
3112
3114
  var ObjectPositionField = ({ onChange }) => {
3113
- return /* @__PURE__ */ React53.createElement(StylesField, { bind: "object-position" }, /* @__PURE__ */ React53.createElement(Grid14, { container: true, pt: 2, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React53.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React53.createElement(ControlLabel, null, __29("Object position", "elementor"))), /* @__PURE__ */ React53.createElement(Grid14, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React53.createElement(SelectControl5, { options: positionOptions3, onChange }))));
3115
+ return /* @__PURE__ */ React53.createElement(StylesField, { bind: "object-position" }, /* @__PURE__ */ React53.createElement(Grid14, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React53.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React53.createElement(ControlLabel, null, __29("Object position", "elementor"))), /* @__PURE__ */ React53.createElement(Grid14, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React53.createElement(SelectControl5, { options: positionOptions3, onChange }))));
3114
3116
  };
3115
3117
 
3116
3118
  // src/components/style-sections/size-section/overflow-field.tsx
@@ -3170,7 +3172,7 @@ var SizeSection = () => {
3170
3172
  label: __31("Min height", "elementor"),
3171
3173
  extendedValues: ["auto"]
3172
3174
  }
3173
- ))), /* @__PURE__ */ React55.createElement(Grid16, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React55.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(SizeField, { bind: "max-width", label: __31("Max width", "elementor") })), /* @__PURE__ */ React55.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(SizeField, { bind: "max-height", label: __31("Max height", "elementor") }))), /* @__PURE__ */ React55.createElement(PanelDivider, null), /* @__PURE__ */ React55.createElement(Stack15, null, /* @__PURE__ */ React55.createElement(OverflowField, null)), isVersion330Active && /* @__PURE__ */ React55.createElement(Stack15, null, /* @__PURE__ */ React55.createElement(StylesField, { bind: "aspect-ratio" }, /* @__PURE__ */ React55.createElement(AspectRatioControl, { label: __31("Aspect Ratio", "elementor") }))), isVersion330Active && /* @__PURE__ */ React55.createElement(CollapsibleContent, null, /* @__PURE__ */ React55.createElement(ObjectFitField, { onChange: onFitChange }), /* @__PURE__ */ React55.createElement(Grid16, { item: true, xs: 6 }, isNotFill && /* @__PURE__ */ React55.createElement(ObjectPositionField, null))));
3175
+ ))), /* @__PURE__ */ React55.createElement(Grid16, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React55.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(SizeField, { bind: "max-width", label: __31("Max width", "elementor") })), /* @__PURE__ */ React55.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(SizeField, { bind: "max-height", label: __31("Max height", "elementor") }))), /* @__PURE__ */ React55.createElement(PanelDivider, null), /* @__PURE__ */ React55.createElement(Stack15, null, /* @__PURE__ */ React55.createElement(OverflowField, null)), isVersion330Active && /* @__PURE__ */ React55.createElement(CollapsibleContent, null, /* @__PURE__ */ React55.createElement(Stack15, { gap: 2 }, /* @__PURE__ */ React55.createElement(StylesField, { bind: "aspect-ratio" }, /* @__PURE__ */ React55.createElement(AspectRatioControl, { label: __31("Aspect Ratio", "elementor") })), /* @__PURE__ */ React55.createElement(PanelDivider, null), /* @__PURE__ */ React55.createElement(ObjectFitField, { onChange: onFitChange }), isNotFill && /* @__PURE__ */ React55.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(ObjectPositionField, null)))));
3174
3176
  };
3175
3177
  var SizeField = ({ label, bind, extendedValues }) => {
3176
3178
  return /* @__PURE__ */ React55.createElement(StylesField, { bind }, /* @__PURE__ */ React55.createElement(Grid16, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React55.createElement(Grid16, { item: true, xs: 12 }, /* @__PURE__ */ React55.createElement(ControlLabel, null, label)), /* @__PURE__ */ React55.createElement(Grid16, { item: true, xs: 12 }, /* @__PURE__ */ React55.createElement(SizeControl5, { extendedValues }))));