@elementor/editor-controls 4.3.0-982 → 4.3.0-984

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.d.mts CHANGED
@@ -653,21 +653,7 @@ type SortableItemSettings<T> = BaseItemSettings<T> & {
653
653
  index: number;
654
654
  }) => string;
655
655
  };
656
- type RepeaterProps<T> = {
657
- label: string;
658
- values?: T[];
659
- openOnAdd?: boolean;
660
- setValues: (newValue: T[], _: CreateOptions, meta?: SetRepeaterValuesMeta<T>) => void;
661
- disabled?: boolean;
662
- disableAddItemButton?: boolean;
663
- addButtonInfotipContent?: React$1.ReactNode;
664
- showDuplicate?: boolean;
665
- showToggle?: boolean;
666
- showRemove?: boolean;
667
- openItem?: number;
668
- isSortable: false;
669
- itemSettings: BaseItemSettings<T>;
670
- } | {
656
+ type BaseProps<T> = {
671
657
  label: string;
672
658
  values?: T[];
673
659
  openOnAdd?: boolean;
@@ -679,10 +665,18 @@ type RepeaterProps<T> = {
679
665
  showToggle?: boolean;
680
666
  showRemove?: boolean;
681
667
  openItem?: number;
668
+ adornment?: React$1.FC;
669
+ };
670
+ type SortableProps<T> = BaseProps<T> & {
682
671
  isSortable?: true;
683
672
  itemSettings: SortableItemSettings<T>;
684
673
  };
685
- declare const Repeater: <T>({ label, itemSettings, disabled, openOnAdd, values: items, setValues: setItems, showDuplicate, showToggle, showRemove, disableAddItemButton, addButtonInfotipContent, openItem: initialOpenItem, isSortable, }: RepeaterProps<RepeaterItem<T>>) => React$1.JSX.Element;
674
+ type NonSortableProps<T> = BaseProps<T> & {
675
+ isSortable?: false;
676
+ itemSettings: BaseItemSettings<T>;
677
+ };
678
+ type RepeaterProps<T> = SortableProps<T> | NonSortableProps<T>;
679
+ declare const Repeater: <T>({ label, itemSettings, disabled, openOnAdd, values: items, setValues: setItems, showDuplicate, showToggle, showRemove, disableAddItemButton, addButtonInfotipContent, openItem: initialOpenItem, isSortable, adornment, }: RepeaterProps<RepeaterItem<T>>) => React$1.JSX.Element;
686
680
 
687
681
  declare const PopoverGridContainer: React$1.ForwardRefExoticComponent<{
688
682
  gap?: number;
package/dist/index.d.ts CHANGED
@@ -653,21 +653,7 @@ type SortableItemSettings<T> = BaseItemSettings<T> & {
653
653
  index: number;
654
654
  }) => string;
655
655
  };
656
- type RepeaterProps<T> = {
657
- label: string;
658
- values?: T[];
659
- openOnAdd?: boolean;
660
- setValues: (newValue: T[], _: CreateOptions, meta?: SetRepeaterValuesMeta<T>) => void;
661
- disabled?: boolean;
662
- disableAddItemButton?: boolean;
663
- addButtonInfotipContent?: React$1.ReactNode;
664
- showDuplicate?: boolean;
665
- showToggle?: boolean;
666
- showRemove?: boolean;
667
- openItem?: number;
668
- isSortable: false;
669
- itemSettings: BaseItemSettings<T>;
670
- } | {
656
+ type BaseProps<T> = {
671
657
  label: string;
672
658
  values?: T[];
673
659
  openOnAdd?: boolean;
@@ -679,10 +665,18 @@ type RepeaterProps<T> = {
679
665
  showToggle?: boolean;
680
666
  showRemove?: boolean;
681
667
  openItem?: number;
668
+ adornment?: React$1.FC;
669
+ };
670
+ type SortableProps<T> = BaseProps<T> & {
682
671
  isSortable?: true;
683
672
  itemSettings: SortableItemSettings<T>;
684
673
  };
685
- declare const Repeater: <T>({ label, itemSettings, disabled, openOnAdd, values: items, setValues: setItems, showDuplicate, showToggle, showRemove, disableAddItemButton, addButtonInfotipContent, openItem: initialOpenItem, isSortable, }: RepeaterProps<RepeaterItem<T>>) => React$1.JSX.Element;
674
+ type NonSortableProps<T> = BaseProps<T> & {
675
+ isSortable?: false;
676
+ itemSettings: BaseItemSettings<T>;
677
+ };
678
+ type RepeaterProps<T> = SortableProps<T> | NonSortableProps<T>;
679
+ declare const Repeater: <T>({ label, itemSettings, disabled, openOnAdd, values: items, setValues: setItems, showDuplicate, showToggle, showRemove, disableAddItemButton, addButtonInfotipContent, openItem: initialOpenItem, isSortable, adornment, }: RepeaterProps<RepeaterItem<T>>) => React$1.JSX.Element;
686
680
 
687
681
  declare const PopoverGridContainer: React$1.ForwardRefExoticComponent<{
688
682
  gap?: number;
package/dist/index.js CHANGED
@@ -8665,7 +8665,8 @@ var Repeater3 = ({
8665
8665
  disableAddItemButton = false,
8666
8666
  addButtonInfotipContent,
8667
8667
  openItem: initialOpenItem = EMPTY_OPEN_ITEM2,
8668
- isSortable = true
8668
+ isSortable = true,
8669
+ adornment = ControlAdornments
8669
8670
  }) => {
8670
8671
  const [openItem, setOpenItem] = (0, import_react73.useState)(initialOpenItem);
8671
8672
  const uniqueKeys = items2.map(
@@ -8743,7 +8744,7 @@ var Repeater3 = ({
8743
8744
  },
8744
8745
  /* @__PURE__ */ React126.createElement(import_icons40.PlusIcon, { fontSize: SIZE12 })
8745
8746
  );
8746
- return /* @__PURE__ */ React126.createElement(SectionContent, { gap: 2 }, /* @__PURE__ */ React126.createElement(RepeaterHeader, { label, adornment: ControlAdornments }, shouldShowInfotip ? /* @__PURE__ */ React126.createElement(
8747
+ return /* @__PURE__ */ React126.createElement(SectionContent, { gap: 2 }, /* @__PURE__ */ React126.createElement(RepeaterHeader, { label, adornment }, shouldShowInfotip ? /* @__PURE__ */ React126.createElement(
8747
8748
  import_ui110.Infotip,
8748
8749
  {
8749
8750
  placement: "right",