@elementor/editor-components 3.35.0-478 → 3.35.0-479

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
@@ -1358,8 +1358,9 @@ function validatePropLabel(label, existingLabels, currentLabel) {
1358
1358
  var SIZE = "tiny";
1359
1359
  var DEFAULT_GROUP = { value: null, label: __6("Default", "elementor") };
1360
1360
  function OverridablePropForm({ onSubmit, groups, currentValue, existingLabels = [], sx }) {
1361
+ const selectGroups = groups?.length ? groups : [DEFAULT_GROUP];
1361
1362
  const [propLabel, setPropLabel] = useState2(currentValue?.label ?? null);
1362
- const [group, setGroup] = useState2(currentValue?.groupId ?? groups?.[0]?.value ?? null);
1363
+ const [group, setGroup] = useState2(currentValue?.groupId ?? selectGroups[0]?.value ?? null);
1363
1364
  const [error, setError] = useState2(null);
1364
1365
  const name = __6("Name", "elementor");
1365
1366
  const groupName = __6("Group Name", "elementor");
@@ -1415,14 +1416,13 @@ function OverridablePropForm({ onSubmit, groups, currentValue, existingLabels =
1415
1416
  onChange: (e) => setGroup(e.target.value),
1416
1417
  displayEmpty: true,
1417
1418
  renderValue: (selectedValue) => {
1418
- if (!selectedValue || selectedValue === "") {
1419
- const [firstGroup = DEFAULT_GROUP] = groups ?? [];
1420
- return firstGroup.label;
1419
+ if (!selectedValue) {
1420
+ return selectGroups[0].label;
1421
1421
  }
1422
- return groups?.find(({ value }) => value === selectedValue)?.label ?? selectedValue;
1422
+ return selectGroups.find(({ value }) => value === selectedValue)?.label ?? selectedValue;
1423
1423
  }
1424
1424
  },
1425
- (groups ?? [DEFAULT_GROUP]).map(({ label: groupLabel, ...props }) => /* @__PURE__ */ React3.createElement(MenuListItem, { key: props.value, ...props, value: props.value ?? "" }, groupLabel))
1425
+ selectGroups.map(({ label: groupLabel, ...props }) => /* @__PURE__ */ React3.createElement(MenuListItem, { key: props.value, ...props, value: props.value ?? "" }, groupLabel))
1426
1426
  ))), /* @__PURE__ */ React3.createElement(Stack3, { direction: "row", justifyContent: "flex-end", alignSelf: "end", mt: 1.5, py: 1, px: 1.5 }, /* @__PURE__ */ React3.createElement(
1427
1427
  Button2,
1428
1428
  {