@elementor/editor-controls 0.25.0 → 0.27.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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @elementor/editor-controls
2
2
 
3
+ ## 0.27.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 093b7ca: Add support for multiple control replacements
8
+ - 10cbbe9: update `@elementor/ui` version
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies [10cbbe9]
13
+ - @elementor/editor-ui@0.8.0
14
+
15
+ ## 0.26.0
16
+
17
+ ### Minor Changes
18
+
19
+ - 0ab4b84: Alignment for the controls (right-side) settings & styles tabs
20
+
3
21
  ## 0.25.0
4
22
 
5
23
  ### Minor Changes
package/dist/index.d.mts CHANGED
@@ -16,10 +16,10 @@ declare const TextControl: ControlComponent<({ placeholder }: {
16
16
  placeholder?: string;
17
17
  }) => React.JSX.Element>;
18
18
 
19
- type Props$5 = {
19
+ type Props$6 = {
20
20
  placeholder?: string;
21
21
  };
22
- declare const TextAreaControl: ControlComponent<({ placeholder }: Props$5) => React.JSX.Element>;
22
+ declare const TextAreaControl: ControlComponent<({ placeholder }: Props$6) => React.JSX.Element>;
23
23
 
24
24
  type ExtendedValue = 'auto';
25
25
  type Unit = 'px' | '%' | 'em' | 'rem' | 'vw' | 'vh';
@@ -35,7 +35,7 @@ declare const StrokeControl: ControlComponent<() => React.JSX.Element>;
35
35
 
36
36
  declare const BoxShadowRepeaterControl: ControlComponent<() => React.JSX.Element>;
37
37
 
38
- type Props$4 = {
38
+ type Props$5 = {
39
39
  options: Array<{
40
40
  label: string;
41
41
  value: StringPropValue['value'];
@@ -43,12 +43,12 @@ type Props$4 = {
43
43
  }>;
44
44
  onChange?: (newValue: string | null, previousValue: string | null | undefined) => void;
45
45
  };
46
- declare const SelectControl: ControlComponent<({ options, onChange }: Props$4) => React.JSX.Element>;
46
+ declare const SelectControl: ControlComponent<({ options, onChange }: Props$5) => React.JSX.Element>;
47
47
 
48
- type Props$3 = Partial<Omit<UnstableColorFieldProps, 'value' | 'onChange'>> & {
48
+ type Props$4 = Partial<Omit<UnstableColorFieldProps, 'value' | 'onChange'>> & {
49
49
  propTypeUtil?: PropTypeUtil<string, string>;
50
50
  };
51
- declare const ColorControl: ControlComponent<({ propTypeUtil, ...props }: Props$3) => React.JSX.Element>;
51
+ declare const ColorControl: ControlComponent<({ propTypeUtil, ...props }: Props$4) => React.JSX.Element>;
52
52
 
53
53
  type RenderContentProps = {
54
54
  size: ToggleButtonProps['size'];
@@ -61,7 +61,7 @@ type ToggleButtonGroupItem<TValue> = {
61
61
  };
62
62
  type ExclusiveValue<TValue> = TValue;
63
63
  type NonExclusiveValue<TValue> = TValue[];
64
- type Props$2<TValue> = {
64
+ type Props$3<TValue> = {
65
65
  justify?: StackProps['justifyContent'];
66
66
  size?: ToggleButtonProps['size'];
67
67
  items: ToggleButtonGroupItem<TValue | null>[];
@@ -75,7 +75,7 @@ type Props$2<TValue> = {
75
75
  value: ExclusiveValue<TValue>;
76
76
  onChange: (value: ExclusiveValue<TValue>) => void;
77
77
  });
78
- declare const ControlToggleButtonGroup: <TValue>({ justify, size, value, onChange, items, exclusive, fullWidth, }: Props$2<TValue>) => React.JSX.Element;
78
+ declare const ControlToggleButtonGroup: <TValue>({ justify, size, value, onChange, items, exclusive, fullWidth, }: Props$3<TValue>) => React.JSX.Element;
79
79
 
80
80
  type ToggleControlProps<T extends PropValue> = {
81
81
  options: Array<ToggleButtonGroupItem<T> & {
@@ -102,14 +102,14 @@ type Item = {
102
102
  bind: PropKey;
103
103
  };
104
104
  type EqualUnequalItems = [Item, Item, Item, Item];
105
- type Props$1<TMultiPropType extends string, TPropValue extends MultiSizePropValue> = {
105
+ type Props$2<TMultiPropType extends string, TPropValue extends MultiSizePropValue> = {
106
106
  label: string;
107
107
  icon: ReactNode;
108
108
  tooltipLabel: string;
109
109
  items: EqualUnequalItems;
110
110
  multiSizePropTypeUtil: PropTypeUtil<TMultiPropType, TPropValue>;
111
111
  };
112
- declare function EqualUnequalSizesControl<TMultiPropType extends string, TPropValue extends MultiSizePropValue>({ label, icon, tooltipLabel, items, multiSizePropTypeUtil, }: Props$1<TMultiPropType, TPropValue>): React.JSX.Element;
112
+ declare function EqualUnequalSizesControl<TMultiPropType extends string, TPropValue extends MultiSizePropValue>({ label, icon, tooltipLabel, items, multiSizePropTypeUtil, }: Props$2<TMultiPropType, TPropValue>): React.JSX.Element;
113
113
 
114
114
  declare const LinkedDimensionsControl: ControlComponent<({ label, isSiteRtl, extendedValues, }: {
115
115
  label: string;
@@ -136,7 +136,7 @@ type ControlProps<TControlProps = unknown> = TControlProps & {
136
136
  };
137
137
  };
138
138
 
139
- type Props = ControlProps<{
139
+ type Props$1 = ControlProps<{
140
140
  queryOptions: {
141
141
  requestParams: Record<string, unknown>;
142
142
  endpoint: string;
@@ -145,7 +145,7 @@ type Props = ControlProps<{
145
145
  minInputLength?: number;
146
146
  placeholder?: string;
147
147
  }>;
148
- declare const LinkControl: ControlComponent<(props: Props) => React.JSX.Element>;
148
+ declare const LinkControl: ControlComponent<(props: Props$1) => React.JSX.Element>;
149
149
 
150
150
  declare const GapControl: ControlComponent<({ label }: {
151
151
  label: string;
@@ -215,17 +215,20 @@ type UseBoundProp<TValue extends PropValue> = {
215
215
  declare function useBoundProp<T extends PropValue = PropValue>(): PropKeyContextValue<T, PropType>;
216
216
  declare function useBoundProp<TKey extends string, TValue extends PropValue>(propTypeUtil: PropTypeUtil<TKey, TValue>): UseBoundProp<TValue>;
217
217
 
218
- type ReplaceWhenParams = {
219
- value: PropValue;
220
- };
221
- type CreateControlReplacement = {
218
+ type ControlReplacement = {
222
219
  component: ComponentType;
223
- condition: ({ value }: ReplaceWhenParams) => boolean;
220
+ condition: ({ value }: ConditionArgs) => boolean;
224
221
  };
225
- declare const ControlReplacementProvider: ({ component, condition, children, }: React.PropsWithChildren<CreateControlReplacement>) => React.JSX.Element;
226
- declare const createControlReplacement: () => {
227
- replaceControl: ({ component, condition }: CreateControlReplacement) => void;
228
- getControlReplacement: () => CreateControlReplacement;
222
+ type ConditionArgs = {
223
+ value: PropValue;
224
+ };
225
+ type Props = PropsWithChildren<{
226
+ replacements: ControlReplacement[];
227
+ }>;
228
+ declare const ControlReplacementsProvider: ({ replacements, children }: Props) => React.JSX.Element;
229
+ declare const createControlReplacementsRegistry: () => {
230
+ registerControlReplacement: (replacement: ControlReplacement) => void;
231
+ getControlReplacements: () => ControlReplacement[];
229
232
  };
230
233
 
231
234
  type ControlAdornmentsItems = Array<{
@@ -248,4 +251,4 @@ type UseInternalStateOptions<TValue> = {
248
251
  };
249
252
  declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhen, fallback, }: UseInternalStateOptions<TValue>) => readonly [TValue, (setter: ((value: TValue) => TValue) | TValue) => void];
250
253
 
251
- export { BackgroundControl, BoxShadowRepeaterControl, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent, ControlFormLabel, ControlReplacementProvider, ControlToggleButtonGroup, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedValue, type FontCategory, FontFamilyControl, GapControl, ImageControl, LinkControl, LinkedDimensionsControl, NumberControl, PropKeyProvider, PropProvider, type PropProviderProps, SelectControl, type SetValue, SizeControl, StrokeControl, SvgMediaControl, TextAreaControl, TextControl, type ToggleButtonGroupItem, ToggleControl, type ToggleControlProps, UrlControl, createControlReplacement, useBoundProp, useControlActions, useSyncExternalState };
254
+ export { BackgroundControl, BoxShadowRepeaterControl, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent, ControlFormLabel, ControlReplacementsProvider, ControlToggleButtonGroup, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedValue, type FontCategory, FontFamilyControl, GapControl, ImageControl, LinkControl, LinkedDimensionsControl, NumberControl, PropKeyProvider, PropProvider, type PropProviderProps, SelectControl, type SetValue, SizeControl, StrokeControl, SvgMediaControl, TextAreaControl, TextControl, type ToggleButtonGroupItem, ToggleControl, type ToggleControlProps, UrlControl, createControlReplacementsRegistry, useBoundProp, useControlActions, useSyncExternalState };
package/dist/index.d.ts CHANGED
@@ -16,10 +16,10 @@ declare const TextControl: ControlComponent<({ placeholder }: {
16
16
  placeholder?: string;
17
17
  }) => React.JSX.Element>;
18
18
 
19
- type Props$5 = {
19
+ type Props$6 = {
20
20
  placeholder?: string;
21
21
  };
22
- declare const TextAreaControl: ControlComponent<({ placeholder }: Props$5) => React.JSX.Element>;
22
+ declare const TextAreaControl: ControlComponent<({ placeholder }: Props$6) => React.JSX.Element>;
23
23
 
24
24
  type ExtendedValue = 'auto';
25
25
  type Unit = 'px' | '%' | 'em' | 'rem' | 'vw' | 'vh';
@@ -35,7 +35,7 @@ declare const StrokeControl: ControlComponent<() => React.JSX.Element>;
35
35
 
36
36
  declare const BoxShadowRepeaterControl: ControlComponent<() => React.JSX.Element>;
37
37
 
38
- type Props$4 = {
38
+ type Props$5 = {
39
39
  options: Array<{
40
40
  label: string;
41
41
  value: StringPropValue['value'];
@@ -43,12 +43,12 @@ type Props$4 = {
43
43
  }>;
44
44
  onChange?: (newValue: string | null, previousValue: string | null | undefined) => void;
45
45
  };
46
- declare const SelectControl: ControlComponent<({ options, onChange }: Props$4) => React.JSX.Element>;
46
+ declare const SelectControl: ControlComponent<({ options, onChange }: Props$5) => React.JSX.Element>;
47
47
 
48
- type Props$3 = Partial<Omit<UnstableColorFieldProps, 'value' | 'onChange'>> & {
48
+ type Props$4 = Partial<Omit<UnstableColorFieldProps, 'value' | 'onChange'>> & {
49
49
  propTypeUtil?: PropTypeUtil<string, string>;
50
50
  };
51
- declare const ColorControl: ControlComponent<({ propTypeUtil, ...props }: Props$3) => React.JSX.Element>;
51
+ declare const ColorControl: ControlComponent<({ propTypeUtil, ...props }: Props$4) => React.JSX.Element>;
52
52
 
53
53
  type RenderContentProps = {
54
54
  size: ToggleButtonProps['size'];
@@ -61,7 +61,7 @@ type ToggleButtonGroupItem<TValue> = {
61
61
  };
62
62
  type ExclusiveValue<TValue> = TValue;
63
63
  type NonExclusiveValue<TValue> = TValue[];
64
- type Props$2<TValue> = {
64
+ type Props$3<TValue> = {
65
65
  justify?: StackProps['justifyContent'];
66
66
  size?: ToggleButtonProps['size'];
67
67
  items: ToggleButtonGroupItem<TValue | null>[];
@@ -75,7 +75,7 @@ type Props$2<TValue> = {
75
75
  value: ExclusiveValue<TValue>;
76
76
  onChange: (value: ExclusiveValue<TValue>) => void;
77
77
  });
78
- declare const ControlToggleButtonGroup: <TValue>({ justify, size, value, onChange, items, exclusive, fullWidth, }: Props$2<TValue>) => React.JSX.Element;
78
+ declare const ControlToggleButtonGroup: <TValue>({ justify, size, value, onChange, items, exclusive, fullWidth, }: Props$3<TValue>) => React.JSX.Element;
79
79
 
80
80
  type ToggleControlProps<T extends PropValue> = {
81
81
  options: Array<ToggleButtonGroupItem<T> & {
@@ -102,14 +102,14 @@ type Item = {
102
102
  bind: PropKey;
103
103
  };
104
104
  type EqualUnequalItems = [Item, Item, Item, Item];
105
- type Props$1<TMultiPropType extends string, TPropValue extends MultiSizePropValue> = {
105
+ type Props$2<TMultiPropType extends string, TPropValue extends MultiSizePropValue> = {
106
106
  label: string;
107
107
  icon: ReactNode;
108
108
  tooltipLabel: string;
109
109
  items: EqualUnequalItems;
110
110
  multiSizePropTypeUtil: PropTypeUtil<TMultiPropType, TPropValue>;
111
111
  };
112
- declare function EqualUnequalSizesControl<TMultiPropType extends string, TPropValue extends MultiSizePropValue>({ label, icon, tooltipLabel, items, multiSizePropTypeUtil, }: Props$1<TMultiPropType, TPropValue>): React.JSX.Element;
112
+ declare function EqualUnequalSizesControl<TMultiPropType extends string, TPropValue extends MultiSizePropValue>({ label, icon, tooltipLabel, items, multiSizePropTypeUtil, }: Props$2<TMultiPropType, TPropValue>): React.JSX.Element;
113
113
 
114
114
  declare const LinkedDimensionsControl: ControlComponent<({ label, isSiteRtl, extendedValues, }: {
115
115
  label: string;
@@ -136,7 +136,7 @@ type ControlProps<TControlProps = unknown> = TControlProps & {
136
136
  };
137
137
  };
138
138
 
139
- type Props = ControlProps<{
139
+ type Props$1 = ControlProps<{
140
140
  queryOptions: {
141
141
  requestParams: Record<string, unknown>;
142
142
  endpoint: string;
@@ -145,7 +145,7 @@ type Props = ControlProps<{
145
145
  minInputLength?: number;
146
146
  placeholder?: string;
147
147
  }>;
148
- declare const LinkControl: ControlComponent<(props: Props) => React.JSX.Element>;
148
+ declare const LinkControl: ControlComponent<(props: Props$1) => React.JSX.Element>;
149
149
 
150
150
  declare const GapControl: ControlComponent<({ label }: {
151
151
  label: string;
@@ -215,17 +215,20 @@ type UseBoundProp<TValue extends PropValue> = {
215
215
  declare function useBoundProp<T extends PropValue = PropValue>(): PropKeyContextValue<T, PropType>;
216
216
  declare function useBoundProp<TKey extends string, TValue extends PropValue>(propTypeUtil: PropTypeUtil<TKey, TValue>): UseBoundProp<TValue>;
217
217
 
218
- type ReplaceWhenParams = {
219
- value: PropValue;
220
- };
221
- type CreateControlReplacement = {
218
+ type ControlReplacement = {
222
219
  component: ComponentType;
223
- condition: ({ value }: ReplaceWhenParams) => boolean;
220
+ condition: ({ value }: ConditionArgs) => boolean;
224
221
  };
225
- declare const ControlReplacementProvider: ({ component, condition, children, }: React.PropsWithChildren<CreateControlReplacement>) => React.JSX.Element;
226
- declare const createControlReplacement: () => {
227
- replaceControl: ({ component, condition }: CreateControlReplacement) => void;
228
- getControlReplacement: () => CreateControlReplacement;
222
+ type ConditionArgs = {
223
+ value: PropValue;
224
+ };
225
+ type Props = PropsWithChildren<{
226
+ replacements: ControlReplacement[];
227
+ }>;
228
+ declare const ControlReplacementsProvider: ({ replacements, children }: Props) => React.JSX.Element;
229
+ declare const createControlReplacementsRegistry: () => {
230
+ registerControlReplacement: (replacement: ControlReplacement) => void;
231
+ getControlReplacements: () => ControlReplacement[];
229
232
  };
230
233
 
231
234
  type ControlAdornmentsItems = Array<{
@@ -248,4 +251,4 @@ type UseInternalStateOptions<TValue> = {
248
251
  };
249
252
  declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhen, fallback, }: UseInternalStateOptions<TValue>) => readonly [TValue, (setter: ((value: TValue) => TValue) | TValue) => void];
250
253
 
251
- export { BackgroundControl, BoxShadowRepeaterControl, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent, ControlFormLabel, ControlReplacementProvider, ControlToggleButtonGroup, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedValue, type FontCategory, FontFamilyControl, GapControl, ImageControl, LinkControl, LinkedDimensionsControl, NumberControl, PropKeyProvider, PropProvider, type PropProviderProps, SelectControl, type SetValue, SizeControl, StrokeControl, SvgMediaControl, TextAreaControl, TextControl, type ToggleButtonGroupItem, ToggleControl, type ToggleControlProps, UrlControl, createControlReplacement, useBoundProp, useControlActions, useSyncExternalState };
254
+ export { BackgroundControl, BoxShadowRepeaterControl, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent, ControlFormLabel, ControlReplacementsProvider, ControlToggleButtonGroup, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedValue, type FontCategory, FontFamilyControl, GapControl, ImageControl, LinkControl, LinkedDimensionsControl, NumberControl, PropKeyProvider, PropProvider, type PropProviderProps, SelectControl, type SetValue, SizeControl, StrokeControl, SvgMediaControl, TextAreaControl, TextControl, type ToggleButtonGroupItem, ToggleControl, type ToggleControlProps, UrlControl, createControlReplacementsRegistry, useBoundProp, useControlActions, useSyncExternalState };
package/dist/index.js CHANGED
@@ -37,7 +37,7 @@ __export(index_exports, {
37
37
  ControlAdornments: () => ControlAdornments,
38
38
  ControlAdornmentsProvider: () => ControlAdornmentsProvider,
39
39
  ControlFormLabel: () => ControlFormLabel,
40
- ControlReplacementProvider: () => ControlReplacementProvider,
40
+ ControlReplacementsProvider: () => ControlReplacementsProvider,
41
41
  ControlToggleButtonGroup: () => ControlToggleButtonGroup,
42
42
  EqualUnequalSizesControl: () => EqualUnequalSizesControl,
43
43
  FontFamilyControl: () => FontFamilyControl,
@@ -56,7 +56,7 @@ __export(index_exports, {
56
56
  TextControl: () => TextControl,
57
57
  ToggleControl: () => ToggleControl,
58
58
  UrlControl: () => UrlControl,
59
- createControlReplacement: () => createControlReplacement,
59
+ createControlReplacementsRegistry: () => createControlReplacementsRegistry,
60
60
  useBoundProp: () => useBoundProp,
61
61
  useControlActions: () => useControlActions,
62
62
  useSyncExternalState: () => useSyncExternalState
@@ -258,46 +258,39 @@ var ControlFormLabel = ({ children }) => {
258
258
  var React5 = __toESM(require("react"));
259
259
  var import_ui2 = require("@elementor/ui");
260
260
 
261
- // src/create-control-replacement.tsx
261
+ // src/control-replacements.tsx
262
262
  var React4 = __toESM(require("react"));
263
263
  var import_react4 = require("react");
264
- var ControlReplacementContext = (0, import_react4.createContext)(void 0);
265
- var ControlReplacementProvider = ({
266
- component,
267
- condition,
268
- children
269
- }) => {
270
- return /* @__PURE__ */ React4.createElement(ControlReplacementContext.Provider, { value: { component, condition } }, children);
264
+ var ControlReplacementContext = (0, import_react4.createContext)([]);
265
+ var ControlReplacementsProvider = ({ replacements, children }) => {
266
+ return /* @__PURE__ */ React4.createElement(ControlReplacementContext.Provider, { value: replacements }, children);
271
267
  };
272
- var useControlReplacement = () => {
268
+ var useControlReplacement = (OriginalComponent) => {
273
269
  const { value } = useBoundProp();
274
- const controlReplacement = (0, import_react4.useContext)(ControlReplacementContext);
275
- let shouldReplace = false;
270
+ const replacements = (0, import_react4.useContext)(ControlReplacementContext);
276
271
  try {
277
- shouldReplace = !!controlReplacement?.condition({ value }) && !!controlReplacement.component;
272
+ const replacement = replacements.find((r) => r.condition({ value }));
273
+ return replacement?.component ?? OriginalComponent;
278
274
  } catch {
275
+ return OriginalComponent;
279
276
  }
280
- return shouldReplace ? controlReplacement?.component : void 0;
281
277
  };
282
- var createControlReplacement = () => {
283
- let controlReplacement;
284
- function replaceControl({ component, condition }) {
285
- controlReplacement = { component, condition };
278
+ var createControlReplacementsRegistry = () => {
279
+ const controlReplacements = [];
280
+ function registerControlReplacement(replacement) {
281
+ controlReplacements.push(replacement);
286
282
  }
287
- function getControlReplacement() {
288
- return controlReplacement;
283
+ function getControlReplacements() {
284
+ return controlReplacements;
289
285
  }
290
- return { replaceControl, getControlReplacement };
286
+ return { registerControlReplacement, getControlReplacements };
291
287
  };
292
288
 
293
289
  // src/create-control.tsx
294
290
  var brandSymbol = Symbol("control");
295
- function createControl(Component, { supportsReplacements = true } = {}) {
291
+ function createControl(Control5) {
296
292
  return (props) => {
297
- const ControlReplacement = useControlReplacement();
298
- if (ControlReplacement && supportsReplacements) {
299
- return /* @__PURE__ */ React5.createElement(import_ui2.ErrorBoundary, { fallback: null }, /* @__PURE__ */ React5.createElement(ControlReplacement, { ...props }));
300
- }
293
+ const Component = useControlReplacement(Control5);
301
294
  return /* @__PURE__ */ React5.createElement(import_ui2.ErrorBoundary, { fallback: null }, /* @__PURE__ */ React5.createElement(Component, { ...props }));
302
295
  };
303
296
  }
@@ -931,16 +924,28 @@ var Repeater = ({
931
924
  });
932
925
  });
933
926
  };
934
- return /* @__PURE__ */ React23.createElement(SectionContent, null, /* @__PURE__ */ React23.createElement(import_ui17.Stack, { direction: "row", justifyContent: "start", alignItems: "center", gap: 1 }, /* @__PURE__ */ React23.createElement(import_ui17.Typography, { component: "label", variant: "caption", color: "text.secondary" }, label), /* @__PURE__ */ React23.createElement(ControlAdornments, null), /* @__PURE__ */ React23.createElement(
935
- import_ui17.IconButton,
927
+ return /* @__PURE__ */ React23.createElement(SectionContent, null, /* @__PURE__ */ React23.createElement(
928
+ import_ui17.Stack,
936
929
  {
937
- sx: { ml: "auto" },
938
- size: SIZE,
939
- onClick: addRepeaterItem,
940
- "aria-label": (0, import_i18n4.__)("Add item", "elementor")
930
+ direction: "row",
931
+ justifyContent: "start",
932
+ alignItems: "center",
933
+ gap: 1,
934
+ sx: { marginInlineEnd: -0.75 }
941
935
  },
942
- /* @__PURE__ */ React23.createElement(import_icons3.PlusIcon, { fontSize: SIZE })
943
- )), 0 < uniqueKeys.length && /* @__PURE__ */ React23.createElement(SortableProvider, { value: uniqueKeys, onChange: onChangeOrder }, uniqueKeys.map((key, index) => {
936
+ /* @__PURE__ */ React23.createElement(import_ui17.Typography, { component: "label", variant: "caption", color: "text.secondary" }, label),
937
+ /* @__PURE__ */ React23.createElement(ControlAdornments, null),
938
+ /* @__PURE__ */ React23.createElement(
939
+ import_ui17.IconButton,
940
+ {
941
+ sx: { ml: "auto" },
942
+ size: SIZE,
943
+ onClick: addRepeaterItem,
944
+ "aria-label": (0, import_i18n4.__)("Add item", "elementor")
945
+ },
946
+ /* @__PURE__ */ React23.createElement(import_icons3.PlusIcon, { fontSize: SIZE })
947
+ )
948
+ ), 0 < uniqueKeys.length && /* @__PURE__ */ React23.createElement(SortableProvider, { value: uniqueKeys, onChange: onChangeOrder }, uniqueKeys.map((key, index) => {
944
949
  const value = items[index];
945
950
  if (!value) {
946
951
  return null;
@@ -1357,7 +1362,6 @@ function EqualUnequalSizesControl({
1357
1362
  },
1358
1363
  ...(0, import_ui22.bindPopover)(popupState),
1359
1364
  slotProps: {
1360
- // eslint-disable-next-line react-compiler/react-compiler
1361
1365
  paper: { sx: { mt: 0.5, width: controlRef.current?.getBoundingClientRect().width } }
1362
1366
  }
1363
1367
  },
@@ -1923,7 +1927,8 @@ var LinkControl = createControl((props) => {
1923
1927
  direction: "row",
1924
1928
  sx: {
1925
1929
  justifyContent: "space-between",
1926
- alignItems: "center"
1930
+ alignItems: "center",
1931
+ marginInlineEnd: -0.75
1927
1932
  }
1928
1933
  },
1929
1934
  /* @__PURE__ */ React34.createElement(ControlFormLabel, null, (0, import_i18n9.__)("Link", "elementor")),
@@ -1962,7 +1967,7 @@ var SwitchControl = ({ disabled }) => {
1962
1967
  opacity: 0
1963
1968
  }
1964
1969
  } : {};
1965
- return /* @__PURE__ */ React34.createElement(import_ui27.Grid, { container: true, alignItems: "center", flexWrap: "nowrap", justifyContent: "space-between" }, /* @__PURE__ */ React34.createElement(import_ui27.Grid, { item: true }, /* @__PURE__ */ React34.createElement(ControlFormLabel, null, (0, import_i18n9.__)("Open in a new tab", "elementor"))), /* @__PURE__ */ React34.createElement(import_ui27.Grid, { item: true }, /* @__PURE__ */ React34.createElement(import_ui27.Switch, { checked: value, onClick, disabled, inputProps })));
1970
+ return /* @__PURE__ */ React34.createElement(import_ui27.Grid, { container: true, alignItems: "center", flexWrap: "nowrap", justifyContent: "space-between" }, /* @__PURE__ */ React34.createElement(import_ui27.Grid, { item: true }, /* @__PURE__ */ React34.createElement(ControlFormLabel, null, (0, import_i18n9.__)("Open in a new tab", "elementor"))), /* @__PURE__ */ React34.createElement(import_ui27.Grid, { item: true, sx: { marginInlineEnd: -1 } }, /* @__PURE__ */ React34.createElement(import_ui27.Switch, { checked: value, onClick, disabled, inputProps })));
1966
1971
  };
1967
1972
  async function fetchOptions(ajaxUrl, params) {
1968
1973
  if (!params || !ajaxUrl) {
@@ -2752,7 +2757,7 @@ var BackgroundControl = createControl(() => {
2752
2757
  ControlAdornments,
2753
2758
  ControlAdornmentsProvider,
2754
2759
  ControlFormLabel,
2755
- ControlReplacementProvider,
2760
+ ControlReplacementsProvider,
2756
2761
  ControlToggleButtonGroup,
2757
2762
  EqualUnequalSizesControl,
2758
2763
  FontFamilyControl,
@@ -2771,7 +2776,7 @@ var BackgroundControl = createControl(() => {
2771
2776
  TextControl,
2772
2777
  ToggleControl,
2773
2778
  UrlControl,
2774
- createControlReplacement,
2779
+ createControlReplacementsRegistry,
2775
2780
  useBoundProp,
2776
2781
  useControlActions,
2777
2782
  useSyncExternalState