@elementor/editor-controls 1.3.0 → 3.32.0-20
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 +18 -0
- package/dist/index.d.mts +104 -26
- package/dist/index.d.ts +104 -26
- package/dist/index.js +2271 -1119
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2147 -990
- package/dist/index.mjs.map +1 -1
- package/package.json +18 -18
- package/src/components/control-toggle-button-group.tsx +78 -14
- package/src/components/floating-bar.tsx +45 -0
- package/src/components/item-selector.tsx +168 -0
- package/src/components/repeater.tsx +23 -12
- package/src/components/restricted-link-infotip.tsx +76 -0
- package/src/components/size-control/size-input.tsx +4 -3
- package/src/components/size-control/text-field-inner-selection.tsx +60 -14
- package/src/components/text-field-popover.tsx +30 -7
- package/src/components/unstable-repeater/actions/add-item-action.tsx +50 -0
- package/src/components/unstable-repeater/actions/disable-item-action.tsx +39 -0
- package/src/components/unstable-repeater/actions/duplicate-item-action.tsx +32 -0
- package/src/components/unstable-repeater/actions/remove-item-action.tsx +27 -0
- package/src/components/unstable-repeater/context/repeater-context.tsx +137 -0
- package/src/components/unstable-repeater/header/header.tsx +23 -0
- package/src/components/unstable-repeater/index.ts +5 -0
- package/src/components/unstable-repeater/items/edit-item-popover.tsx +28 -0
- package/src/components/unstable-repeater/items/item.tsx +71 -0
- package/src/components/unstable-repeater/items/items-container.tsx +49 -0
- package/src/components/unstable-repeater/items/use-popover.tsx +26 -0
- package/src/{locations.ts → components/unstable-repeater/locations.ts} +9 -1
- package/src/components/unstable-repeater/types.ts +26 -0
- package/src/components/unstable-repeater/unstable-repeater.tsx +24 -0
- package/src/control-actions/control-actions.tsx +3 -20
- package/src/control-replacements.tsx +41 -0
- package/src/controls/background-control/background-control.tsx +1 -8
- package/src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx +17 -16
- package/src/controls/color-control.tsx +12 -1
- package/src/controls/equal-unequal-sizes-control.tsx +2 -9
- package/src/controls/filter-control/drop-shadow-item-content.tsx +67 -0
- package/src/controls/filter-control/drop-shadow-item-label.tsx +20 -0
- package/src/controls/filter-repeater-control.tsx +214 -88
- package/src/controls/font-family-control/font-family-control.tsx +22 -10
- package/src/controls/key-value-control.tsx +64 -50
- package/src/controls/link-control.tsx +8 -91
- package/src/controls/linked-dimensions-control.tsx +3 -16
- package/src/controls/number-control.tsx +10 -1
- package/src/controls/position-control.tsx +4 -16
- package/src/controls/repeatable-control.tsx +56 -34
- package/src/controls/select-control.tsx +7 -2
- package/src/controls/selection-size-control.tsx +74 -0
- package/src/controls/size-control.tsx +189 -121
- package/src/controls/stroke-control.tsx +2 -2
- package/src/controls/text-control.tsx +33 -18
- package/src/controls/toggle-control.tsx +3 -2
- package/src/controls/transform-control/functions/axis-row.tsx +4 -2
- package/src/controls/transform-control/functions/move.tsx +2 -1
- package/src/controls/transform-control/functions/rotate.tsx +48 -0
- package/src/controls/transform-control/functions/scale-axis-row.tsx +32 -0
- package/src/controls/transform-control/functions/scale.tsx +45 -0
- package/src/controls/transform-control/functions/skew.tsx +43 -0
- package/src/controls/transform-control/transform-content.tsx +60 -23
- package/src/controls/transform-control/transform-icon.tsx +10 -2
- package/src/controls/transform-control/transform-label.tsx +39 -2
- package/src/controls/transform-control/transform-repeater-control.tsx +2 -10
- package/src/controls/transform-control/types.ts +58 -0
- package/src/controls/transform-control/use-transform-tabs-history.tsx +107 -0
- package/src/controls/transition-control/data.ts +34 -0
- package/src/controls/transition-control/transition-repeater-control.tsx +63 -0
- package/src/controls/transition-control/transition-selector.tsx +88 -0
- package/src/controls/unstable-transform-control/unstable-transform-repeater-control.tsx +35 -0
- package/src/hooks/use-filtered-items-list.ts +24 -0
- package/src/hooks/use-size-extended-options.ts +1 -6
- package/src/index.ts +13 -3
- package/src/utils/size-control.ts +10 -2
- package/src/components/font-family-selector.tsx +0 -158
- package/src/hooks/use-filtered-font-families.ts +0 -24
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @elementor/editor-controls
|
|
2
2
|
|
|
3
|
+
## 1.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 669f39f: Display a placeholder value inside the color control.
|
|
8
|
+
- 068f659: Adds contrast, gray-scale, invert, sepia and saturate css filters
|
|
9
|
+
- e7cca0a: Updated size control to support degree units
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [2e677ee]
|
|
14
|
+
- Updated dependencies [068f659]
|
|
15
|
+
- Updated dependencies [e7cca0a]
|
|
16
|
+
- Updated dependencies [07ca7e9]
|
|
17
|
+
- @elementor/editor-ui@0.14.1
|
|
18
|
+
- @elementor/editor-props@0.17.0
|
|
19
|
+
- @elementor/editor-elements@0.9.1
|
|
20
|
+
|
|
3
21
|
## 1.3.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
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, ComponentType } from 'react';
|
|
3
|
+
import { SxProps, UnstableColorFieldProps, ToggleButtonProps, StackProps, FormLabelProps } from '@elementor/ui';
|
|
3
4
|
import { StringPropValue, PropTypeUtil, PropValue, PropKey, SizePropValue, PropType, CreateOptions } from '@elementor/editor-props';
|
|
4
|
-
import { UnstableColorFieldProps, ToggleButtonProps, StackProps, FormLabelProps } from '@elementor/ui';
|
|
5
5
|
import * as _elementor_locations from '@elementor/locations';
|
|
6
6
|
|
|
7
7
|
type ImageControlProps = {
|
|
@@ -13,8 +13,12 @@ type ImageControlProps = {
|
|
|
13
13
|
};
|
|
14
14
|
declare const ImageControl: ControlComponent<({ sizes, showMode }: ImageControlProps) => React$1.JSX.Element>;
|
|
15
15
|
|
|
16
|
-
declare const TextControl: ControlComponent<({ placeholder }: {
|
|
16
|
+
declare const TextControl: ControlComponent<({ placeholder, error, inputValue, inputDisabled, sx, }: {
|
|
17
17
|
placeholder?: string;
|
|
18
|
+
error?: boolean;
|
|
19
|
+
inputValue?: string;
|
|
20
|
+
inputDisabled?: boolean;
|
|
21
|
+
sx?: SxProps;
|
|
18
22
|
}) => React$1.JSX.Element>;
|
|
19
23
|
|
|
20
24
|
type Props$6 = {
|
|
@@ -22,34 +26,57 @@ type Props$6 = {
|
|
|
22
26
|
};
|
|
23
27
|
declare const TextAreaControl: ControlComponent<({ placeholder }: Props$6) => React$1.JSX.Element>;
|
|
24
28
|
|
|
25
|
-
declare const
|
|
29
|
+
declare const lengthUnits: readonly ["px", "%", "em", "rem", "vw", "vh"];
|
|
30
|
+
declare const angleUnits: readonly ["deg", "rad", "grad", "turn"];
|
|
31
|
+
declare const timeUnits: readonly ["s", "ms"];
|
|
26
32
|
declare const defaultExtendedOptions: readonly ["auto", "custom"];
|
|
27
|
-
type
|
|
33
|
+
type LengthUnit = (typeof lengthUnits)[number];
|
|
34
|
+
type AngleUnit = (typeof angleUnits)[number];
|
|
35
|
+
type TimeUnit = (typeof timeUnits)[number];
|
|
28
36
|
type ExtendedOption = (typeof defaultExtendedOptions)[number];
|
|
37
|
+
type Unit = LengthUnit | AngleUnit | TimeUnit;
|
|
29
38
|
|
|
30
|
-
type
|
|
39
|
+
type SizeVariant = 'length' | 'angle' | 'time';
|
|
40
|
+
type UnitProps<T extends readonly Unit[]> = {
|
|
41
|
+
units?: T;
|
|
42
|
+
defaultUnit?: T[number];
|
|
43
|
+
};
|
|
44
|
+
type BaseSizeControlProps = {
|
|
31
45
|
placeholder?: string;
|
|
32
46
|
startIcon?: React$1.ReactNode;
|
|
33
|
-
units?: Unit[];
|
|
34
47
|
extendedOptions?: ExtendedOption[];
|
|
35
48
|
disableCustom?: boolean;
|
|
36
49
|
anchorRef?: RefObject<HTMLDivElement | null>;
|
|
37
|
-
defaultUnit?: Unit;
|
|
38
50
|
};
|
|
39
|
-
|
|
51
|
+
type LengthSizeControlProps = BaseSizeControlProps & UnitProps<LengthUnit[]> & {
|
|
52
|
+
variant: 'length';
|
|
53
|
+
};
|
|
54
|
+
type AngleSizeControlProps = BaseSizeControlProps & UnitProps<AngleUnit[]> & {
|
|
55
|
+
variant: 'angle';
|
|
56
|
+
};
|
|
57
|
+
type TimeSizeControlProps = BaseSizeControlProps & UnitProps<TimeUnit[]> & {
|
|
58
|
+
variant: 'time';
|
|
59
|
+
};
|
|
60
|
+
type SizeControlProps = LengthSizeControlProps | AngleSizeControlProps | TimeSizeControlProps;
|
|
61
|
+
declare const SizeControl: ControlComponent<({ variant, defaultUnit, units, placeholder, startIcon, anchorRef, extendedOptions, disableCustom, }: Omit<SizeControlProps, "variant"> & {
|
|
62
|
+
variant?: SizeVariant;
|
|
63
|
+
}) => React$1.JSX.Element>;
|
|
40
64
|
|
|
41
65
|
declare const StrokeControl: ControlComponent<() => React$1.JSX.Element>;
|
|
42
66
|
|
|
43
67
|
declare const BoxShadowRepeaterControl: ControlComponent<() => React$1.JSX.Element>;
|
|
44
68
|
|
|
45
|
-
declare const FilterRepeaterControl: ControlComponent<(
|
|
69
|
+
declare const FilterRepeaterControl: ControlComponent<({ filterPropName }: {
|
|
70
|
+
filterPropName?: string;
|
|
71
|
+
}) => React$1.JSX.Element>;
|
|
46
72
|
|
|
73
|
+
type SelectOption = {
|
|
74
|
+
label: string;
|
|
75
|
+
value: StringPropValue['value'];
|
|
76
|
+
disabled?: boolean;
|
|
77
|
+
};
|
|
47
78
|
type Props$5 = {
|
|
48
|
-
options:
|
|
49
|
-
label: string;
|
|
50
|
-
value: StringPropValue['value'];
|
|
51
|
-
disabled?: boolean;
|
|
52
|
-
}>;
|
|
79
|
+
options: SelectOption[];
|
|
53
80
|
onChange?: (newValue: string | null, previousValue: string | null | undefined) => void;
|
|
54
81
|
};
|
|
55
82
|
declare const SelectControl: ControlComponent<({ options, onChange }: Props$5) => React$1.JSX.Element>;
|
|
@@ -78,6 +105,7 @@ type Props$3<TValue> = {
|
|
|
78
105
|
items: ToggleButtonGroupItem<TValue | null>[];
|
|
79
106
|
maxItems?: number;
|
|
80
107
|
fullWidth?: boolean;
|
|
108
|
+
placeholder?: TValue | TValue[];
|
|
81
109
|
} & ({
|
|
82
110
|
exclusive?: false;
|
|
83
111
|
value: NonExclusiveValue<TValue>;
|
|
@@ -87,7 +115,7 @@ type Props$3<TValue> = {
|
|
|
87
115
|
value: ExclusiveValue<TValue>;
|
|
88
116
|
onChange: (value: ExclusiveValue<TValue>) => void;
|
|
89
117
|
});
|
|
90
|
-
declare const ControlToggleButtonGroup: <TValue>({ justify, size, value, onChange, items, maxItems, exclusive, fullWidth, disabled, }: Props$3<TValue>) => React$1.JSX.Element;
|
|
118
|
+
declare const ControlToggleButtonGroup: <TValue>({ justify, size, value, onChange, items, maxItems, exclusive, fullWidth, disabled, placeholder, }: Props$3<TValue>) => React$1.JSX.Element;
|
|
91
119
|
|
|
92
120
|
type ToggleControlProps<T extends PropValue> = {
|
|
93
121
|
options: Array<ToggleButtonGroupItem<T> & {
|
|
@@ -100,12 +128,13 @@ type ToggleControlProps<T extends PropValue> = {
|
|
|
100
128
|
};
|
|
101
129
|
declare const ToggleControl: ControlComponent<({ options, fullWidth, size, exclusive, maxItems, }: ToggleControlProps<StringPropValue["value"]>) => React$1.JSX.Element>;
|
|
102
130
|
|
|
103
|
-
declare const NumberControl: ControlComponent<({ placeholder: labelPlaceholder, max, min, step, shouldForceInt, }: {
|
|
131
|
+
declare const NumberControl: ControlComponent<({ placeholder: labelPlaceholder, max, min, step, shouldForceInt, startIcon, }: {
|
|
104
132
|
placeholder?: string;
|
|
105
133
|
max?: number;
|
|
106
134
|
min?: number;
|
|
107
135
|
step?: number;
|
|
108
136
|
shouldForceInt?: boolean;
|
|
137
|
+
startIcon?: React$1.ReactNode;
|
|
109
138
|
}) => React$1.JSX.Element>;
|
|
110
139
|
|
|
111
140
|
type MultiSizePropValue = Record<PropKey, SizePropValue>;
|
|
@@ -140,6 +169,30 @@ type FontFamilyControlProps = {
|
|
|
140
169
|
};
|
|
141
170
|
declare const FontFamilyControl: ControlComponent<({ fontFamilies, sectionWidth }: FontFamilyControlProps) => React$1.JSX.Element>;
|
|
142
171
|
|
|
172
|
+
type SelectableItem = {
|
|
173
|
+
type: 'item' | 'category';
|
|
174
|
+
value: string;
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
type Category = {
|
|
178
|
+
label: string;
|
|
179
|
+
items: string[];
|
|
180
|
+
};
|
|
181
|
+
type ItemSelectorProps = {
|
|
182
|
+
itemsList: Category[];
|
|
183
|
+
selectedItem: string | null;
|
|
184
|
+
onItemChange: (item: string) => void;
|
|
185
|
+
onClose: () => void;
|
|
186
|
+
sectionWidth: number;
|
|
187
|
+
title: string;
|
|
188
|
+
itemStyle?: (item: SelectableItem) => React$1.CSSProperties;
|
|
189
|
+
onDebounce?: (name: string) => void;
|
|
190
|
+
icon: React$1.ElementType<{
|
|
191
|
+
fontSize: string;
|
|
192
|
+
}>;
|
|
193
|
+
};
|
|
194
|
+
declare const ItemSelector: ({ itemsList, selectedItem, onItemChange, onClose, sectionWidth, title, itemStyle, onDebounce, icon, }: ItemSelectorProps) => React$1.JSX.Element;
|
|
195
|
+
|
|
143
196
|
declare const UrlControl: ControlComponent<({ placeholder }: {
|
|
144
197
|
placeholder?: string;
|
|
145
198
|
}) => React$1.JSX.Element>;
|
|
@@ -192,8 +245,9 @@ type RepeatableControlProps = {
|
|
|
192
245
|
initialValues?: object;
|
|
193
246
|
patternLabel?: string;
|
|
194
247
|
placeholder?: string;
|
|
248
|
+
propKey?: string;
|
|
195
249
|
};
|
|
196
|
-
declare const RepeatableControl: ControlComponent<({ repeaterLabel, childControlConfig, showDuplicate, showToggle, initialValues, patternLabel, placeholder, }: RepeatableControlProps) => React$1.JSX.Element | null>;
|
|
250
|
+
declare const RepeatableControl: ControlComponent<({ repeaterLabel, childControlConfig, showDuplicate, showToggle, initialValues, patternLabel, placeholder, propKey, }: RepeatableControlProps) => React$1.JSX.Element | null>;
|
|
197
251
|
|
|
198
252
|
type KeyValueControlProps = {
|
|
199
253
|
keyName?: string;
|
|
@@ -208,18 +262,31 @@ declare const PositionControl: () => React$1.JSX.Element;
|
|
|
208
262
|
|
|
209
263
|
declare const TransformRepeaterControl: ControlComponent<() => React$1.JSX.Element>;
|
|
210
264
|
|
|
265
|
+
declare const TransitionRepeaterControl: ControlComponent<() => React$1.JSX.Element>;
|
|
266
|
+
|
|
211
267
|
declare const PopoverContent: FC<PropsWithChildren<StackProps>>;
|
|
212
268
|
|
|
213
|
-
|
|
269
|
+
type EnqueueFont = (fontFamily: string, context?: 'preview' | 'editor') => void;
|
|
270
|
+
declare const enqueueFont: EnqueueFont;
|
|
214
271
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
sectionWidth: number;
|
|
272
|
+
declare const UnstableTransformRepeaterControl: ControlComponent<() => React$1.JSX.Element>;
|
|
273
|
+
|
|
274
|
+
type TransitionProperty = {
|
|
275
|
+
label: string;
|
|
276
|
+
value: string;
|
|
221
277
|
};
|
|
222
|
-
|
|
278
|
+
type TransitionCategory = {
|
|
279
|
+
label: string;
|
|
280
|
+
type: 'category';
|
|
281
|
+
properties: TransitionProperty[];
|
|
282
|
+
};
|
|
283
|
+
declare const transitionProperties: TransitionCategory[];
|
|
284
|
+
declare const transitionsItemsList: {
|
|
285
|
+
label: string;
|
|
286
|
+
items: string[];
|
|
287
|
+
}[];
|
|
288
|
+
|
|
289
|
+
declare const ControlFormLabel: (props: FormLabelProps) => React$1.JSX.Element;
|
|
223
290
|
|
|
224
291
|
type AnyComponentType = ComponentType<any>;
|
|
225
292
|
declare const brandSymbol: unique symbol;
|
|
@@ -298,6 +365,11 @@ declare const createControlReplacementsRegistry: () => {
|
|
|
298
365
|
getControlReplacements: () => ControlReplacement[];
|
|
299
366
|
};
|
|
300
367
|
|
|
368
|
+
declare function useFloatingActionsBar(): {
|
|
369
|
+
open: boolean;
|
|
370
|
+
setOpen: React$1.Dispatch<React$1.SetStateAction<boolean>>;
|
|
371
|
+
};
|
|
372
|
+
|
|
301
373
|
type ControlAdornmentsItems = Array<{
|
|
302
374
|
id: string;
|
|
303
375
|
Adornment: ComponentType;
|
|
@@ -316,6 +388,12 @@ declare const injectIntoRepeaterItemIcon: (args: _elementor_locations.Replaceabl
|
|
|
316
388
|
declare const injectIntoRepeaterItemLabel: (args: _elementor_locations.ReplaceableInjectArgs<{
|
|
317
389
|
value: PropValue;
|
|
318
390
|
}>) => void;
|
|
391
|
+
declare const injectIntoRepeaterHeaderActions: (args: _elementor_locations.InjectArgs<{
|
|
392
|
+
value: PropValue;
|
|
393
|
+
}>) => void;
|
|
394
|
+
declare const injectIntoRepeaterItemActions: (args: _elementor_locations.InjectArgs<{
|
|
395
|
+
index: number;
|
|
396
|
+
}>) => void;
|
|
319
397
|
|
|
320
398
|
type UseInternalStateOptions<TValue> = {
|
|
321
399
|
external: TValue | null;
|
|
@@ -325,4 +403,4 @@ type UseInternalStateOptions<TValue> = {
|
|
|
325
403
|
};
|
|
326
404
|
declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhen, fallback, }: UseInternalStateOptions<TValue>) => readonly [TValue, (setter: ((value: TValue) => TValue) | TValue) => void];
|
|
327
405
|
|
|
328
|
-
export { AspectRatioControl, BackgroundControl, BoxShadowRepeaterControl, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent, ControlFormLabel, ControlReplacementsProvider, ControlToggleButtonGroup, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, type FontCategory, FontFamilyControl,
|
|
406
|
+
export { type AngleUnit, AspectRatioControl, BackgroundControl, BoxShadowRepeaterControl, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent, ControlFormLabel, ControlReplacementsProvider, ControlToggleButtonGroup, 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, TransformRepeaterControl, TransitionRepeaterControl, type Unit, UnstableTransformRepeaterControl, UrlControl, 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, ComponentType } from 'react';
|
|
3
|
+
import { SxProps, UnstableColorFieldProps, ToggleButtonProps, StackProps, FormLabelProps } from '@elementor/ui';
|
|
3
4
|
import { StringPropValue, PropTypeUtil, PropValue, PropKey, SizePropValue, PropType, CreateOptions } from '@elementor/editor-props';
|
|
4
|
-
import { UnstableColorFieldProps, ToggleButtonProps, StackProps, FormLabelProps } from '@elementor/ui';
|
|
5
5
|
import * as _elementor_locations from '@elementor/locations';
|
|
6
6
|
|
|
7
7
|
type ImageControlProps = {
|
|
@@ -13,8 +13,12 @@ type ImageControlProps = {
|
|
|
13
13
|
};
|
|
14
14
|
declare const ImageControl: ControlComponent<({ sizes, showMode }: ImageControlProps) => React$1.JSX.Element>;
|
|
15
15
|
|
|
16
|
-
declare const TextControl: ControlComponent<({ placeholder }: {
|
|
16
|
+
declare const TextControl: ControlComponent<({ placeholder, error, inputValue, inputDisabled, sx, }: {
|
|
17
17
|
placeholder?: string;
|
|
18
|
+
error?: boolean;
|
|
19
|
+
inputValue?: string;
|
|
20
|
+
inputDisabled?: boolean;
|
|
21
|
+
sx?: SxProps;
|
|
18
22
|
}) => React$1.JSX.Element>;
|
|
19
23
|
|
|
20
24
|
type Props$6 = {
|
|
@@ -22,34 +26,57 @@ type Props$6 = {
|
|
|
22
26
|
};
|
|
23
27
|
declare const TextAreaControl: ControlComponent<({ placeholder }: Props$6) => React$1.JSX.Element>;
|
|
24
28
|
|
|
25
|
-
declare const
|
|
29
|
+
declare const lengthUnits: readonly ["px", "%", "em", "rem", "vw", "vh"];
|
|
30
|
+
declare const angleUnits: readonly ["deg", "rad", "grad", "turn"];
|
|
31
|
+
declare const timeUnits: readonly ["s", "ms"];
|
|
26
32
|
declare const defaultExtendedOptions: readonly ["auto", "custom"];
|
|
27
|
-
type
|
|
33
|
+
type LengthUnit = (typeof lengthUnits)[number];
|
|
34
|
+
type AngleUnit = (typeof angleUnits)[number];
|
|
35
|
+
type TimeUnit = (typeof timeUnits)[number];
|
|
28
36
|
type ExtendedOption = (typeof defaultExtendedOptions)[number];
|
|
37
|
+
type Unit = LengthUnit | AngleUnit | TimeUnit;
|
|
29
38
|
|
|
30
|
-
type
|
|
39
|
+
type SizeVariant = 'length' | 'angle' | 'time';
|
|
40
|
+
type UnitProps<T extends readonly Unit[]> = {
|
|
41
|
+
units?: T;
|
|
42
|
+
defaultUnit?: T[number];
|
|
43
|
+
};
|
|
44
|
+
type BaseSizeControlProps = {
|
|
31
45
|
placeholder?: string;
|
|
32
46
|
startIcon?: React$1.ReactNode;
|
|
33
|
-
units?: Unit[];
|
|
34
47
|
extendedOptions?: ExtendedOption[];
|
|
35
48
|
disableCustom?: boolean;
|
|
36
49
|
anchorRef?: RefObject<HTMLDivElement | null>;
|
|
37
|
-
defaultUnit?: Unit;
|
|
38
50
|
};
|
|
39
|
-
|
|
51
|
+
type LengthSizeControlProps = BaseSizeControlProps & UnitProps<LengthUnit[]> & {
|
|
52
|
+
variant: 'length';
|
|
53
|
+
};
|
|
54
|
+
type AngleSizeControlProps = BaseSizeControlProps & UnitProps<AngleUnit[]> & {
|
|
55
|
+
variant: 'angle';
|
|
56
|
+
};
|
|
57
|
+
type TimeSizeControlProps = BaseSizeControlProps & UnitProps<TimeUnit[]> & {
|
|
58
|
+
variant: 'time';
|
|
59
|
+
};
|
|
60
|
+
type SizeControlProps = LengthSizeControlProps | AngleSizeControlProps | TimeSizeControlProps;
|
|
61
|
+
declare const SizeControl: ControlComponent<({ variant, defaultUnit, units, placeholder, startIcon, anchorRef, extendedOptions, disableCustom, }: Omit<SizeControlProps, "variant"> & {
|
|
62
|
+
variant?: SizeVariant;
|
|
63
|
+
}) => React$1.JSX.Element>;
|
|
40
64
|
|
|
41
65
|
declare const StrokeControl: ControlComponent<() => React$1.JSX.Element>;
|
|
42
66
|
|
|
43
67
|
declare const BoxShadowRepeaterControl: ControlComponent<() => React$1.JSX.Element>;
|
|
44
68
|
|
|
45
|
-
declare const FilterRepeaterControl: ControlComponent<(
|
|
69
|
+
declare const FilterRepeaterControl: ControlComponent<({ filterPropName }: {
|
|
70
|
+
filterPropName?: string;
|
|
71
|
+
}) => React$1.JSX.Element>;
|
|
46
72
|
|
|
73
|
+
type SelectOption = {
|
|
74
|
+
label: string;
|
|
75
|
+
value: StringPropValue['value'];
|
|
76
|
+
disabled?: boolean;
|
|
77
|
+
};
|
|
47
78
|
type Props$5 = {
|
|
48
|
-
options:
|
|
49
|
-
label: string;
|
|
50
|
-
value: StringPropValue['value'];
|
|
51
|
-
disabled?: boolean;
|
|
52
|
-
}>;
|
|
79
|
+
options: SelectOption[];
|
|
53
80
|
onChange?: (newValue: string | null, previousValue: string | null | undefined) => void;
|
|
54
81
|
};
|
|
55
82
|
declare const SelectControl: ControlComponent<({ options, onChange }: Props$5) => React$1.JSX.Element>;
|
|
@@ -78,6 +105,7 @@ type Props$3<TValue> = {
|
|
|
78
105
|
items: ToggleButtonGroupItem<TValue | null>[];
|
|
79
106
|
maxItems?: number;
|
|
80
107
|
fullWidth?: boolean;
|
|
108
|
+
placeholder?: TValue | TValue[];
|
|
81
109
|
} & ({
|
|
82
110
|
exclusive?: false;
|
|
83
111
|
value: NonExclusiveValue<TValue>;
|
|
@@ -87,7 +115,7 @@ type Props$3<TValue> = {
|
|
|
87
115
|
value: ExclusiveValue<TValue>;
|
|
88
116
|
onChange: (value: ExclusiveValue<TValue>) => void;
|
|
89
117
|
});
|
|
90
|
-
declare const ControlToggleButtonGroup: <TValue>({ justify, size, value, onChange, items, maxItems, exclusive, fullWidth, disabled, }: Props$3<TValue>) => React$1.JSX.Element;
|
|
118
|
+
declare const ControlToggleButtonGroup: <TValue>({ justify, size, value, onChange, items, maxItems, exclusive, fullWidth, disabled, placeholder, }: Props$3<TValue>) => React$1.JSX.Element;
|
|
91
119
|
|
|
92
120
|
type ToggleControlProps<T extends PropValue> = {
|
|
93
121
|
options: Array<ToggleButtonGroupItem<T> & {
|
|
@@ -100,12 +128,13 @@ type ToggleControlProps<T extends PropValue> = {
|
|
|
100
128
|
};
|
|
101
129
|
declare const ToggleControl: ControlComponent<({ options, fullWidth, size, exclusive, maxItems, }: ToggleControlProps<StringPropValue["value"]>) => React$1.JSX.Element>;
|
|
102
130
|
|
|
103
|
-
declare const NumberControl: ControlComponent<({ placeholder: labelPlaceholder, max, min, step, shouldForceInt, }: {
|
|
131
|
+
declare const NumberControl: ControlComponent<({ placeholder: labelPlaceholder, max, min, step, shouldForceInt, startIcon, }: {
|
|
104
132
|
placeholder?: string;
|
|
105
133
|
max?: number;
|
|
106
134
|
min?: number;
|
|
107
135
|
step?: number;
|
|
108
136
|
shouldForceInt?: boolean;
|
|
137
|
+
startIcon?: React$1.ReactNode;
|
|
109
138
|
}) => React$1.JSX.Element>;
|
|
110
139
|
|
|
111
140
|
type MultiSizePropValue = Record<PropKey, SizePropValue>;
|
|
@@ -140,6 +169,30 @@ type FontFamilyControlProps = {
|
|
|
140
169
|
};
|
|
141
170
|
declare const FontFamilyControl: ControlComponent<({ fontFamilies, sectionWidth }: FontFamilyControlProps) => React$1.JSX.Element>;
|
|
142
171
|
|
|
172
|
+
type SelectableItem = {
|
|
173
|
+
type: 'item' | 'category';
|
|
174
|
+
value: string;
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
type Category = {
|
|
178
|
+
label: string;
|
|
179
|
+
items: string[];
|
|
180
|
+
};
|
|
181
|
+
type ItemSelectorProps = {
|
|
182
|
+
itemsList: Category[];
|
|
183
|
+
selectedItem: string | null;
|
|
184
|
+
onItemChange: (item: string) => void;
|
|
185
|
+
onClose: () => void;
|
|
186
|
+
sectionWidth: number;
|
|
187
|
+
title: string;
|
|
188
|
+
itemStyle?: (item: SelectableItem) => React$1.CSSProperties;
|
|
189
|
+
onDebounce?: (name: string) => void;
|
|
190
|
+
icon: React$1.ElementType<{
|
|
191
|
+
fontSize: string;
|
|
192
|
+
}>;
|
|
193
|
+
};
|
|
194
|
+
declare const ItemSelector: ({ itemsList, selectedItem, onItemChange, onClose, sectionWidth, title, itemStyle, onDebounce, icon, }: ItemSelectorProps) => React$1.JSX.Element;
|
|
195
|
+
|
|
143
196
|
declare const UrlControl: ControlComponent<({ placeholder }: {
|
|
144
197
|
placeholder?: string;
|
|
145
198
|
}) => React$1.JSX.Element>;
|
|
@@ -192,8 +245,9 @@ type RepeatableControlProps = {
|
|
|
192
245
|
initialValues?: object;
|
|
193
246
|
patternLabel?: string;
|
|
194
247
|
placeholder?: string;
|
|
248
|
+
propKey?: string;
|
|
195
249
|
};
|
|
196
|
-
declare const RepeatableControl: ControlComponent<({ repeaterLabel, childControlConfig, showDuplicate, showToggle, initialValues, patternLabel, placeholder, }: RepeatableControlProps) => React$1.JSX.Element | null>;
|
|
250
|
+
declare const RepeatableControl: ControlComponent<({ repeaterLabel, childControlConfig, showDuplicate, showToggle, initialValues, patternLabel, placeholder, propKey, }: RepeatableControlProps) => React$1.JSX.Element | null>;
|
|
197
251
|
|
|
198
252
|
type KeyValueControlProps = {
|
|
199
253
|
keyName?: string;
|
|
@@ -208,18 +262,31 @@ declare const PositionControl: () => React$1.JSX.Element;
|
|
|
208
262
|
|
|
209
263
|
declare const TransformRepeaterControl: ControlComponent<() => React$1.JSX.Element>;
|
|
210
264
|
|
|
265
|
+
declare const TransitionRepeaterControl: ControlComponent<() => React$1.JSX.Element>;
|
|
266
|
+
|
|
211
267
|
declare const PopoverContent: FC<PropsWithChildren<StackProps>>;
|
|
212
268
|
|
|
213
|
-
|
|
269
|
+
type EnqueueFont = (fontFamily: string, context?: 'preview' | 'editor') => void;
|
|
270
|
+
declare const enqueueFont: EnqueueFont;
|
|
214
271
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
sectionWidth: number;
|
|
272
|
+
declare const UnstableTransformRepeaterControl: ControlComponent<() => React$1.JSX.Element>;
|
|
273
|
+
|
|
274
|
+
type TransitionProperty = {
|
|
275
|
+
label: string;
|
|
276
|
+
value: string;
|
|
221
277
|
};
|
|
222
|
-
|
|
278
|
+
type TransitionCategory = {
|
|
279
|
+
label: string;
|
|
280
|
+
type: 'category';
|
|
281
|
+
properties: TransitionProperty[];
|
|
282
|
+
};
|
|
283
|
+
declare const transitionProperties: TransitionCategory[];
|
|
284
|
+
declare const transitionsItemsList: {
|
|
285
|
+
label: string;
|
|
286
|
+
items: string[];
|
|
287
|
+
}[];
|
|
288
|
+
|
|
289
|
+
declare const ControlFormLabel: (props: FormLabelProps) => React$1.JSX.Element;
|
|
223
290
|
|
|
224
291
|
type AnyComponentType = ComponentType<any>;
|
|
225
292
|
declare const brandSymbol: unique symbol;
|
|
@@ -298,6 +365,11 @@ declare const createControlReplacementsRegistry: () => {
|
|
|
298
365
|
getControlReplacements: () => ControlReplacement[];
|
|
299
366
|
};
|
|
300
367
|
|
|
368
|
+
declare function useFloatingActionsBar(): {
|
|
369
|
+
open: boolean;
|
|
370
|
+
setOpen: React$1.Dispatch<React$1.SetStateAction<boolean>>;
|
|
371
|
+
};
|
|
372
|
+
|
|
301
373
|
type ControlAdornmentsItems = Array<{
|
|
302
374
|
id: string;
|
|
303
375
|
Adornment: ComponentType;
|
|
@@ -316,6 +388,12 @@ declare const injectIntoRepeaterItemIcon: (args: _elementor_locations.Replaceabl
|
|
|
316
388
|
declare const injectIntoRepeaterItemLabel: (args: _elementor_locations.ReplaceableInjectArgs<{
|
|
317
389
|
value: PropValue;
|
|
318
390
|
}>) => void;
|
|
391
|
+
declare const injectIntoRepeaterHeaderActions: (args: _elementor_locations.InjectArgs<{
|
|
392
|
+
value: PropValue;
|
|
393
|
+
}>) => void;
|
|
394
|
+
declare const injectIntoRepeaterItemActions: (args: _elementor_locations.InjectArgs<{
|
|
395
|
+
index: number;
|
|
396
|
+
}>) => void;
|
|
319
397
|
|
|
320
398
|
type UseInternalStateOptions<TValue> = {
|
|
321
399
|
external: TValue | null;
|
|
@@ -325,4 +403,4 @@ type UseInternalStateOptions<TValue> = {
|
|
|
325
403
|
};
|
|
326
404
|
declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhen, fallback, }: UseInternalStateOptions<TValue>) => readonly [TValue, (setter: ((value: TValue) => TValue) | TValue) => void];
|
|
327
405
|
|
|
328
|
-
export { AspectRatioControl, BackgroundControl, BoxShadowRepeaterControl, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent, ControlFormLabel, ControlReplacementsProvider, ControlToggleButtonGroup, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, type FontCategory, FontFamilyControl,
|
|
406
|
+
export { type AngleUnit, AspectRatioControl, BackgroundControl, BoxShadowRepeaterControl, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent, ControlFormLabel, ControlReplacementsProvider, ControlToggleButtonGroup, 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, TransformRepeaterControl, TransitionRepeaterControl, type Unit, UnstableTransformRepeaterControl, UrlControl, createControlReplacementsRegistry, enqueueFont, injectIntoRepeaterHeaderActions, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useFloatingActionsBar, useSyncExternalState };
|