@elementor/editor-controls 3.33.0-122 → 3.33.0-124

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
@@ -1,7 +1,7 @@
1
1
  import * as React$1 from 'react';
2
2
  import { RefObject, ReactNode, FC, PropsWithChildren, ReactElement, ComponentType } from 'react';
3
3
  import { SxProps, UnstableColorFieldProps, ToggleButtonProps, StackProps, PopupState, FormLabelProps } from '@elementor/ui';
4
- import { StringPropValue, PropTypeUtil, PropValue, PropKey, SizePropValue, PropType, CreateOptions } from '@elementor/editor-props';
4
+ import { StringPropValue, PropTypeUtil, PropValue, PropKey, SizePropValue, LinkPropValue, PropType, CreateOptions } from '@elementor/editor-props';
5
5
  import { StyleDefinitionState } from '@elementor/editor-styles';
6
6
  import * as _elementor_locations from '@elementor/locations';
7
7
 
@@ -23,10 +23,10 @@ declare const TextControl: ControlComponent<({ placeholder, error, inputValue, i
23
23
  sx?: SxProps;
24
24
  }) => React$1.JSX.Element>;
25
25
 
26
- type Props$6 = {
26
+ type Props$7 = {
27
27
  placeholder?: string;
28
28
  };
29
- declare const TextAreaControl: ControlComponent<({ placeholder }: Props$6) => React$1.JSX.Element>;
29
+ declare const TextAreaControl: ControlComponent<({ placeholder }: Props$7) => React$1.JSX.Element>;
30
30
 
31
31
  declare const lengthUnits: readonly ["px", "%", "em", "rem", "vw", "vh"];
32
32
  declare const angleUnits: readonly ["deg", "rad", "grad", "turn"];
@@ -81,18 +81,18 @@ type SelectOption = {
81
81
  value: StringPropValue['value'];
82
82
  disabled?: boolean;
83
83
  };
84
- type Props$5 = {
84
+ type Props$6 = {
85
85
  options: SelectOption[];
86
86
  onChange?: (newValue: string | null, previousValue: string | null | undefined) => void;
87
87
  };
88
- declare const SelectControl: ControlComponent<({ options, onChange }: Props$5) => React$1.JSX.Element>;
88
+ declare const SelectControl: ControlComponent<({ options, onChange }: Props$6) => React$1.JSX.Element>;
89
89
 
90
- type Props$4 = Partial<Omit<UnstableColorFieldProps, 'value' | 'onChange'>> & {
90
+ type Props$5 = Partial<Omit<UnstableColorFieldProps, 'value' | 'onChange'>> & {
91
91
  propTypeUtil?: PropTypeUtil<string, string>;
92
92
  anchorEl?: HTMLElement | null;
93
93
  id?: string;
94
94
  };
95
- declare const ColorControl: ControlComponent<({ propTypeUtil, anchorEl, slotProps, id, ...props }: Props$4) => React$1.JSX.Element>;
95
+ declare const ColorControl: ControlComponent<({ propTypeUtil, anchorEl, slotProps, id, ...props }: Props$5) => React$1.JSX.Element>;
96
96
 
97
97
  type RenderContentProps = {
98
98
  size: ToggleButtonProps['size'];
@@ -105,7 +105,7 @@ type ToggleButtonGroupItem<TValue> = {
105
105
  };
106
106
  type ExclusiveValue<TValue> = TValue;
107
107
  type NonExclusiveValue<TValue> = TValue[];
108
- type Props$3<TValue> = {
108
+ type Props$4<TValue> = {
109
109
  disabled?: boolean;
110
110
  justify?: StackProps['justifyContent'];
111
111
  size?: ToggleButtonProps['size'];
@@ -122,7 +122,7 @@ type Props$3<TValue> = {
122
122
  value: ExclusiveValue<TValue>;
123
123
  onChange: (value: ExclusiveValue<TValue>) => void;
124
124
  });
125
- declare const ControlToggleButtonGroup: <TValue>({ justify, size, value, onChange, items, maxItems, exclusive, fullWidth, disabled, placeholder, }: Props$3<TValue>) => React$1.JSX.Element;
125
+ declare const ControlToggleButtonGroup: <TValue>({ justify, size, value, onChange, items, maxItems, exclusive, fullWidth, disabled, placeholder, }: Props$4<TValue>) => React$1.JSX.Element;
126
126
 
127
127
  type ToggleControlProps<T extends PropValue> = {
128
128
  options: Array<ToggleButtonGroupItem<T> & {
@@ -151,14 +151,14 @@ type Item$1 = {
151
151
  bind: PropKey;
152
152
  };
153
153
  type EqualUnequalItems = [Item$1, Item$1, Item$1, Item$1];
154
- type Props$2<TMultiPropType extends string, TPropValue extends MultiSizePropValue> = {
154
+ type Props$3<TMultiPropType extends string, TPropValue extends MultiSizePropValue> = {
155
155
  label: string;
156
156
  icon: ReactNode;
157
157
  tooltipLabel: string;
158
158
  items: EqualUnequalItems;
159
159
  multiSizePropTypeUtil: PropTypeUtil<TMultiPropType, TPropValue>;
160
160
  };
161
- declare function EqualUnequalSizesControl<TMultiPropType extends string, TPropValue extends MultiSizePropValue>({ label, icon, tooltipLabel, items, multiSizePropTypeUtil, }: Props$2<TMultiPropType, TPropValue>): React$1.JSX.Element;
161
+ declare function EqualUnequalSizesControl<TMultiPropType extends string, TPropValue extends MultiSizePropValue>({ label, icon, tooltipLabel, items, multiSizePropTypeUtil, }: Props$3<TMultiPropType, TPropValue>): React$1.JSX.Element;
162
162
 
163
163
  declare const LinkedDimensionsControl: ({ label, isSiteRtl, extendedOptions, min, }: {
164
164
  label: string;
@@ -214,17 +214,30 @@ type ControlProps<TControlProps = unknown> = TControlProps & {
214
214
  };
215
215
  };
216
216
 
217
- type Props$1 = ControlProps<{
217
+ type Props$2 = ControlProps<{
218
218
  queryOptions: {
219
- requestParams: Record<string, unknown>;
220
- endpoint: string;
219
+ params: Record<string, unknown>;
220
+ url: string;
221
221
  };
222
222
  allowCustomValues?: boolean;
223
223
  minInputLength?: number;
224
224
  placeholder?: string;
225
225
  label?: string;
226
226
  }>;
227
- declare const LinkControl: ControlComponent<(props: Props$1) => React$1.JSX.Element>;
227
+ type DestinationProp = LinkPropValue['value']['destination'];
228
+ declare const LinkControl: ControlComponent<(props: Props$2) => React$1.JSX.Element>;
229
+
230
+ type Props$1 = {
231
+ queryOptions: {
232
+ params: Record<string, unknown>;
233
+ url: string;
234
+ };
235
+ allowCustomValues?: boolean;
236
+ minInputLength?: number;
237
+ placeholder?: string;
238
+ onSetValue?: (value: DestinationProp | null) => void;
239
+ };
240
+ declare const QueryControl: ControlComponent<(props: Props$1) => React$1.JSX.Element>;
228
241
 
229
242
  declare const GapControl: ({ label }: {
230
243
  label: string;
@@ -499,4 +512,4 @@ type UseInternalStateOptions<TValue> = {
499
512
  };
500
513
  declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhen, fallback, }: UseInternalStateOptions<TValue>) => readonly [TValue, (setter: ((value: TValue) => TValue) | TValue, options?: CreateOptions, meta?: SetValueMeta) => void];
501
514
 
502
- export { type AngleUnit, AspectRatioControl, BackgroundControl, BoxShadowRepeaterControl, ClearIconButton, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent, ControlFormLabel, ControlReplacementsProvider, ControlToggleButtonGroup, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, FloatingActionsBar, type FontCategory, FontFamilyControl, GapControl, ImageControl, ItemSelector, KeyValueControl, type LengthUnit, LinkControl, LinkedDimensionsControl, NumberControl, PopoverContent, PositionControl, PropKeyProvider, PropProvider, type PropProviderProps, RepeatableControl, Repeater, SelectControl, type SetValue, SizeControl, StrokeControl, SvgMediaControl, SwitchControl, TextAreaControl, TextControl, type TimeUnit, type ToggleButtonGroupItem, ToggleControl, type ToggleControlProps, TransformBaseControl, TransformRepeaterControl, TransitionRepeaterControl, type Unit, UrlControl, createControl, createControlReplacementsRegistry, enqueueFont, injectIntoRepeaterHeaderActions, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useFloatingActionsBar, useSyncExternalState };
515
+ export { type AngleUnit, AspectRatioControl, BackgroundControl, BoxShadowRepeaterControl, ClearIconButton, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent, ControlFormLabel, ControlReplacementsProvider, ControlToggleButtonGroup, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, FloatingActionsBar, type FontCategory, FontFamilyControl, GapControl, ImageControl, ItemSelector, KeyValueControl, type LengthUnit, LinkControl, LinkedDimensionsControl, NumberControl, PopoverContent, PositionControl, PropKeyProvider, PropProvider, type PropProviderProps, QueryControl, RepeatableControl, Repeater, SelectControl, type SetValue, SizeControl, StrokeControl, SvgMediaControl, SwitchControl, TextAreaControl, TextControl, type TimeUnit, type ToggleButtonGroupItem, ToggleControl, type ToggleControlProps, TransformBaseControl, TransformRepeaterControl, TransitionRepeaterControl, type Unit, UrlControl, createControl, createControlReplacementsRegistry, enqueueFont, injectIntoRepeaterHeaderActions, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useFloatingActionsBar, useSyncExternalState };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as React$1 from 'react';
2
2
  import { RefObject, ReactNode, FC, PropsWithChildren, ReactElement, ComponentType } from 'react';
3
3
  import { SxProps, UnstableColorFieldProps, ToggleButtonProps, StackProps, PopupState, FormLabelProps } from '@elementor/ui';
4
- import { StringPropValue, PropTypeUtil, PropValue, PropKey, SizePropValue, PropType, CreateOptions } from '@elementor/editor-props';
4
+ import { StringPropValue, PropTypeUtil, PropValue, PropKey, SizePropValue, LinkPropValue, PropType, CreateOptions } from '@elementor/editor-props';
5
5
  import { StyleDefinitionState } from '@elementor/editor-styles';
6
6
  import * as _elementor_locations from '@elementor/locations';
7
7
 
@@ -23,10 +23,10 @@ declare const TextControl: ControlComponent<({ placeholder, error, inputValue, i
23
23
  sx?: SxProps;
24
24
  }) => React$1.JSX.Element>;
25
25
 
26
- type Props$6 = {
26
+ type Props$7 = {
27
27
  placeholder?: string;
28
28
  };
29
- declare const TextAreaControl: ControlComponent<({ placeholder }: Props$6) => React$1.JSX.Element>;
29
+ declare const TextAreaControl: ControlComponent<({ placeholder }: Props$7) => React$1.JSX.Element>;
30
30
 
31
31
  declare const lengthUnits: readonly ["px", "%", "em", "rem", "vw", "vh"];
32
32
  declare const angleUnits: readonly ["deg", "rad", "grad", "turn"];
@@ -81,18 +81,18 @@ type SelectOption = {
81
81
  value: StringPropValue['value'];
82
82
  disabled?: boolean;
83
83
  };
84
- type Props$5 = {
84
+ type Props$6 = {
85
85
  options: SelectOption[];
86
86
  onChange?: (newValue: string | null, previousValue: string | null | undefined) => void;
87
87
  };
88
- declare const SelectControl: ControlComponent<({ options, onChange }: Props$5) => React$1.JSX.Element>;
88
+ declare const SelectControl: ControlComponent<({ options, onChange }: Props$6) => React$1.JSX.Element>;
89
89
 
90
- type Props$4 = Partial<Omit<UnstableColorFieldProps, 'value' | 'onChange'>> & {
90
+ type Props$5 = Partial<Omit<UnstableColorFieldProps, 'value' | 'onChange'>> & {
91
91
  propTypeUtil?: PropTypeUtil<string, string>;
92
92
  anchorEl?: HTMLElement | null;
93
93
  id?: string;
94
94
  };
95
- declare const ColorControl: ControlComponent<({ propTypeUtil, anchorEl, slotProps, id, ...props }: Props$4) => React$1.JSX.Element>;
95
+ declare const ColorControl: ControlComponent<({ propTypeUtil, anchorEl, slotProps, id, ...props }: Props$5) => React$1.JSX.Element>;
96
96
 
97
97
  type RenderContentProps = {
98
98
  size: ToggleButtonProps['size'];
@@ -105,7 +105,7 @@ type ToggleButtonGroupItem<TValue> = {
105
105
  };
106
106
  type ExclusiveValue<TValue> = TValue;
107
107
  type NonExclusiveValue<TValue> = TValue[];
108
- type Props$3<TValue> = {
108
+ type Props$4<TValue> = {
109
109
  disabled?: boolean;
110
110
  justify?: StackProps['justifyContent'];
111
111
  size?: ToggleButtonProps['size'];
@@ -122,7 +122,7 @@ type Props$3<TValue> = {
122
122
  value: ExclusiveValue<TValue>;
123
123
  onChange: (value: ExclusiveValue<TValue>) => void;
124
124
  });
125
- declare const ControlToggleButtonGroup: <TValue>({ justify, size, value, onChange, items, maxItems, exclusive, fullWidth, disabled, placeholder, }: Props$3<TValue>) => React$1.JSX.Element;
125
+ declare const ControlToggleButtonGroup: <TValue>({ justify, size, value, onChange, items, maxItems, exclusive, fullWidth, disabled, placeholder, }: Props$4<TValue>) => React$1.JSX.Element;
126
126
 
127
127
  type ToggleControlProps<T extends PropValue> = {
128
128
  options: Array<ToggleButtonGroupItem<T> & {
@@ -151,14 +151,14 @@ type Item$1 = {
151
151
  bind: PropKey;
152
152
  };
153
153
  type EqualUnequalItems = [Item$1, Item$1, Item$1, Item$1];
154
- type Props$2<TMultiPropType extends string, TPropValue extends MultiSizePropValue> = {
154
+ type Props$3<TMultiPropType extends string, TPropValue extends MultiSizePropValue> = {
155
155
  label: string;
156
156
  icon: ReactNode;
157
157
  tooltipLabel: string;
158
158
  items: EqualUnequalItems;
159
159
  multiSizePropTypeUtil: PropTypeUtil<TMultiPropType, TPropValue>;
160
160
  };
161
- declare function EqualUnequalSizesControl<TMultiPropType extends string, TPropValue extends MultiSizePropValue>({ label, icon, tooltipLabel, items, multiSizePropTypeUtil, }: Props$2<TMultiPropType, TPropValue>): React$1.JSX.Element;
161
+ declare function EqualUnequalSizesControl<TMultiPropType extends string, TPropValue extends MultiSizePropValue>({ label, icon, tooltipLabel, items, multiSizePropTypeUtil, }: Props$3<TMultiPropType, TPropValue>): React$1.JSX.Element;
162
162
 
163
163
  declare const LinkedDimensionsControl: ({ label, isSiteRtl, extendedOptions, min, }: {
164
164
  label: string;
@@ -214,17 +214,30 @@ type ControlProps<TControlProps = unknown> = TControlProps & {
214
214
  };
215
215
  };
216
216
 
217
- type Props$1 = ControlProps<{
217
+ type Props$2 = ControlProps<{
218
218
  queryOptions: {
219
- requestParams: Record<string, unknown>;
220
- endpoint: string;
219
+ params: Record<string, unknown>;
220
+ url: string;
221
221
  };
222
222
  allowCustomValues?: boolean;
223
223
  minInputLength?: number;
224
224
  placeholder?: string;
225
225
  label?: string;
226
226
  }>;
227
- declare const LinkControl: ControlComponent<(props: Props$1) => React$1.JSX.Element>;
227
+ type DestinationProp = LinkPropValue['value']['destination'];
228
+ declare const LinkControl: ControlComponent<(props: Props$2) => React$1.JSX.Element>;
229
+
230
+ type Props$1 = {
231
+ queryOptions: {
232
+ params: Record<string, unknown>;
233
+ url: string;
234
+ };
235
+ allowCustomValues?: boolean;
236
+ minInputLength?: number;
237
+ placeholder?: string;
238
+ onSetValue?: (value: DestinationProp | null) => void;
239
+ };
240
+ declare const QueryControl: ControlComponent<(props: Props$1) => React$1.JSX.Element>;
228
241
 
229
242
  declare const GapControl: ({ label }: {
230
243
  label: string;
@@ -499,4 +512,4 @@ type UseInternalStateOptions<TValue> = {
499
512
  };
500
513
  declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhen, fallback, }: UseInternalStateOptions<TValue>) => readonly [TValue, (setter: ((value: TValue) => TValue) | TValue, options?: CreateOptions, meta?: SetValueMeta) => void];
501
514
 
502
- export { type AngleUnit, AspectRatioControl, BackgroundControl, BoxShadowRepeaterControl, ClearIconButton, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent, ControlFormLabel, ControlReplacementsProvider, ControlToggleButtonGroup, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, FloatingActionsBar, type FontCategory, FontFamilyControl, GapControl, ImageControl, ItemSelector, KeyValueControl, type LengthUnit, LinkControl, LinkedDimensionsControl, NumberControl, PopoverContent, PositionControl, PropKeyProvider, PropProvider, type PropProviderProps, RepeatableControl, Repeater, SelectControl, type SetValue, SizeControl, StrokeControl, SvgMediaControl, SwitchControl, TextAreaControl, TextControl, type TimeUnit, type ToggleButtonGroupItem, ToggleControl, type ToggleControlProps, TransformBaseControl, TransformRepeaterControl, TransitionRepeaterControl, type Unit, UrlControl, createControl, createControlReplacementsRegistry, enqueueFont, injectIntoRepeaterHeaderActions, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useFloatingActionsBar, useSyncExternalState };
515
+ export { type AngleUnit, AspectRatioControl, BackgroundControl, BoxShadowRepeaterControl, ClearIconButton, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent, ControlFormLabel, ControlReplacementsProvider, ControlToggleButtonGroup, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, FloatingActionsBar, type FontCategory, FontFamilyControl, GapControl, ImageControl, ItemSelector, KeyValueControl, type LengthUnit, LinkControl, LinkedDimensionsControl, NumberControl, PopoverContent, PositionControl, PropKeyProvider, PropProvider, type PropProviderProps, QueryControl, RepeatableControl, Repeater, SelectControl, type SetValue, SizeControl, StrokeControl, SvgMediaControl, SwitchControl, TextAreaControl, TextControl, type TimeUnit, type ToggleButtonGroupItem, ToggleControl, type ToggleControlProps, TransformBaseControl, TransformRepeaterControl, TransitionRepeaterControl, type Unit, UrlControl, createControl, createControlReplacementsRegistry, enqueueFont, injectIntoRepeaterHeaderActions, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useFloatingActionsBar, useSyncExternalState };