@elementor/editor-controls 1.5.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 +0 -22
- package/dist/index.d.mts +95 -25
- package/dist/index.d.ts +95 -25
- package/dist/index.js +2045 -1041
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1962 -964
- 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/{font-family-selector.tsx → item-selector.tsx} +62 -50
- package/src/components/repeater.tsx +1 -1
- package/src/components/restricted-link-infotip.tsx +76 -0
- package/src/components/size-control/size-input.tsx +8 -7
- 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/equal-unequal-sizes-control.tsx +2 -9
- package/src/controls/filter-control/drop-shadow-item-content.tsx +4 -6
- package/src/controls/filter-control/drop-shadow-item-label.tsx +2 -2
- package/src/controls/filter-repeater-control.tsx +149 -110
- package/src/controls/font-family-control/font-family-control.tsx +22 -10
- package/src/controls/key-value-control.tsx +9 -6
- 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 +8 -5
- package/src/controls/select-control.tsx +7 -2
- package/src/controls/selection-size-control.tsx +74 -0
- package/src/controls/size-control.tsx +181 -126
- package/src/controls/stroke-control.tsx +2 -2
- 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 +12 -6
- package/src/hooks/use-filtered-font-families.ts +0 -24
package/CHANGELOG.md
CHANGED
|
@@ -1,27 +1,5 @@
|
|
|
1
1
|
# @elementor/editor-controls
|
|
2
2
|
|
|
3
|
-
## 1.5.0
|
|
4
|
-
|
|
5
|
-
### Minor Changes
|
|
6
|
-
|
|
7
|
-
- 64b3e09: Adds support for the backdrop-filter css property to atomic widgets.
|
|
8
|
-
- 3904505: Adds hue rotate css filter
|
|
9
|
-
- cdbd491: Add Drop Shadow filter
|
|
10
|
-
- b90d7db: Key value control should support dynamic tags
|
|
11
|
-
|
|
12
|
-
### Patch Changes
|
|
13
|
-
|
|
14
|
-
- 0db150c: Update the popover height.
|
|
15
|
-
- Updated dependencies [64b3e09]
|
|
16
|
-
- Updated dependencies [3904505]
|
|
17
|
-
- Updated dependencies [0db150c]
|
|
18
|
-
- Updated dependencies [cdbd491]
|
|
19
|
-
- Updated dependencies [d44e898]
|
|
20
|
-
- @elementor/editor-props@0.18.0
|
|
21
|
-
- @elementor/editor-ui@0.14.2
|
|
22
|
-
- @elementor/editor-current-user@0.6.1
|
|
23
|
-
- @elementor/editor-elements@0.9.2
|
|
24
|
-
|
|
25
3
|
## 1.4.0
|
|
26
4
|
|
|
27
5
|
### Minor Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -26,23 +26,41 @@ type Props$6 = {
|
|
|
26
26
|
};
|
|
27
27
|
declare const TextAreaControl: ControlComponent<({ placeholder }: Props$6) => React$1.JSX.Element>;
|
|
28
28
|
|
|
29
|
-
declare const
|
|
30
|
-
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"];
|
|
31
32
|
declare const defaultExtendedOptions: readonly ["auto", "custom"];
|
|
32
|
-
type
|
|
33
|
-
type
|
|
33
|
+
type LengthUnit = (typeof lengthUnits)[number];
|
|
34
|
+
type AngleUnit = (typeof angleUnits)[number];
|
|
35
|
+
type TimeUnit = (typeof timeUnits)[number];
|
|
34
36
|
type ExtendedOption = (typeof defaultExtendedOptions)[number];
|
|
37
|
+
type Unit = LengthUnit | AngleUnit | TimeUnit;
|
|
35
38
|
|
|
36
|
-
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 = {
|
|
37
45
|
placeholder?: string;
|
|
38
46
|
startIcon?: React$1.ReactNode;
|
|
39
|
-
units?: (Unit | DegreeUnit)[];
|
|
40
47
|
extendedOptions?: ExtendedOption[];
|
|
41
48
|
disableCustom?: boolean;
|
|
42
49
|
anchorRef?: RefObject<HTMLDivElement | null>;
|
|
43
|
-
defaultUnit?: Unit | DegreeUnit;
|
|
44
50
|
};
|
|
45
|
-
|
|
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>;
|
|
46
64
|
|
|
47
65
|
declare const StrokeControl: ControlComponent<() => React$1.JSX.Element>;
|
|
48
66
|
|
|
@@ -52,12 +70,13 @@ declare const FilterRepeaterControl: ControlComponent<({ filterPropName }: {
|
|
|
52
70
|
filterPropName?: string;
|
|
53
71
|
}) => React$1.JSX.Element>;
|
|
54
72
|
|
|
73
|
+
type SelectOption = {
|
|
74
|
+
label: string;
|
|
75
|
+
value: StringPropValue['value'];
|
|
76
|
+
disabled?: boolean;
|
|
77
|
+
};
|
|
55
78
|
type Props$5 = {
|
|
56
|
-
options:
|
|
57
|
-
label: string;
|
|
58
|
-
value: StringPropValue['value'];
|
|
59
|
-
disabled?: boolean;
|
|
60
|
-
}>;
|
|
79
|
+
options: SelectOption[];
|
|
61
80
|
onChange?: (newValue: string | null, previousValue: string | null | undefined) => void;
|
|
62
81
|
};
|
|
63
82
|
declare const SelectControl: ControlComponent<({ options, onChange }: Props$5) => React$1.JSX.Element>;
|
|
@@ -86,6 +105,7 @@ type Props$3<TValue> = {
|
|
|
86
105
|
items: ToggleButtonGroupItem<TValue | null>[];
|
|
87
106
|
maxItems?: number;
|
|
88
107
|
fullWidth?: boolean;
|
|
108
|
+
placeholder?: TValue | TValue[];
|
|
89
109
|
} & ({
|
|
90
110
|
exclusive?: false;
|
|
91
111
|
value: NonExclusiveValue<TValue>;
|
|
@@ -95,7 +115,7 @@ type Props$3<TValue> = {
|
|
|
95
115
|
value: ExclusiveValue<TValue>;
|
|
96
116
|
onChange: (value: ExclusiveValue<TValue>) => void;
|
|
97
117
|
});
|
|
98
|
-
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;
|
|
99
119
|
|
|
100
120
|
type ToggleControlProps<T extends PropValue> = {
|
|
101
121
|
options: Array<ToggleButtonGroupItem<T> & {
|
|
@@ -108,12 +128,13 @@ type ToggleControlProps<T extends PropValue> = {
|
|
|
108
128
|
};
|
|
109
129
|
declare const ToggleControl: ControlComponent<({ options, fullWidth, size, exclusive, maxItems, }: ToggleControlProps<StringPropValue["value"]>) => React$1.JSX.Element>;
|
|
110
130
|
|
|
111
|
-
declare const NumberControl: ControlComponent<({ placeholder: labelPlaceholder, max, min, step, shouldForceInt, }: {
|
|
131
|
+
declare const NumberControl: ControlComponent<({ placeholder: labelPlaceholder, max, min, step, shouldForceInt, startIcon, }: {
|
|
112
132
|
placeholder?: string;
|
|
113
133
|
max?: number;
|
|
114
134
|
min?: number;
|
|
115
135
|
step?: number;
|
|
116
136
|
shouldForceInt?: boolean;
|
|
137
|
+
startIcon?: React$1.ReactNode;
|
|
117
138
|
}) => React$1.JSX.Element>;
|
|
118
139
|
|
|
119
140
|
type MultiSizePropValue = Record<PropKey, SizePropValue>;
|
|
@@ -148,6 +169,30 @@ type FontFamilyControlProps = {
|
|
|
148
169
|
};
|
|
149
170
|
declare const FontFamilyControl: ControlComponent<({ fontFamilies, sectionWidth }: FontFamilyControlProps) => React$1.JSX.Element>;
|
|
150
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
|
+
|
|
151
196
|
declare const UrlControl: ControlComponent<({ placeholder }: {
|
|
152
197
|
placeholder?: string;
|
|
153
198
|
}) => React$1.JSX.Element>;
|
|
@@ -200,8 +245,9 @@ type RepeatableControlProps = {
|
|
|
200
245
|
initialValues?: object;
|
|
201
246
|
patternLabel?: string;
|
|
202
247
|
placeholder?: string;
|
|
248
|
+
propKey?: string;
|
|
203
249
|
};
|
|
204
|
-
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>;
|
|
205
251
|
|
|
206
252
|
type KeyValueControlProps = {
|
|
207
253
|
keyName?: string;
|
|
@@ -216,18 +262,31 @@ declare const PositionControl: () => React$1.JSX.Element;
|
|
|
216
262
|
|
|
217
263
|
declare const TransformRepeaterControl: ControlComponent<() => React$1.JSX.Element>;
|
|
218
264
|
|
|
265
|
+
declare const TransitionRepeaterControl: ControlComponent<() => React$1.JSX.Element>;
|
|
266
|
+
|
|
219
267
|
declare const PopoverContent: FC<PropsWithChildren<StackProps>>;
|
|
220
268
|
|
|
221
|
-
|
|
269
|
+
type EnqueueFont = (fontFamily: string, context?: 'preview' | 'editor') => void;
|
|
270
|
+
declare const enqueueFont: EnqueueFont;
|
|
222
271
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
272
|
+
declare const UnstableTransformRepeaterControl: ControlComponent<() => React$1.JSX.Element>;
|
|
273
|
+
|
|
274
|
+
type TransitionProperty = {
|
|
275
|
+
label: string;
|
|
276
|
+
value: string;
|
|
277
|
+
};
|
|
278
|
+
type TransitionCategory = {
|
|
279
|
+
label: string;
|
|
280
|
+
type: 'category';
|
|
281
|
+
properties: TransitionProperty[];
|
|
229
282
|
};
|
|
230
|
-
declare const
|
|
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;
|
|
231
290
|
|
|
232
291
|
type AnyComponentType = ComponentType<any>;
|
|
233
292
|
declare const brandSymbol: unique symbol;
|
|
@@ -306,6 +365,11 @@ declare const createControlReplacementsRegistry: () => {
|
|
|
306
365
|
getControlReplacements: () => ControlReplacement[];
|
|
307
366
|
};
|
|
308
367
|
|
|
368
|
+
declare function useFloatingActionsBar(): {
|
|
369
|
+
open: boolean;
|
|
370
|
+
setOpen: React$1.Dispatch<React$1.SetStateAction<boolean>>;
|
|
371
|
+
};
|
|
372
|
+
|
|
309
373
|
type ControlAdornmentsItems = Array<{
|
|
310
374
|
id: string;
|
|
311
375
|
Adornment: ComponentType;
|
|
@@ -324,6 +388,12 @@ declare const injectIntoRepeaterItemIcon: (args: _elementor_locations.Replaceabl
|
|
|
324
388
|
declare const injectIntoRepeaterItemLabel: (args: _elementor_locations.ReplaceableInjectArgs<{
|
|
325
389
|
value: PropValue;
|
|
326
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;
|
|
327
397
|
|
|
328
398
|
type UseInternalStateOptions<TValue> = {
|
|
329
399
|
external: TValue | null;
|
|
@@ -333,4 +403,4 @@ type UseInternalStateOptions<TValue> = {
|
|
|
333
403
|
};
|
|
334
404
|
declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhen, fallback, }: UseInternalStateOptions<TValue>) => readonly [TValue, (setter: ((value: TValue) => TValue) | TValue) => void];
|
|
335
405
|
|
|
336
|
-
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
|
@@ -26,23 +26,41 @@ type Props$6 = {
|
|
|
26
26
|
};
|
|
27
27
|
declare const TextAreaControl: ControlComponent<({ placeholder }: Props$6) => React$1.JSX.Element>;
|
|
28
28
|
|
|
29
|
-
declare const
|
|
30
|
-
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"];
|
|
31
32
|
declare const defaultExtendedOptions: readonly ["auto", "custom"];
|
|
32
|
-
type
|
|
33
|
-
type
|
|
33
|
+
type LengthUnit = (typeof lengthUnits)[number];
|
|
34
|
+
type AngleUnit = (typeof angleUnits)[number];
|
|
35
|
+
type TimeUnit = (typeof timeUnits)[number];
|
|
34
36
|
type ExtendedOption = (typeof defaultExtendedOptions)[number];
|
|
37
|
+
type Unit = LengthUnit | AngleUnit | TimeUnit;
|
|
35
38
|
|
|
36
|
-
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 = {
|
|
37
45
|
placeholder?: string;
|
|
38
46
|
startIcon?: React$1.ReactNode;
|
|
39
|
-
units?: (Unit | DegreeUnit)[];
|
|
40
47
|
extendedOptions?: ExtendedOption[];
|
|
41
48
|
disableCustom?: boolean;
|
|
42
49
|
anchorRef?: RefObject<HTMLDivElement | null>;
|
|
43
|
-
defaultUnit?: Unit | DegreeUnit;
|
|
44
50
|
};
|
|
45
|
-
|
|
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>;
|
|
46
64
|
|
|
47
65
|
declare const StrokeControl: ControlComponent<() => React$1.JSX.Element>;
|
|
48
66
|
|
|
@@ -52,12 +70,13 @@ declare const FilterRepeaterControl: ControlComponent<({ filterPropName }: {
|
|
|
52
70
|
filterPropName?: string;
|
|
53
71
|
}) => React$1.JSX.Element>;
|
|
54
72
|
|
|
73
|
+
type SelectOption = {
|
|
74
|
+
label: string;
|
|
75
|
+
value: StringPropValue['value'];
|
|
76
|
+
disabled?: boolean;
|
|
77
|
+
};
|
|
55
78
|
type Props$5 = {
|
|
56
|
-
options:
|
|
57
|
-
label: string;
|
|
58
|
-
value: StringPropValue['value'];
|
|
59
|
-
disabled?: boolean;
|
|
60
|
-
}>;
|
|
79
|
+
options: SelectOption[];
|
|
61
80
|
onChange?: (newValue: string | null, previousValue: string | null | undefined) => void;
|
|
62
81
|
};
|
|
63
82
|
declare const SelectControl: ControlComponent<({ options, onChange }: Props$5) => React$1.JSX.Element>;
|
|
@@ -86,6 +105,7 @@ type Props$3<TValue> = {
|
|
|
86
105
|
items: ToggleButtonGroupItem<TValue | null>[];
|
|
87
106
|
maxItems?: number;
|
|
88
107
|
fullWidth?: boolean;
|
|
108
|
+
placeholder?: TValue | TValue[];
|
|
89
109
|
} & ({
|
|
90
110
|
exclusive?: false;
|
|
91
111
|
value: NonExclusiveValue<TValue>;
|
|
@@ -95,7 +115,7 @@ type Props$3<TValue> = {
|
|
|
95
115
|
value: ExclusiveValue<TValue>;
|
|
96
116
|
onChange: (value: ExclusiveValue<TValue>) => void;
|
|
97
117
|
});
|
|
98
|
-
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;
|
|
99
119
|
|
|
100
120
|
type ToggleControlProps<T extends PropValue> = {
|
|
101
121
|
options: Array<ToggleButtonGroupItem<T> & {
|
|
@@ -108,12 +128,13 @@ type ToggleControlProps<T extends PropValue> = {
|
|
|
108
128
|
};
|
|
109
129
|
declare const ToggleControl: ControlComponent<({ options, fullWidth, size, exclusive, maxItems, }: ToggleControlProps<StringPropValue["value"]>) => React$1.JSX.Element>;
|
|
110
130
|
|
|
111
|
-
declare const NumberControl: ControlComponent<({ placeholder: labelPlaceholder, max, min, step, shouldForceInt, }: {
|
|
131
|
+
declare const NumberControl: ControlComponent<({ placeholder: labelPlaceholder, max, min, step, shouldForceInt, startIcon, }: {
|
|
112
132
|
placeholder?: string;
|
|
113
133
|
max?: number;
|
|
114
134
|
min?: number;
|
|
115
135
|
step?: number;
|
|
116
136
|
shouldForceInt?: boolean;
|
|
137
|
+
startIcon?: React$1.ReactNode;
|
|
117
138
|
}) => React$1.JSX.Element>;
|
|
118
139
|
|
|
119
140
|
type MultiSizePropValue = Record<PropKey, SizePropValue>;
|
|
@@ -148,6 +169,30 @@ type FontFamilyControlProps = {
|
|
|
148
169
|
};
|
|
149
170
|
declare const FontFamilyControl: ControlComponent<({ fontFamilies, sectionWidth }: FontFamilyControlProps) => React$1.JSX.Element>;
|
|
150
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
|
+
|
|
151
196
|
declare const UrlControl: ControlComponent<({ placeholder }: {
|
|
152
197
|
placeholder?: string;
|
|
153
198
|
}) => React$1.JSX.Element>;
|
|
@@ -200,8 +245,9 @@ type RepeatableControlProps = {
|
|
|
200
245
|
initialValues?: object;
|
|
201
246
|
patternLabel?: string;
|
|
202
247
|
placeholder?: string;
|
|
248
|
+
propKey?: string;
|
|
203
249
|
};
|
|
204
|
-
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>;
|
|
205
251
|
|
|
206
252
|
type KeyValueControlProps = {
|
|
207
253
|
keyName?: string;
|
|
@@ -216,18 +262,31 @@ declare const PositionControl: () => React$1.JSX.Element;
|
|
|
216
262
|
|
|
217
263
|
declare const TransformRepeaterControl: ControlComponent<() => React$1.JSX.Element>;
|
|
218
264
|
|
|
265
|
+
declare const TransitionRepeaterControl: ControlComponent<() => React$1.JSX.Element>;
|
|
266
|
+
|
|
219
267
|
declare const PopoverContent: FC<PropsWithChildren<StackProps>>;
|
|
220
268
|
|
|
221
|
-
|
|
269
|
+
type EnqueueFont = (fontFamily: string, context?: 'preview' | 'editor') => void;
|
|
270
|
+
declare const enqueueFont: EnqueueFont;
|
|
222
271
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
272
|
+
declare const UnstableTransformRepeaterControl: ControlComponent<() => React$1.JSX.Element>;
|
|
273
|
+
|
|
274
|
+
type TransitionProperty = {
|
|
275
|
+
label: string;
|
|
276
|
+
value: string;
|
|
277
|
+
};
|
|
278
|
+
type TransitionCategory = {
|
|
279
|
+
label: string;
|
|
280
|
+
type: 'category';
|
|
281
|
+
properties: TransitionProperty[];
|
|
229
282
|
};
|
|
230
|
-
declare const
|
|
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;
|
|
231
290
|
|
|
232
291
|
type AnyComponentType = ComponentType<any>;
|
|
233
292
|
declare const brandSymbol: unique symbol;
|
|
@@ -306,6 +365,11 @@ declare const createControlReplacementsRegistry: () => {
|
|
|
306
365
|
getControlReplacements: () => ControlReplacement[];
|
|
307
366
|
};
|
|
308
367
|
|
|
368
|
+
declare function useFloatingActionsBar(): {
|
|
369
|
+
open: boolean;
|
|
370
|
+
setOpen: React$1.Dispatch<React$1.SetStateAction<boolean>>;
|
|
371
|
+
};
|
|
372
|
+
|
|
309
373
|
type ControlAdornmentsItems = Array<{
|
|
310
374
|
id: string;
|
|
311
375
|
Adornment: ComponentType;
|
|
@@ -324,6 +388,12 @@ declare const injectIntoRepeaterItemIcon: (args: _elementor_locations.Replaceabl
|
|
|
324
388
|
declare const injectIntoRepeaterItemLabel: (args: _elementor_locations.ReplaceableInjectArgs<{
|
|
325
389
|
value: PropValue;
|
|
326
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;
|
|
327
397
|
|
|
328
398
|
type UseInternalStateOptions<TValue> = {
|
|
329
399
|
external: TValue | null;
|
|
@@ -333,4 +403,4 @@ type UseInternalStateOptions<TValue> = {
|
|
|
333
403
|
};
|
|
334
404
|
declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhen, fallback, }: UseInternalStateOptions<TValue>) => readonly [TValue, (setter: ((value: TValue) => TValue) | TValue) => void];
|
|
335
405
|
|
|
336
|
-
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 };
|