@elementor/editor-controls 3.33.0-99 → 3.35.0-325
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 +276 -85
- package/dist/index.d.ts +276 -85
- package/dist/index.js +2491 -1783
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2304 -1592
- package/dist/index.mjs.map +1 -1
- package/package.json +31 -17
- package/src/bound-prop-context/prop-context.tsx +7 -1
- package/src/bound-prop-context/use-bound-prop.ts +19 -5
- package/src/components/autocomplete.tsx +34 -3
- package/src/components/conditional-control-infotip.tsx +64 -0
- package/src/components/{unstable-repeater → control-repeater}/actions/disable-item-action.tsx +2 -2
- package/src/components/{unstable-repeater → control-repeater}/actions/duplicate-item-action.tsx +10 -4
- package/src/components/{unstable-repeater → control-repeater}/actions/remove-item-action.tsx +2 -2
- package/src/components/control-repeater/context/item-context.tsx +8 -0
- package/src/components/{unstable-repeater → control-repeater}/context/repeater-context.tsx +24 -15
- package/src/components/control-repeater/control-repeater.tsx +29 -0
- package/src/components/{unstable-repeater → control-repeater}/index.ts +1 -2
- package/src/components/{unstable-repeater → control-repeater}/items/edit-item-popover.tsx +6 -20
- package/src/components/control-repeater/items/item.tsx +75 -0
- package/src/components/{unstable-repeater → control-repeater}/items/items-container.tsx +8 -13
- package/src/components/{unstable-repeater → control-repeater}/locations.ts +0 -4
- package/src/components/{unstable-repeater → control-repeater}/types.ts +1 -2
- package/src/components/control-toggle-button-group.tsx +79 -69
- package/src/components/enable-unfiltered-modal.tsx +1 -26
- package/src/components/icon-buttons/clear-icon-button.tsx +23 -0
- package/src/components/inline-editor-toolbar.tsx +137 -0
- package/src/components/inline-editor.tsx +111 -0
- package/src/components/item-selector.tsx +10 -4
- package/src/components/{unstable-repeater/header/header.tsx → repeater/repeater-header.tsx} +4 -12
- package/src/components/repeater/repeater-popover.tsx +19 -0
- package/src/components/repeater/repeater-tag.tsx +16 -0
- package/src/components/repeater/repeater.tsx +405 -0
- package/src/components/{sortable.tsx → repeater/sortable.tsx} +1 -1
- package/src/components/size-control/size-input.tsx +20 -14
- package/src/components/size-control/text-field-inner-selection.tsx +15 -2
- package/src/control-adornments/control-adornments-context.tsx +5 -4
- package/src/control-replacements.tsx +12 -47
- package/src/controls/background-control/background-control.tsx +43 -12
- package/src/controls/background-control/background-gradient-color-control.tsx +5 -8
- package/src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx +18 -13
- package/src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx +25 -16
- package/src/controls/box-shadow-repeater-control.tsx +38 -21
- package/src/controls/color-control.tsx +3 -1
- package/src/controls/date-time-control.tsx +108 -0
- package/src/controls/filter-control/drop-shadow/drop-shadow-item-content.tsx +1 -0
- package/src/controls/filter-control/drop-shadow/drop-shadow-item-label.tsx +10 -6
- package/src/controls/filter-control/filter-content.tsx +1 -1
- package/src/controls/filter-control/filter-repeater-control.tsx +24 -21
- package/src/controls/filter-control/single-size/single-size-item-content.tsx +1 -1
- package/src/controls/filter-control/single-size/single-size-item-label.tsx +2 -1
- package/src/controls/font-family-control/font-family-control.tsx +66 -55
- package/src/controls/html-tag-control.tsx +90 -0
- package/src/controls/image-media-control.tsx +2 -2
- package/src/controls/inline-editing-control.tsx +18 -0
- package/src/controls/key-value-control.tsx +8 -2
- package/src/controls/link-control.tsx +23 -123
- package/src/controls/query-control.tsx +168 -0
- package/src/controls/repeatable-control.tsx +62 -27
- package/src/controls/select-control-wrapper.tsx +57 -0
- package/src/controls/select-control.tsx +9 -5
- package/src/controls/selection-size-control.tsx +13 -2
- package/src/controls/size-control.tsx +43 -25
- package/src/controls/svg-media-control.tsx +33 -10
- package/src/controls/text-area-control.tsx +5 -1
- package/src/controls/text-control.tsx +5 -0
- package/src/controls/toggle-control.tsx +11 -2
- package/src/controls/transform-control/functions/axis-row.tsx +1 -0
- package/src/controls/transform-control/transform-icon.tsx +2 -2
- package/src/controls/transform-control/transform-label.tsx +15 -32
- package/src/controls/transform-control/transform-repeater-control.tsx +42 -36
- package/src/controls/transform-control/{transform-base-control.tsx → transform-settings-control.tsx} +2 -2
- package/src/controls/transform-control/use-transform-tabs-history.tsx +1 -1
- package/src/controls/transition-control/data.ts +16 -1
- package/src/controls/transition-control/trainsition-events.ts +2 -2
- package/src/controls/transition-control/transition-repeater-control.tsx +137 -13
- package/src/controls/transition-control/transition-selector.tsx +37 -14
- package/src/controls/url-control.tsx +21 -16
- package/src/create-control.tsx +3 -2
- package/src/hooks/use-filtered-items-list.ts +3 -2
- package/src/hooks/use-repeatable-control-context.ts +3 -0
- package/src/hooks/use-sync-external-state.tsx +0 -1
- package/src/index.ts +21 -5
- package/src/utils/convert-toggle-options-to-atomic.tsx +33 -0
- package/src/utils/escape-html-attr.ts +11 -0
- package/src/components/css-code-editor/css-editor.styles.ts +0 -52
- package/src/components/css-code-editor/css-editor.tsx +0 -142
- package/src/components/css-code-editor/css-validation.ts +0 -75
- package/src/components/css-code-editor/resize-handle.tsx +0 -55
- package/src/components/css-code-editor/visual-content-change-protection.ts +0 -69
- package/src/components/repeater.tsx +0 -343
- package/src/components/unstable-repeater/items/item.tsx +0 -77
- package/src/components/unstable-repeater/unstable-repeater.tsx +0 -26
- /package/src/components/{unstable-repeater → control-repeater}/actions/tooltip-add-item-action.tsx +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import { RefObject, ReactNode, FC, PropsWithChildren, ComponentType } from 'react';
|
|
3
|
-
import { SxProps, UnstableColorFieldProps, ToggleButtonProps, StackProps, PopupState, FormLabelProps } from '@elementor/ui';
|
|
4
|
-
import { StringPropValue, PropTypeUtil, PropValue, PropKey, SizePropValue, PropType, CreateOptions } from '@elementor/editor-props';
|
|
2
|
+
import { RefObject, ReactNode, FC, PropsWithChildren, ReactElement, ComponentType } from 'react';
|
|
3
|
+
import { SxProps, SelectProps, UnstableColorFieldProps, ToggleButtonProps, StackProps, PopupState, Theme, FormLabelProps, Grid } from '@elementor/ui';
|
|
4
|
+
import { StringPropValue, PropTypeUtil, PropValue, PropKey, SizePropValue, LinkPropValue, TransformablePropValue, PropType, CreateOptions } from '@elementor/editor-props';
|
|
5
5
|
import { StyleDefinitionState } from '@elementor/editor-styles';
|
|
6
|
+
import { Editor } from '@tiptap/react';
|
|
6
7
|
import * as _elementor_locations from '@elementor/locations';
|
|
7
8
|
|
|
8
9
|
type ImageControlProps = {
|
|
@@ -12,21 +13,23 @@ type ImageControlProps = {
|
|
|
12
13
|
}[];
|
|
13
14
|
showMode?: 'all' | 'media' | 'sizes';
|
|
14
15
|
};
|
|
15
|
-
declare const ImageControl: ControlComponent<({ sizes, showMode }: ImageControlProps) => React$1.JSX.Element>;
|
|
16
|
+
declare const ImageControl: ControlComponent$1<({ sizes, showMode }: ImageControlProps) => React$1.JSX.Element>;
|
|
16
17
|
|
|
17
|
-
declare const TextControl: ControlComponent<({ placeholder, error, inputValue, inputDisabled, helperText, sx, }: {
|
|
18
|
+
declare const TextControl: ControlComponent$1<({ placeholder, error, inputValue, inputDisabled, helperText, sx, ariaLabel, }: {
|
|
18
19
|
placeholder?: string;
|
|
19
20
|
error?: boolean;
|
|
20
21
|
inputValue?: string;
|
|
21
22
|
inputDisabled?: boolean;
|
|
22
23
|
helperText?: string;
|
|
23
24
|
sx?: SxProps;
|
|
25
|
+
ariaLabel?: string;
|
|
24
26
|
}) => React$1.JSX.Element>;
|
|
25
27
|
|
|
26
|
-
type Props$
|
|
28
|
+
type Props$7 = {
|
|
27
29
|
placeholder?: string;
|
|
30
|
+
ariaLabel?: string;
|
|
28
31
|
};
|
|
29
|
-
declare const TextAreaControl: ControlComponent<({ placeholder }: Props$
|
|
32
|
+
declare const TextAreaControl: ControlComponent$1<({ placeholder, ariaLabel }: Props$7) => React$1.JSX.Element>;
|
|
30
33
|
|
|
31
34
|
declare const lengthUnits: readonly ["px", "%", "em", "rem", "vw", "vh"];
|
|
32
35
|
declare const angleUnits: readonly ["deg", "rad", "grad", "turn"];
|
|
@@ -52,6 +55,8 @@ type BaseSizeControlProps = {
|
|
|
52
55
|
min?: number;
|
|
53
56
|
enablePropTypeUnits?: boolean;
|
|
54
57
|
id?: string;
|
|
58
|
+
ariaLabel?: string;
|
|
59
|
+
isRepeaterControl?: boolean;
|
|
55
60
|
};
|
|
56
61
|
type LengthSizeControlProps = BaseSizeControlProps & UnitProps<LengthUnit[]> & {
|
|
57
62
|
variant: 'length';
|
|
@@ -63,35 +68,46 @@ type TimeSizeControlProps = BaseSizeControlProps & UnitProps<TimeUnit[]> & {
|
|
|
63
68
|
variant: 'time';
|
|
64
69
|
};
|
|
65
70
|
type SizeControlProps = LengthSizeControlProps | AngleSizeControlProps | TimeSizeControlProps;
|
|
66
|
-
declare const SizeControl: ControlComponent<({ variant, defaultUnit, units, placeholder, startIcon, anchorRef, extendedOptions, disableCustom, min, enablePropTypeUnits, id, }: Omit<SizeControlProps, "variant"> & {
|
|
71
|
+
declare const SizeControl: ControlComponent$1<({ variant, defaultUnit, units, placeholder, startIcon, anchorRef, extendedOptions, disableCustom, min, enablePropTypeUnits, id, ariaLabel, isRepeaterControl, }: Omit<SizeControlProps, "variant"> & {
|
|
67
72
|
variant?: SizeVariant;
|
|
68
73
|
}) => React$1.JSX.Element>;
|
|
69
74
|
|
|
70
|
-
declare const StrokeControl: ControlComponent<() => React$1.JSX.Element>;
|
|
75
|
+
declare const StrokeControl: ControlComponent$1<() => React$1.JSX.Element>;
|
|
71
76
|
|
|
72
|
-
declare const BoxShadowRepeaterControl: ControlComponent<() => React$1.JSX.Element>;
|
|
77
|
+
declare const BoxShadowRepeaterControl: ControlComponent$1<() => React$1.JSX.Element>;
|
|
73
78
|
|
|
74
79
|
type FilterPropName = {
|
|
75
80
|
filterPropName?: 'filter' | 'backdrop-filter';
|
|
76
81
|
};
|
|
77
|
-
declare const FilterRepeaterControl: ControlComponent<({ filterPropName }: FilterPropName) => React$1.JSX.Element>;
|
|
82
|
+
declare const FilterRepeaterControl: ControlComponent$1<({ filterPropName }: FilterPropName) => React$1.JSX.Element>;
|
|
78
83
|
|
|
79
|
-
type SelectOption = {
|
|
84
|
+
type SelectOption$1 = {
|
|
80
85
|
label: string;
|
|
81
86
|
value: StringPropValue['value'];
|
|
82
87
|
disabled?: boolean;
|
|
83
88
|
};
|
|
84
|
-
type
|
|
85
|
-
options: SelectOption[];
|
|
89
|
+
type SelectControlProps = {
|
|
90
|
+
options: SelectOption$1[];
|
|
86
91
|
onChange?: (newValue: string | null, previousValue: string | null | undefined) => void;
|
|
92
|
+
MenuProps?: SelectProps['MenuProps'];
|
|
93
|
+
ariaLabel?: string;
|
|
94
|
+
};
|
|
95
|
+
declare const SelectControl: ControlComponent$1<({ options, onChange, MenuProps, ariaLabel }: SelectControlProps) => React$1.JSX.Element>;
|
|
96
|
+
|
|
97
|
+
declare const collectionMethods: {
|
|
98
|
+
readonly 'off-canvas': () => SelectOption$1[];
|
|
87
99
|
};
|
|
88
|
-
|
|
100
|
+
type SelectControlWrapperProps = Parameters<typeof SelectControl>[0] & {
|
|
101
|
+
collectionId?: keyof typeof collectionMethods;
|
|
102
|
+
};
|
|
103
|
+
declare const SelectControlWrapper: ControlComponent$1<({ collectionId, options, ...props }: SelectControlWrapperProps) => React$1.JSX.Element>;
|
|
89
104
|
|
|
90
|
-
type Props$
|
|
105
|
+
type Props$6 = Partial<Omit<UnstableColorFieldProps, 'value' | 'onChange'>> & {
|
|
91
106
|
propTypeUtil?: PropTypeUtil<string, string>;
|
|
92
107
|
anchorEl?: HTMLElement | null;
|
|
108
|
+
id?: string;
|
|
93
109
|
};
|
|
94
|
-
declare const ColorControl: ControlComponent<({ propTypeUtil, anchorEl, slotProps, ...props }: Props$
|
|
110
|
+
declare const ColorControl: ControlComponent$1<({ propTypeUtil, anchorEl, slotProps, id, ...props }: Props$6) => React$1.JSX.Element>;
|
|
95
111
|
|
|
96
112
|
type RenderContentProps = {
|
|
97
113
|
size: ToggleButtonProps['size'];
|
|
@@ -104,7 +120,7 @@ type ToggleButtonGroupItem<TValue> = {
|
|
|
104
120
|
};
|
|
105
121
|
type ExclusiveValue<TValue> = TValue;
|
|
106
122
|
type NonExclusiveValue<TValue> = TValue[];
|
|
107
|
-
type Props$
|
|
123
|
+
type Props$5<TValue> = {
|
|
108
124
|
disabled?: boolean;
|
|
109
125
|
justify?: StackProps['justifyContent'];
|
|
110
126
|
size?: ToggleButtonProps['size'];
|
|
@@ -121,7 +137,10 @@ type Props$3<TValue> = {
|
|
|
121
137
|
value: ExclusiveValue<TValue>;
|
|
122
138
|
onChange: (value: ExclusiveValue<TValue>) => void;
|
|
123
139
|
});
|
|
124
|
-
declare const
|
|
140
|
+
declare const ToggleButtonGroupUi: <TValue>(props: Props$5<TValue> & {
|
|
141
|
+
ref?: React$1.Ref<HTMLDivElement>;
|
|
142
|
+
}) => React$1.ReactElement;
|
|
143
|
+
declare const ControlToggleButtonGroup: <TValue>(props: Props$5<TValue>) => React$1.JSX.Element;
|
|
125
144
|
|
|
126
145
|
type ToggleControlProps<T extends PropValue> = {
|
|
127
146
|
options: Array<ToggleButtonGroupItem<T> & {
|
|
@@ -131,10 +150,11 @@ type ToggleControlProps<T extends PropValue> = {
|
|
|
131
150
|
size?: ToggleButtonProps['size'];
|
|
132
151
|
exclusive?: boolean;
|
|
133
152
|
maxItems?: number;
|
|
153
|
+
convertOptions?: boolean;
|
|
134
154
|
};
|
|
135
|
-
declare const ToggleControl: ControlComponent<({ options, fullWidth, size, exclusive, maxItems, }: ToggleControlProps<StringPropValue["value"]>) => React$1.JSX.Element>;
|
|
155
|
+
declare const ToggleControl: ControlComponent$1<({ options, fullWidth, size, exclusive, maxItems, convertOptions, }: ToggleControlProps<StringPropValue["value"]>) => React$1.JSX.Element>;
|
|
136
156
|
|
|
137
|
-
declare const NumberControl: ControlComponent<({ placeholder: labelPlaceholder, max, min, step, shouldForceInt, startIcon, }: {
|
|
157
|
+
declare const NumberControl: ControlComponent$1<({ placeholder: labelPlaceholder, max, min, step, shouldForceInt, startIcon, }: {
|
|
138
158
|
placeholder?: string;
|
|
139
159
|
max?: number;
|
|
140
160
|
min?: number;
|
|
@@ -144,20 +164,20 @@ declare const NumberControl: ControlComponent<({ placeholder: labelPlaceholder,
|
|
|
144
164
|
}) => React$1.JSX.Element>;
|
|
145
165
|
|
|
146
166
|
type MultiSizePropValue = Record<PropKey, SizePropValue>;
|
|
147
|
-
type Item = {
|
|
167
|
+
type Item$1 = {
|
|
148
168
|
icon: ReactNode;
|
|
149
169
|
label: string;
|
|
150
170
|
bind: PropKey;
|
|
151
171
|
};
|
|
152
|
-
type EqualUnequalItems = [Item, Item, Item, Item];
|
|
153
|
-
type Props$
|
|
172
|
+
type EqualUnequalItems = [Item$1, Item$1, Item$1, Item$1];
|
|
173
|
+
type Props$4<TMultiPropType extends string, TPropValue extends MultiSizePropValue> = {
|
|
154
174
|
label: string;
|
|
155
175
|
icon: ReactNode;
|
|
156
176
|
tooltipLabel: string;
|
|
157
177
|
items: EqualUnequalItems;
|
|
158
178
|
multiSizePropTypeUtil: PropTypeUtil<TMultiPropType, TPropValue>;
|
|
159
179
|
};
|
|
160
|
-
declare function EqualUnequalSizesControl<TMultiPropType extends string, TPropValue extends MultiSizePropValue>({ label, icon, tooltipLabel, items, multiSizePropTypeUtil, }: Props$
|
|
180
|
+
declare function EqualUnequalSizesControl<TMultiPropType extends string, TPropValue extends MultiSizePropValue>({ label, icon, tooltipLabel, items, multiSizePropTypeUtil, }: Props$4<TMultiPropType, TPropValue>): React$1.JSX.Element;
|
|
161
181
|
|
|
162
182
|
declare const LinkedDimensionsControl: ({ label, isSiteRtl, extendedOptions, min, }: {
|
|
163
183
|
label: string;
|
|
@@ -173,12 +193,14 @@ type FontCategory = {
|
|
|
173
193
|
type FontFamilyControlProps = {
|
|
174
194
|
fontFamilies: FontCategory[];
|
|
175
195
|
sectionWidth: number;
|
|
196
|
+
ariaLabel?: string;
|
|
176
197
|
};
|
|
177
|
-
declare const FontFamilyControl: ControlComponent<({ fontFamilies, sectionWidth }: FontFamilyControlProps) => React$1.JSX.Element>;
|
|
198
|
+
declare const FontFamilyControl: ControlComponent$1<({ fontFamilies, sectionWidth, ariaLabel }: FontFamilyControlProps) => React$1.JSX.Element>;
|
|
178
199
|
|
|
179
200
|
type SelectableItem = {
|
|
180
201
|
type: 'item' | 'category';
|
|
181
202
|
value: string;
|
|
203
|
+
disabled?: boolean;
|
|
182
204
|
};
|
|
183
205
|
|
|
184
206
|
type Category = {
|
|
@@ -197,11 +219,14 @@ type ItemSelectorProps = {
|
|
|
197
219
|
icon: React$1.ElementType<{
|
|
198
220
|
fontSize: string;
|
|
199
221
|
}>;
|
|
222
|
+
disabledItems?: string[];
|
|
223
|
+
id?: string;
|
|
200
224
|
};
|
|
201
|
-
declare const ItemSelector: ({ itemsList, selectedItem, onItemChange, onClose, sectionWidth, title, itemStyle, onDebounce, icon, }: ItemSelectorProps) => React$1.JSX.Element;
|
|
225
|
+
declare const ItemSelector: ({ itemsList, selectedItem, onItemChange, onClose, sectionWidth, title, itemStyle, onDebounce, icon, disabledItems, id, }: ItemSelectorProps) => React$1.JSX.Element;
|
|
202
226
|
|
|
203
|
-
declare const UrlControl: ControlComponent<({ placeholder }: {
|
|
227
|
+
declare const UrlControl: ControlComponent$1<({ placeholder, ariaLabel }: {
|
|
204
228
|
placeholder?: string;
|
|
229
|
+
ariaLabel?: string;
|
|
205
230
|
}) => React$1.JSX.Element>;
|
|
206
231
|
|
|
207
232
|
type ControlProps<TControlProps = unknown> = TControlProps & {
|
|
@@ -210,31 +235,58 @@ type ControlProps<TControlProps = unknown> = TControlProps & {
|
|
|
210
235
|
};
|
|
211
236
|
};
|
|
212
237
|
|
|
213
|
-
type Props$
|
|
238
|
+
type Props$3 = ControlProps<{
|
|
214
239
|
queryOptions: {
|
|
215
|
-
|
|
216
|
-
|
|
240
|
+
params: Record<string, unknown>;
|
|
241
|
+
url: string;
|
|
217
242
|
};
|
|
218
243
|
allowCustomValues?: boolean;
|
|
219
244
|
minInputLength?: number;
|
|
220
245
|
placeholder?: string;
|
|
221
246
|
label?: string;
|
|
247
|
+
ariaLabel?: string;
|
|
222
248
|
}>;
|
|
223
|
-
|
|
249
|
+
type DestinationProp = LinkPropValue['value']['destination'];
|
|
250
|
+
declare const LinkControl: ControlComponent$1<(props: Props$3) => React$1.JSX.Element>;
|
|
251
|
+
|
|
252
|
+
type SelectOption = {
|
|
253
|
+
label: string;
|
|
254
|
+
value: StringPropValue['value'];
|
|
255
|
+
disabled?: boolean;
|
|
256
|
+
};
|
|
257
|
+
type Props$2 = {
|
|
258
|
+
options: SelectOption[];
|
|
259
|
+
onChange?: (newValue: string | null, previousValue: string | null | undefined) => void;
|
|
260
|
+
fallbackLabels?: Record<string, string>;
|
|
261
|
+
};
|
|
262
|
+
declare const HtmlTagControl: ControlComponent$1<({ options, onChange, fallbackLabels }: Props$2) => React$1.JSX.Element>;
|
|
263
|
+
|
|
264
|
+
type Props$1 = {
|
|
265
|
+
queryOptions: {
|
|
266
|
+
params: Record<string, unknown>;
|
|
267
|
+
url: string;
|
|
268
|
+
};
|
|
269
|
+
allowCustomValues?: boolean;
|
|
270
|
+
minInputLength?: number;
|
|
271
|
+
placeholder?: string;
|
|
272
|
+
onSetValue?: (value: DestinationProp | null) => void;
|
|
273
|
+
ariaLabel?: string;
|
|
274
|
+
};
|
|
275
|
+
declare const QueryControl: ControlComponent$1<(props: Props$1) => React$1.JSX.Element>;
|
|
224
276
|
|
|
225
277
|
declare const GapControl: ({ label }: {
|
|
226
278
|
label: string;
|
|
227
279
|
}) => React$1.JSX.Element;
|
|
228
280
|
|
|
229
|
-
declare const AspectRatioControl: ControlComponent<({ label }: {
|
|
281
|
+
declare const AspectRatioControl: ControlComponent$1<({ label }: {
|
|
230
282
|
label: string;
|
|
231
283
|
}) => React$1.JSX.Element>;
|
|
232
284
|
|
|
233
|
-
declare const SvgMediaControl: ControlComponent<() => React$1.JSX.Element>;
|
|
285
|
+
declare const SvgMediaControl: ControlComponent$1<() => React$1.JSX.Element>;
|
|
234
286
|
|
|
235
|
-
declare const BackgroundControl: ControlComponent<() => React$1.JSX.Element>;
|
|
287
|
+
declare const BackgroundControl: ControlComponent$1<() => React$1.JSX.Element>;
|
|
236
288
|
|
|
237
|
-
declare const SwitchControl: ControlComponent<() => React$1.JSX.Element>;
|
|
289
|
+
declare const SwitchControl: ControlComponent$1<() => React$1.JSX.Element>;
|
|
238
290
|
|
|
239
291
|
type TooltipAddItemActionProps = {
|
|
240
292
|
disabled?: boolean;
|
|
@@ -244,11 +296,17 @@ type TooltipAddItemActionProps = {
|
|
|
244
296
|
ariaLabel?: string;
|
|
245
297
|
};
|
|
246
298
|
|
|
299
|
+
type Item<T> = {
|
|
300
|
+
disabled?: boolean;
|
|
301
|
+
} & T;
|
|
302
|
+
type RepeatablePropValue = TransformablePropValue<PropKey, PropValue>;
|
|
303
|
+
|
|
247
304
|
type ChildControlConfig = {
|
|
248
305
|
component: React.ComponentType;
|
|
249
306
|
props?: Record<string, unknown>;
|
|
250
307
|
propTypeUtil: PropTypeUtil<string, any>;
|
|
251
308
|
label?: string;
|
|
309
|
+
isItemDisabled?: (item: Item<RepeatablePropValue>) => boolean;
|
|
252
310
|
};
|
|
253
311
|
|
|
254
312
|
type RepeatableControlProps = {
|
|
@@ -263,7 +321,7 @@ type RepeatableControlProps = {
|
|
|
263
321
|
propKey?: string;
|
|
264
322
|
addItemTooltipProps?: TooltipAddItemActionProps;
|
|
265
323
|
};
|
|
266
|
-
declare const RepeatableControl: ControlComponent<({ repeaterLabel, childControlConfig, showDuplicate, showToggle, initialValues, patternLabel, placeholder, propKey, addItemTooltipProps, }: RepeatableControlProps) => React$1.JSX.Element | null>;
|
|
324
|
+
declare const RepeatableControl: ControlComponent$1<({ repeaterLabel, childControlConfig, showDuplicate, showToggle, initialValues, patternLabel, placeholder, propKey, addItemTooltipProps, }: RepeatableControlProps) => React$1.JSX.Element | null>;
|
|
267
325
|
|
|
268
326
|
type KeyValueControlProps = {
|
|
269
327
|
keyName?: string;
|
|
@@ -271,23 +329,24 @@ type KeyValueControlProps = {
|
|
|
271
329
|
regexKey?: string;
|
|
272
330
|
regexValue?: string;
|
|
273
331
|
validationErrorMessage?: string;
|
|
332
|
+
escapeHtml?: boolean;
|
|
274
333
|
getHelperText?: (key: string, value: string) => {
|
|
275
334
|
keyHelper?: string;
|
|
276
335
|
valueHelper?: string;
|
|
277
336
|
};
|
|
278
337
|
};
|
|
279
|
-
declare const KeyValueControl: ControlComponent<(props?: KeyValueControlProps) => React$1.JSX.Element>;
|
|
338
|
+
declare const KeyValueControl: ControlComponent$1<(props?: KeyValueControlProps) => React$1.JSX.Element>;
|
|
280
339
|
|
|
281
340
|
declare const PositionControl: () => React$1.JSX.Element;
|
|
282
341
|
|
|
283
|
-
declare const TransformRepeaterControl: ControlComponent<() => React$1.JSX.Element>;
|
|
342
|
+
declare const TransformRepeaterControl: ControlComponent$1<() => React$1.JSX.Element>;
|
|
284
343
|
|
|
285
|
-
declare const
|
|
344
|
+
declare const TransformSettingsControl: ({ popupState, anchorRef, }: {
|
|
286
345
|
popupState: PopupState;
|
|
287
346
|
anchorRef: React$1.RefObject<HTMLDivElement | null>;
|
|
288
347
|
}) => React$1.JSX.Element;
|
|
289
348
|
|
|
290
|
-
declare const TransitionRepeaterControl: ControlComponent<({ recentlyUsedListGetter, currentStyleState, }: {
|
|
349
|
+
declare const TransitionRepeaterControl: ControlComponent$1<({ recentlyUsedListGetter, currentStyleState, }: {
|
|
291
350
|
recentlyUsedListGetter: () => Promise<string[]>;
|
|
292
351
|
currentStyleState: StyleDefinitionState;
|
|
293
352
|
}) => React$1.JSX.Element>;
|
|
@@ -301,6 +360,7 @@ type TransitionProperty = {
|
|
|
301
360
|
label: string;
|
|
302
361
|
value: string;
|
|
303
362
|
unavailable?: boolean;
|
|
363
|
+
isDisabled?: boolean;
|
|
304
364
|
};
|
|
305
365
|
type TransitionCategory = {
|
|
306
366
|
label: string;
|
|
@@ -313,35 +373,44 @@ declare const transitionsItemsList: {
|
|
|
313
373
|
items: string[];
|
|
314
374
|
}[];
|
|
315
375
|
|
|
316
|
-
declare const
|
|
376
|
+
declare const DateTimeControl: ControlComponent$1<({ inputDisabled }: {
|
|
377
|
+
inputDisabled?: boolean;
|
|
378
|
+
}) => React$1.JSX.Element>;
|
|
379
|
+
|
|
380
|
+
declare const InlineEditingControl: ControlComponent$1<() => React$1.JSX.Element>;
|
|
317
381
|
|
|
318
|
-
type
|
|
382
|
+
type InlineEditorProps = {
|
|
319
383
|
value: string;
|
|
320
|
-
|
|
384
|
+
setValue: (value: string) => void;
|
|
385
|
+
attributes?: Record<string, string>;
|
|
386
|
+
sx?: SxProps<Theme>;
|
|
387
|
+
showToolbar?: boolean;
|
|
321
388
|
};
|
|
322
|
-
declare const
|
|
389
|
+
declare const InlineEditor: React$1.ForwardRefExoticComponent<InlineEditorProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
323
390
|
|
|
324
|
-
type
|
|
325
|
-
|
|
326
|
-
type ControlComponent<TComponent extends AnyComponentType = AnyComponentType> = TComponent & {
|
|
327
|
-
[brandSymbol]: true;
|
|
391
|
+
type InlineEditorToolbarProps = {
|
|
392
|
+
editor: Editor;
|
|
328
393
|
};
|
|
329
|
-
declare
|
|
394
|
+
declare const InlineEditorToolbar: ({ editor }: InlineEditorToolbarProps) => React$1.JSX.Element;
|
|
330
395
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
396
|
+
declare const ControlFormLabel: (props: FormLabelProps) => React$1.JSX.Element;
|
|
397
|
+
|
|
398
|
+
type ClearIconButtonProps = {
|
|
399
|
+
onClick?: () => void;
|
|
400
|
+
tooltipText: React$1.ReactNode;
|
|
401
|
+
disabled?: boolean;
|
|
402
|
+
size?: 'tiny' | 'small' | 'medium' | 'large';
|
|
337
403
|
};
|
|
338
|
-
|
|
339
|
-
declare const ControlActionsProvider: ({ children, items }: ControlActionsProviderProps) => React$1.JSX.Element;
|
|
340
|
-
declare const useControlActions: () => ControlActionsContext;
|
|
404
|
+
declare const ClearIconButton: ({ tooltipText, onClick, disabled, size }: ClearIconButtonProps) => React$1.JSX.Element;
|
|
341
405
|
|
|
342
|
-
type
|
|
406
|
+
type Action = {
|
|
407
|
+
type: string;
|
|
408
|
+
payload?: object;
|
|
409
|
+
};
|
|
410
|
+
type SetValueMeta<TAction = Action> = {
|
|
343
411
|
bind?: PropKey;
|
|
344
412
|
validation?: (value: PropValue) => boolean;
|
|
413
|
+
action?: TAction;
|
|
345
414
|
};
|
|
346
415
|
type SetValue<T> = (value: T, options?: CreateOptions, meta?: SetValueMeta) => void;
|
|
347
416
|
type PropContext<T extends PropValue, P extends PropType> = {
|
|
@@ -378,48 +447,173 @@ type UseBoundProp<TValue extends PropValue> = {
|
|
|
378
447
|
placeholder?: TValue;
|
|
379
448
|
path: PropKey[];
|
|
380
449
|
restoreValue: () => void;
|
|
450
|
+
resetValue: () => void;
|
|
381
451
|
isDisabled?: (propType: PropType) => boolean | undefined;
|
|
382
452
|
disabled?: boolean;
|
|
383
453
|
};
|
|
384
|
-
|
|
454
|
+
type EnhancedPropKeyContextValue<T, P> = PropKeyContextValue<T, P> & {
|
|
455
|
+
resetValue: () => void;
|
|
456
|
+
};
|
|
457
|
+
declare function useBoundProp<T extends PropValue = PropValue, P extends PropType = PropType>(): EnhancedPropKeyContextValue<T, P>;
|
|
385
458
|
declare function useBoundProp<TKey extends string, TValue extends PropValue>(propTypeUtil: PropTypeUtil<TKey, TValue>): UseBoundProp<TValue>;
|
|
386
459
|
|
|
387
|
-
type
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
};
|
|
391
|
-
type
|
|
392
|
-
|
|
460
|
+
type AnchorEl = HTMLElement | null;
|
|
461
|
+
type RepeaterItem<T> = {
|
|
462
|
+
disabled?: boolean;
|
|
463
|
+
} & T;
|
|
464
|
+
type RepeaterItemContentProps<T> = {
|
|
465
|
+
anchorEl: AnchorEl;
|
|
466
|
+
bind: PropKey;
|
|
467
|
+
value: T;
|
|
468
|
+
index: number;
|
|
393
469
|
};
|
|
394
|
-
type
|
|
395
|
-
|
|
470
|
+
type RepeaterItemContent<T> = React$1.ComponentType<RepeaterItemContentProps<T>>;
|
|
471
|
+
type ItemsActionPayload<T> = Array<{
|
|
472
|
+
index: number;
|
|
473
|
+
item: T;
|
|
396
474
|
}>;
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
475
|
+
type AddItemMeta<T> = {
|
|
476
|
+
type: 'add';
|
|
477
|
+
payload: ItemsActionPayload<T>;
|
|
478
|
+
};
|
|
479
|
+
type RemoveItemMeta<T> = {
|
|
480
|
+
type: 'remove';
|
|
481
|
+
payload: ItemsActionPayload<T>;
|
|
482
|
+
};
|
|
483
|
+
type DuplicateItemMeta<T> = {
|
|
484
|
+
type: 'duplicate';
|
|
485
|
+
payload: ItemsActionPayload<T>;
|
|
486
|
+
};
|
|
487
|
+
type ReorderItemMeta = {
|
|
488
|
+
type: 'reorder';
|
|
489
|
+
payload: {
|
|
490
|
+
from: number;
|
|
491
|
+
to: number;
|
|
492
|
+
};
|
|
493
|
+
};
|
|
494
|
+
type ToggleDisableItemMeta = {
|
|
495
|
+
type: 'toggle-disable';
|
|
496
|
+
};
|
|
497
|
+
type SetRepeaterValuesMeta<T> = SetValueMeta<AddItemMeta<T>> | SetValueMeta<RemoveItemMeta<T>> | SetValueMeta<DuplicateItemMeta<T>> | SetValueMeta<ReorderItemMeta> | SetValueMeta<ToggleDisableItemMeta>;
|
|
498
|
+
type BaseItemSettings<T> = {
|
|
499
|
+
initialValues: T;
|
|
500
|
+
Label: React$1.ComponentType<{
|
|
501
|
+
value: T;
|
|
502
|
+
index: number;
|
|
503
|
+
}>;
|
|
504
|
+
Icon: React$1.ComponentType<{
|
|
505
|
+
value: T;
|
|
506
|
+
}>;
|
|
507
|
+
Content: RepeaterItemContent<T>;
|
|
508
|
+
actions?: (value: T) => React$1.ReactNode;
|
|
509
|
+
};
|
|
510
|
+
type SortableItemSettings<T> = BaseItemSettings<T> & {
|
|
511
|
+
getId: ({ item, index }: {
|
|
512
|
+
item: T;
|
|
513
|
+
index: number;
|
|
514
|
+
}) => string;
|
|
515
|
+
};
|
|
516
|
+
type RepeaterProps<T> = {
|
|
517
|
+
label: string;
|
|
518
|
+
values?: T[];
|
|
519
|
+
openOnAdd?: boolean;
|
|
520
|
+
setValues: (newValue: T[], _: CreateOptions, meta?: SetRepeaterValuesMeta<T>) => void;
|
|
521
|
+
disabled?: boolean;
|
|
522
|
+
disableAddItemButton?: boolean;
|
|
523
|
+
addButtonInfotipContent?: React$1.ReactNode;
|
|
524
|
+
showDuplicate?: boolean;
|
|
525
|
+
showToggle?: boolean;
|
|
526
|
+
showRemove?: boolean;
|
|
527
|
+
openItem?: number;
|
|
528
|
+
isSortable: false;
|
|
529
|
+
itemSettings: BaseItemSettings<T>;
|
|
530
|
+
} | {
|
|
531
|
+
label: string;
|
|
532
|
+
values?: T[];
|
|
533
|
+
openOnAdd?: boolean;
|
|
534
|
+
setValues: (newValue: T[], _: CreateOptions, meta?: SetRepeaterValuesMeta<T>) => void;
|
|
535
|
+
disabled?: boolean;
|
|
536
|
+
disableAddItemButton?: boolean;
|
|
537
|
+
addButtonInfotipContent?: React$1.ReactNode;
|
|
538
|
+
showDuplicate?: boolean;
|
|
539
|
+
showToggle?: boolean;
|
|
540
|
+
showRemove?: boolean;
|
|
541
|
+
openItem?: number;
|
|
542
|
+
isSortable?: true;
|
|
543
|
+
itemSettings: SortableItemSettings<T>;
|
|
401
544
|
};
|
|
545
|
+
declare const Repeater: <T>({ label, itemSettings, disabled, openOnAdd, values: items, setValues: setItems, showDuplicate, showToggle, showRemove, disableAddItemButton, addButtonInfotipContent, openItem: initialOpenItem, isSortable, }: RepeaterProps<RepeaterItem<T>>) => React$1.JSX.Element;
|
|
402
546
|
|
|
547
|
+
declare function FloatingActionsBar({ actions, children }: PropsWithChildren<{
|
|
548
|
+
actions: ReactElement[];
|
|
549
|
+
}>): React$1.JSX.Element;
|
|
403
550
|
declare function useFloatingActionsBar(): {
|
|
404
551
|
open: boolean;
|
|
405
552
|
setOpen: React$1.Dispatch<React$1.SetStateAction<boolean>>;
|
|
406
553
|
};
|
|
407
554
|
|
|
408
|
-
|
|
555
|
+
declare const PopoverGridContainer: React$1.ForwardRefExoticComponent<{
|
|
556
|
+
gap?: number;
|
|
557
|
+
alignItems?: React$1.ComponentProps<typeof Grid>["alignItems"];
|
|
558
|
+
flexWrap?: React$1.ComponentProps<typeof Grid>["flexWrap"];
|
|
559
|
+
} & {
|
|
560
|
+
children?: React$1.ReactNode | undefined;
|
|
561
|
+
} & React$1.RefAttributes<unknown>>;
|
|
562
|
+
|
|
563
|
+
type AnyComponentType = ComponentType<any>;
|
|
564
|
+
declare const brandSymbol: unique symbol;
|
|
565
|
+
type ControlComponent$1<TComponent extends AnyComponentType = AnyComponentType> = TComponent & {
|
|
566
|
+
[brandSymbol]: true;
|
|
567
|
+
};
|
|
568
|
+
declare function createControl<T extends AnyComponentType>(Control: T): ControlComponent$1<T>;
|
|
569
|
+
|
|
570
|
+
type ControlActionsItems = Array<{
|
|
409
571
|
id: string;
|
|
410
|
-
|
|
411
|
-
customContext?: {
|
|
412
|
-
path: string[];
|
|
413
|
-
propType: PropType;
|
|
414
|
-
};
|
|
415
|
-
}>;
|
|
572
|
+
MenuItem: React$1.ComponentType;
|
|
416
573
|
}>;
|
|
574
|
+
type ControlActionsContext = {
|
|
575
|
+
items: ControlActionsItems;
|
|
576
|
+
};
|
|
577
|
+
type ControlActionsProviderProps = PropsWithChildren<ControlActionsContext>;
|
|
578
|
+
declare const ControlActionsProvider: ({ children, items }: ControlActionsProviderProps) => React$1.JSX.Element;
|
|
579
|
+
declare const useControlActions: () => ControlActionsContext;
|
|
580
|
+
|
|
581
|
+
type AdornmentComponent = ComponentType<{
|
|
582
|
+
customContext?: {
|
|
583
|
+
path: string[];
|
|
584
|
+
propType: PropType;
|
|
585
|
+
};
|
|
586
|
+
}>;
|
|
587
|
+
type ControlAdornmentsItem = {
|
|
588
|
+
id: string;
|
|
589
|
+
Adornment: AdornmentComponent;
|
|
590
|
+
};
|
|
417
591
|
type ControlAdornmentsContext = {
|
|
418
|
-
items?:
|
|
592
|
+
items?: ControlAdornmentsItem[];
|
|
419
593
|
};
|
|
420
594
|
type ControlAdornmentsProviderProps = PropsWithChildren<ControlAdornmentsContext>;
|
|
421
595
|
declare const ControlAdornmentsProvider: ({ children, items }: ControlAdornmentsProviderProps) => React$1.JSX.Element;
|
|
422
596
|
|
|
597
|
+
type ControlComponent = ComponentType<object & {
|
|
598
|
+
OriginalControl: ComponentType;
|
|
599
|
+
}>;
|
|
600
|
+
type ControlReplacement = {
|
|
601
|
+
component: ControlComponent;
|
|
602
|
+
condition: ({ value }: ConditionArgs) => boolean;
|
|
603
|
+
};
|
|
604
|
+
type ConditionArgs = {
|
|
605
|
+
value: PropValue;
|
|
606
|
+
placeholder?: PropValue;
|
|
607
|
+
};
|
|
608
|
+
type Props = PropsWithChildren<{
|
|
609
|
+
replacements: ControlReplacement[];
|
|
610
|
+
}>;
|
|
611
|
+
declare const ControlReplacementsProvider: ({ replacements, children }: Props) => React$1.JSX.Element;
|
|
612
|
+
declare const createControlReplacementsRegistry: () => {
|
|
613
|
+
registerControlReplacement: (replacement: ControlReplacement) => void;
|
|
614
|
+
getControlReplacements: () => ControlReplacement[];
|
|
615
|
+
};
|
|
616
|
+
|
|
423
617
|
declare function ControlAdornments({ customContext, }: {
|
|
424
618
|
customContext?: {
|
|
425
619
|
path: string[];
|
|
@@ -433,9 +627,6 @@ declare const injectIntoRepeaterItemIcon: (args: _elementor_locations.Replaceabl
|
|
|
433
627
|
declare const injectIntoRepeaterItemLabel: (args: _elementor_locations.ReplaceableInjectArgs<{
|
|
434
628
|
value: PropValue;
|
|
435
629
|
}>) => void;
|
|
436
|
-
declare const injectIntoRepeaterHeaderActions: (args: _elementor_locations.InjectArgs<{
|
|
437
|
-
value: PropValue;
|
|
438
|
-
}>) => void;
|
|
439
630
|
declare const injectIntoRepeaterItemActions: (args: _elementor_locations.InjectArgs<{
|
|
440
631
|
index: number;
|
|
441
632
|
}>) => void;
|
|
@@ -448,4 +639,4 @@ type UseInternalStateOptions<TValue> = {
|
|
|
448
639
|
};
|
|
449
640
|
declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhen, fallback, }: UseInternalStateOptions<TValue>) => readonly [TValue, (setter: ((value: TValue) => TValue) | TValue, options?: CreateOptions, meta?: SetValueMeta) => void];
|
|
450
641
|
|
|
451
|
-
export { type AngleUnit, AspectRatioControl, BackgroundControl, BoxShadowRepeaterControl, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent, ControlFormLabel, ControlReplacementsProvider, ControlToggleButtonGroup,
|
|
642
|
+
export { type AdornmentComponent, type AngleUnit, AspectRatioControl, BackgroundControl, BoxShadowRepeaterControl, ClearIconButton, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent$1 as ControlComponent, ControlFormLabel, ControlReplacementsProvider, ControlToggleButtonGroup, DateTimeControl, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, FloatingActionsBar, type FontCategory, FontFamilyControl, GapControl, HtmlTagControl, ImageControl, InlineEditingControl, InlineEditor, InlineEditorToolbar, ItemSelector, type ItemsActionPayload, KeyValueControl, type LengthUnit, LinkControl, LinkedDimensionsControl, NumberControl, PopoverContent, PopoverGridContainer, PositionControl, PropKeyProvider, PropProvider, type PropProviderProps, QueryControl, RepeatableControl, Repeater, type RepeaterItem, SelectControl, SelectControlWrapper, type SetRepeaterValuesMeta, type SetValue, type SetValueMeta, SizeControl, StrokeControl, SvgMediaControl, SwitchControl, TextAreaControl, TextControl, type TimeUnit, type ToggleButtonGroupItem, ToggleButtonGroupUi, ToggleControl, type ToggleControlProps, TransformRepeaterControl, TransformSettingsControl, TransitionRepeaterControl, type Unit, UrlControl, createControl, createControlReplacementsRegistry, enqueueFont, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useFloatingActionsBar, useSyncExternalState };
|