@elementor/editor-controls 3.32.0-67 → 3.32.0-69

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
@@ -2,6 +2,7 @@ import * as React$1 from 'react';
2
2
  import { RefObject, ReactNode, FC, PropsWithChildren, ComponentType } from 'react';
3
3
  import { SxProps, UnstableColorFieldProps, ToggleButtonProps, StackProps, FormLabelProps } from '@elementor/ui';
4
4
  import { StringPropValue, PropTypeUtil, PropValue, PropKey, SizePropValue, PropType, CreateOptions } from '@elementor/editor-props';
5
+ import { StyleDefinitionState } from '@elementor/editor-styles';
5
6
  import * as _elementor_locations from '@elementor/locations';
6
7
 
7
8
  type ImageControlProps = {
@@ -48,6 +49,7 @@ type BaseSizeControlProps = {
48
49
  extendedOptions?: ExtendedOption[];
49
50
  disableCustom?: boolean;
50
51
  anchorRef?: RefObject<HTMLDivElement | null>;
52
+ min?: number;
51
53
  };
52
54
  type LengthSizeControlProps = BaseSizeControlProps & UnitProps<LengthUnit[]> & {
53
55
  variant: 'length';
@@ -59,7 +61,7 @@ type TimeSizeControlProps = BaseSizeControlProps & UnitProps<TimeUnit[]> & {
59
61
  variant: 'time';
60
62
  };
61
63
  type SizeControlProps = LengthSizeControlProps | AngleSizeControlProps | TimeSizeControlProps;
62
- declare const SizeControl: ControlComponent<({ variant, defaultUnit, units, placeholder, startIcon, anchorRef, extendedOptions, disableCustom, }: Omit<SizeControlProps, "variant"> & {
64
+ declare const SizeControl: ControlComponent<({ variant, defaultUnit, units, placeholder, startIcon, anchorRef, extendedOptions, disableCustom, min, }: Omit<SizeControlProps, "variant"> & {
63
65
  variant?: SizeVariant;
64
66
  }) => React$1.JSX.Element>;
65
67
 
@@ -154,10 +156,11 @@ type Props$2<TMultiPropType extends string, TPropValue extends MultiSizePropValu
154
156
  };
155
157
  declare function EqualUnequalSizesControl<TMultiPropType extends string, TPropValue extends MultiSizePropValue>({ label, icon, tooltipLabel, items, multiSizePropTypeUtil, }: Props$2<TMultiPropType, TPropValue>): React$1.JSX.Element;
156
158
 
157
- declare const LinkedDimensionsControl: ControlComponent<({ label, isSiteRtl, extendedOptions, }: {
159
+ declare const LinkedDimensionsControl: ControlComponent<({ label, isSiteRtl, extendedOptions, min, }: {
158
160
  label: string;
159
161
  isSiteRtl?: boolean;
160
162
  extendedOptions?: ExtendedOption[];
163
+ min?: number;
161
164
  }) => React$1.JSX.Element>;
162
165
 
163
166
  type FontCategory = {
@@ -230,6 +233,13 @@ declare const BackgroundControl: ControlComponent<() => React$1.JSX.Element>;
230
233
 
231
234
  declare const SwitchControl: ControlComponent<() => React$1.JSX.Element>;
232
235
 
236
+ type TooltipAddItemActionProps = {
237
+ disabled?: boolean;
238
+ enableTooltip?: boolean;
239
+ tooltipContent?: React$1.ReactNode;
240
+ newItemIndex?: number;
241
+ };
242
+
233
243
  type ChildControlConfig = {
234
244
  component: React.ComponentType;
235
245
  props?: Record<string, unknown>;
@@ -247,8 +257,9 @@ type RepeatableControlProps = {
247
257
  patternLabel?: string;
248
258
  placeholder?: string;
249
259
  propKey?: string;
260
+ addItemTooltipProps?: TooltipAddItemActionProps;
250
261
  };
251
- declare const RepeatableControl: ControlComponent<({ repeaterLabel, childControlConfig, showDuplicate, showToggle, initialValues, patternLabel, placeholder, propKey, }: RepeatableControlProps) => React$1.JSX.Element | null>;
262
+ declare const RepeatableControl: ControlComponent<({ repeaterLabel, childControlConfig, showDuplicate, showToggle, initialValues, patternLabel, placeholder, propKey, addItemTooltipProps, }: RepeatableControlProps) => React$1.JSX.Element | null>;
252
263
 
253
264
  type KeyValueControlProps = {
254
265
  keyName?: string;
@@ -271,8 +282,9 @@ declare const TransformBaseControl: ({ anchorRef }: {
271
282
  anchorRef: React$1.RefObject<HTMLDivElement | null>;
272
283
  }) => React$1.JSX.Element;
273
284
 
274
- declare const TransitionRepeaterControl: ControlComponent<(props: {
285
+ declare const TransitionRepeaterControl: ControlComponent<({ recentlyUsedList, currentStyleState, }: {
275
286
  recentlyUsedList: string[];
287
+ currentStyleState: StyleDefinitionState;
276
288
  }) => React$1.JSX.Element>;
277
289
 
278
290
  declare const PopoverContent: FC<PropsWithChildren<StackProps>>;
@@ -324,6 +336,7 @@ declare const useControlActions: () => ControlActionsContext;
324
336
 
325
337
  type SetValueMeta = {
326
338
  bind?: PropKey;
339
+ validation?: (value: PropValue) => boolean;
327
340
  };
328
341
  type SetValue<T> = (value: T, options?: CreateOptions, meta?: SetValueMeta) => void;
329
342
  type PropContext<T extends PropValue, P extends PropType> = {
@@ -414,10 +427,10 @@ declare const injectIntoRepeaterItemActions: (args: _elementor_locations.InjectA
414
427
 
415
428
  type UseInternalStateOptions<TValue> = {
416
429
  external: TValue | null;
417
- setExternal: (value: TValue | null) => void;
430
+ setExternal: (value: TValue | null, options?: CreateOptions, meta?: SetValueMeta) => void;
418
431
  persistWhen: (value: TValue | null) => boolean;
419
432
  fallback: (value: TValue | null) => TValue;
420
433
  };
421
- declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhen, fallback, }: UseInternalStateOptions<TValue>) => readonly [TValue, (setter: ((value: TValue) => TValue) | TValue) => void];
434
+ declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhen, fallback, }: UseInternalStateOptions<TValue>) => readonly [TValue, (setter: ((value: TValue) => TValue) | TValue, options?: CreateOptions, meta?: SetValueMeta) => void];
422
435
 
423
436
  export { type AngleUnit, AspectRatioControl, BackgroundControl, BoxShadowRepeaterControl, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent, ControlFormLabel, ControlReplacementsProvider, ControlToggleButtonGroup, CssEditor, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, type FontCategory, FontFamilyControl, GapControl, ImageControl, ItemSelector, KeyValueControl, type LengthUnit, LinkControl, LinkedDimensionsControl, NumberControl, PopoverContent, PositionControl, PropKeyProvider, PropProvider, type PropProviderProps, RepeatableControl, 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
@@ -2,6 +2,7 @@ import * as React$1 from 'react';
2
2
  import { RefObject, ReactNode, FC, PropsWithChildren, ComponentType } from 'react';
3
3
  import { SxProps, UnstableColorFieldProps, ToggleButtonProps, StackProps, FormLabelProps } from '@elementor/ui';
4
4
  import { StringPropValue, PropTypeUtil, PropValue, PropKey, SizePropValue, PropType, CreateOptions } from '@elementor/editor-props';
5
+ import { StyleDefinitionState } from '@elementor/editor-styles';
5
6
  import * as _elementor_locations from '@elementor/locations';
6
7
 
7
8
  type ImageControlProps = {
@@ -48,6 +49,7 @@ type BaseSizeControlProps = {
48
49
  extendedOptions?: ExtendedOption[];
49
50
  disableCustom?: boolean;
50
51
  anchorRef?: RefObject<HTMLDivElement | null>;
52
+ min?: number;
51
53
  };
52
54
  type LengthSizeControlProps = BaseSizeControlProps & UnitProps<LengthUnit[]> & {
53
55
  variant: 'length';
@@ -59,7 +61,7 @@ type TimeSizeControlProps = BaseSizeControlProps & UnitProps<TimeUnit[]> & {
59
61
  variant: 'time';
60
62
  };
61
63
  type SizeControlProps = LengthSizeControlProps | AngleSizeControlProps | TimeSizeControlProps;
62
- declare const SizeControl: ControlComponent<({ variant, defaultUnit, units, placeholder, startIcon, anchorRef, extendedOptions, disableCustom, }: Omit<SizeControlProps, "variant"> & {
64
+ declare const SizeControl: ControlComponent<({ variant, defaultUnit, units, placeholder, startIcon, anchorRef, extendedOptions, disableCustom, min, }: Omit<SizeControlProps, "variant"> & {
63
65
  variant?: SizeVariant;
64
66
  }) => React$1.JSX.Element>;
65
67
 
@@ -154,10 +156,11 @@ type Props$2<TMultiPropType extends string, TPropValue extends MultiSizePropValu
154
156
  };
155
157
  declare function EqualUnequalSizesControl<TMultiPropType extends string, TPropValue extends MultiSizePropValue>({ label, icon, tooltipLabel, items, multiSizePropTypeUtil, }: Props$2<TMultiPropType, TPropValue>): React$1.JSX.Element;
156
158
 
157
- declare const LinkedDimensionsControl: ControlComponent<({ label, isSiteRtl, extendedOptions, }: {
159
+ declare const LinkedDimensionsControl: ControlComponent<({ label, isSiteRtl, extendedOptions, min, }: {
158
160
  label: string;
159
161
  isSiteRtl?: boolean;
160
162
  extendedOptions?: ExtendedOption[];
163
+ min?: number;
161
164
  }) => React$1.JSX.Element>;
162
165
 
163
166
  type FontCategory = {
@@ -230,6 +233,13 @@ declare const BackgroundControl: ControlComponent<() => React$1.JSX.Element>;
230
233
 
231
234
  declare const SwitchControl: ControlComponent<() => React$1.JSX.Element>;
232
235
 
236
+ type TooltipAddItemActionProps = {
237
+ disabled?: boolean;
238
+ enableTooltip?: boolean;
239
+ tooltipContent?: React$1.ReactNode;
240
+ newItemIndex?: number;
241
+ };
242
+
233
243
  type ChildControlConfig = {
234
244
  component: React.ComponentType;
235
245
  props?: Record<string, unknown>;
@@ -247,8 +257,9 @@ type RepeatableControlProps = {
247
257
  patternLabel?: string;
248
258
  placeholder?: string;
249
259
  propKey?: string;
260
+ addItemTooltipProps?: TooltipAddItemActionProps;
250
261
  };
251
- declare const RepeatableControl: ControlComponent<({ repeaterLabel, childControlConfig, showDuplicate, showToggle, initialValues, patternLabel, placeholder, propKey, }: RepeatableControlProps) => React$1.JSX.Element | null>;
262
+ declare const RepeatableControl: ControlComponent<({ repeaterLabel, childControlConfig, showDuplicate, showToggle, initialValues, patternLabel, placeholder, propKey, addItemTooltipProps, }: RepeatableControlProps) => React$1.JSX.Element | null>;
252
263
 
253
264
  type KeyValueControlProps = {
254
265
  keyName?: string;
@@ -271,8 +282,9 @@ declare const TransformBaseControl: ({ anchorRef }: {
271
282
  anchorRef: React$1.RefObject<HTMLDivElement | null>;
272
283
  }) => React$1.JSX.Element;
273
284
 
274
- declare const TransitionRepeaterControl: ControlComponent<(props: {
285
+ declare const TransitionRepeaterControl: ControlComponent<({ recentlyUsedList, currentStyleState, }: {
275
286
  recentlyUsedList: string[];
287
+ currentStyleState: StyleDefinitionState;
276
288
  }) => React$1.JSX.Element>;
277
289
 
278
290
  declare const PopoverContent: FC<PropsWithChildren<StackProps>>;
@@ -324,6 +336,7 @@ declare const useControlActions: () => ControlActionsContext;
324
336
 
325
337
  type SetValueMeta = {
326
338
  bind?: PropKey;
339
+ validation?: (value: PropValue) => boolean;
327
340
  };
328
341
  type SetValue<T> = (value: T, options?: CreateOptions, meta?: SetValueMeta) => void;
329
342
  type PropContext<T extends PropValue, P extends PropType> = {
@@ -414,10 +427,10 @@ declare const injectIntoRepeaterItemActions: (args: _elementor_locations.InjectA
414
427
 
415
428
  type UseInternalStateOptions<TValue> = {
416
429
  external: TValue | null;
417
- setExternal: (value: TValue | null) => void;
430
+ setExternal: (value: TValue | null, options?: CreateOptions, meta?: SetValueMeta) => void;
418
431
  persistWhen: (value: TValue | null) => boolean;
419
432
  fallback: (value: TValue | null) => TValue;
420
433
  };
421
- declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhen, fallback, }: UseInternalStateOptions<TValue>) => readonly [TValue, (setter: ((value: TValue) => TValue) | TValue) => void];
434
+ declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhen, fallback, }: UseInternalStateOptions<TValue>) => readonly [TValue, (setter: ((value: TValue) => TValue) | TValue, options?: CreateOptions, meta?: SetValueMeta) => void];
422
435
 
423
436
  export { type AngleUnit, AspectRatioControl, BackgroundControl, BoxShadowRepeaterControl, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent, ControlFormLabel, ControlReplacementsProvider, ControlToggleButtonGroup, CssEditor, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, type FontCategory, FontFamilyControl, GapControl, ImageControl, ItemSelector, KeyValueControl, type LengthUnit, LinkControl, LinkedDimensionsControl, NumberControl, PopoverContent, PositionControl, PropKeyProvider, PropProvider, type PropProviderProps, RepeatableControl, 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 };