@elementor/editor-controls 3.33.0-296 → 3.33.0-298

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
@@ -6025,6 +6025,7 @@ import {
6025
6025
  bindTrigger as bindTrigger6,
6026
6026
  Box as Box22,
6027
6027
  IconButton as IconButton9,
6028
+ Infotip as Infotip4,
6028
6029
  Tooltip as Tooltip10,
6029
6030
  usePopupState as usePopupState8
6030
6031
  } from "@elementor/ui";
@@ -6042,6 +6043,7 @@ var Repeater3 = ({
6042
6043
  showToggle = true,
6043
6044
  showRemove = true,
6044
6045
  disableAddItemButton = false,
6046
+ addButtonInfotipContent,
6045
6047
  openItem: initialOpenItem = EMPTY_OPEN_ITEM2,
6046
6048
  isSortable = true
6047
6049
  }) => {
@@ -6106,17 +6108,31 @@ var Repeater3 = ({
6106
6108
  { action: { type: "reorder", payload: { ...meta } } }
6107
6109
  );
6108
6110
  };
6109
- return /* @__PURE__ */ React102.createElement(SectionContent, { gap: 2 }, /* @__PURE__ */ React102.createElement(RepeaterHeader, { label, adornment: ControlAdornments }, /* @__PURE__ */ React102.createElement(
6111
+ const isButtonDisabled = disabled || disableAddItemButton;
6112
+ const shouldShowInfotip = isButtonDisabled && addButtonInfotipContent;
6113
+ const addButton = /* @__PURE__ */ React102.createElement(
6110
6114
  IconButton9,
6111
6115
  {
6112
6116
  size: SIZE9,
6113
- sx: { ml: "auto" },
6114
- disabled: disabled || disableAddItemButton,
6117
+ sx: {
6118
+ ml: "auto"
6119
+ },
6120
+ disabled: isButtonDisabled,
6115
6121
  onClick: addRepeaterItem,
6116
6122
  "aria-label": __50("Add item", "elementor")
6117
6123
  },
6118
6124
  /* @__PURE__ */ React102.createElement(PlusIcon3, { fontSize: SIZE9 })
6119
- )), 0 < uniqueKeys.length && /* @__PURE__ */ React102.createElement(SortableProvider, { value: uniqueKeys, onChange: onChangeOrder }, uniqueKeys.map((key) => {
6125
+ );
6126
+ return /* @__PURE__ */ React102.createElement(SectionContent, { gap: 2 }, /* @__PURE__ */ React102.createElement(RepeaterHeader, { label, adornment: ControlAdornments }, shouldShowInfotip ? /* @__PURE__ */ React102.createElement(
6127
+ Infotip4,
6128
+ {
6129
+ placement: "right",
6130
+ content: addButtonInfotipContent,
6131
+ color: "secondary",
6132
+ slotProps: { popper: { sx: { width: 300 } } }
6133
+ },
6134
+ /* @__PURE__ */ React102.createElement(Box22, { sx: { ...isButtonDisabled ? { cursor: "not-allowed" } : {} } }, addButton)
6135
+ ) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */ React102.createElement(SortableProvider, { value: uniqueKeys, onChange: onChangeOrder }, uniqueKeys.map((key) => {
6120
6136
  const index = uniqueKeys.indexOf(key);
6121
6137
  const value = items2[index];
6122
6138
  if (!value) {