@elementor/editor-controls 4.1.0-711 → 4.1.0-713
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 +144 -74
- package/dist/index.d.ts +144 -74
- package/dist/index.js +793 -160
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +767 -138
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -15
- package/src/components/control-toggle-button-group.tsx +1 -1
- package/src/controls/size-control/hooks/use-size-unit-keyboard.tsx +12 -1
- package/src/controls/size-control/hooks/use-size-value.ts +12 -16
- package/src/controls/size-control/size-component.tsx +38 -17
- package/src/controls/size-control/size-field.tsx +37 -13
- package/src/controls/size-control/sync/get-units.ts +15 -1
- package/src/controls/size-control/types.ts +8 -0
- package/src/controls/size-control/unstable-size-control.tsx +86 -0
- package/src/controls/size-control/utils/has-size-value.ts +5 -0
- package/src/controls/size-control/utils/resolve-bound-prop-value.ts +72 -0
- package/src/controls/size-control/utils/resolve-size-value.ts +4 -3
- package/src/controls/size-control/utils/settings/get-default-unit.ts +7 -0
- package/src/controls/size-control/utils/settings/get-prop-type-settings.ts +12 -0
- package/src/controls/size-control/utils/settings/get-size-units.ts +23 -0
- package/src/controls/size-control/utils/should-nullify-value.ts +15 -0
- package/src/index.ts +3 -0
- package/src/controls/size-control/utils/is-numeric-value.ts +0 -11
package/dist/index.d.mts
CHANGED
|
@@ -2,6 +2,7 @@ import * as React$1 from 'react';
|
|
|
2
2
|
import { RefObject, ReactNode, FC, PropsWithChildren, ComponentProps, Dispatch, SetStateAction, ComponentType } from 'react';
|
|
3
3
|
import { SxProps, SelectProps, UnstableColorFieldProps, StackProps, ToggleButtonProps, PopupState, Theme, FormLabelProps, Grid, TextFieldProps } from '@elementor/ui';
|
|
4
4
|
import { StringPropValue, PropTypeUtil, PropValue, PropKey, LinkPropValue, TransformablePropValue, PropType, CreateOptions, SizePropValue } from '@elementor/editor-props';
|
|
5
|
+
import * as _emotion_styled from '@emotion/styled';
|
|
5
6
|
import { StyleDefinitionState } from '@elementor/editor-styles';
|
|
6
7
|
import { EditorProps, EditorView } from '@tiptap/pm/view';
|
|
7
8
|
import { Editor } from '@tiptap/react';
|
|
@@ -28,25 +29,25 @@ declare const TextControl: ControlComponent$1<({ placeholder, error, inputValue,
|
|
|
28
29
|
ariaLabel?: string;
|
|
29
30
|
}) => React$1.JSX.Element>;
|
|
30
31
|
|
|
31
|
-
type Props$
|
|
32
|
+
type Props$b = {
|
|
32
33
|
placeholder?: string;
|
|
33
34
|
ariaLabel?: string;
|
|
34
35
|
};
|
|
35
|
-
declare const TextAreaControl: ControlComponent$1<({ placeholder, ariaLabel }: Props$
|
|
36
|
+
declare const TextAreaControl: ControlComponent$1<({ placeholder, ariaLabel }: Props$b) => React$1.JSX.Element>;
|
|
36
37
|
|
|
37
38
|
declare const lengthUnits: readonly ["px", "%", "em", "rem", "vw", "vh", "ch"];
|
|
38
39
|
declare const angleUnits: readonly ["deg", "rad", "grad", "turn"];
|
|
39
40
|
declare const timeUnits: readonly ["s", "ms"];
|
|
40
41
|
declare const defaultExtendedOptions: readonly ["auto", "custom"];
|
|
41
|
-
type LengthUnit = (typeof lengthUnits)[number];
|
|
42
|
-
type AngleUnit = (typeof angleUnits)[number];
|
|
43
|
-
type TimeUnit = (typeof timeUnits)[number];
|
|
42
|
+
type LengthUnit$1 = (typeof lengthUnits)[number];
|
|
43
|
+
type AngleUnit$1 = (typeof angleUnits)[number];
|
|
44
|
+
type TimeUnit$1 = (typeof timeUnits)[number];
|
|
44
45
|
type ExtendedOption = (typeof defaultExtendedOptions)[number];
|
|
45
|
-
type Unit = LengthUnit | AngleUnit | TimeUnit;
|
|
46
|
-
declare function isUnitExtendedOption(unit: Unit | ExtendedOption): unit is ExtendedOption;
|
|
46
|
+
type Unit$1 = LengthUnit$1 | AngleUnit$1 | TimeUnit$1;
|
|
47
|
+
declare function isUnitExtendedOption(unit: Unit$1 | ExtendedOption): unit is ExtendedOption;
|
|
47
48
|
|
|
48
|
-
type SizeVariant = 'length' | 'angle' | 'time';
|
|
49
|
-
type UnitProps<T extends readonly Unit[]> = {
|
|
49
|
+
type SizeVariant$1 = 'length' | 'angle' | 'time';
|
|
50
|
+
type UnitProps<T extends readonly Unit$1[]> = {
|
|
50
51
|
units?: T;
|
|
51
52
|
defaultUnit?: T[number];
|
|
52
53
|
};
|
|
@@ -61,18 +62,18 @@ type BaseSizeControlProps = {
|
|
|
61
62
|
id?: string;
|
|
62
63
|
ariaLabel?: string;
|
|
63
64
|
};
|
|
64
|
-
type LengthSizeControlProps = BaseSizeControlProps & UnitProps<LengthUnit[]> & {
|
|
65
|
+
type LengthSizeControlProps = BaseSizeControlProps & UnitProps<LengthUnit$1[]> & {
|
|
65
66
|
variant: 'length';
|
|
66
67
|
};
|
|
67
|
-
type AngleSizeControlProps = BaseSizeControlProps & UnitProps<AngleUnit[]> & {
|
|
68
|
+
type AngleSizeControlProps = BaseSizeControlProps & UnitProps<AngleUnit$1[]> & {
|
|
68
69
|
variant: 'angle';
|
|
69
70
|
};
|
|
70
|
-
type TimeSizeControlProps = BaseSizeControlProps & UnitProps<TimeUnit[]> & {
|
|
71
|
+
type TimeSizeControlProps = BaseSizeControlProps & UnitProps<TimeUnit$1[]> & {
|
|
71
72
|
variant: 'time';
|
|
72
73
|
};
|
|
73
74
|
type SizeControlProps = LengthSizeControlProps | AngleSizeControlProps | TimeSizeControlProps;
|
|
74
75
|
declare const SizeControl: ControlComponent$1<({ variant, defaultUnit, units, placeholder, startIcon, anchorRef, extendedOptions, disableCustom, min, enablePropTypeUnits, id, ariaLabel, }: Omit<SizeControlProps, "variant"> & {
|
|
75
|
-
variant?: SizeVariant;
|
|
76
|
+
variant?: SizeVariant$1;
|
|
76
77
|
}) => React$1.JSX.Element>;
|
|
77
78
|
|
|
78
79
|
declare const StrokeControl: ControlComponent$1<() => React$1.JSX.Element>;
|
|
@@ -115,12 +116,12 @@ type ChipsControlProps = {
|
|
|
115
116
|
};
|
|
116
117
|
declare const ChipsControl: ControlComponent$1<({ options }: ChipsControlProps) => React$1.JSX.Element>;
|
|
117
118
|
|
|
118
|
-
type Props$
|
|
119
|
+
type Props$a = Partial<Omit<UnstableColorFieldProps, 'value' | 'onChange'>> & {
|
|
119
120
|
propTypeUtil?: PropTypeUtil<string, string>;
|
|
120
121
|
anchorEl?: HTMLElement | null;
|
|
121
122
|
id?: string;
|
|
122
123
|
};
|
|
123
|
-
declare const ColorControl: ControlComponent$1<({ propTypeUtil, anchorEl, slotProps, id, ...props }: Props$
|
|
124
|
+
declare const ColorControl: ControlComponent$1<({ propTypeUtil, anchorEl, slotProps, id, ...props }: Props$a) => React$1.JSX.Element>;
|
|
124
125
|
|
|
125
126
|
type RenderContentProps = {
|
|
126
127
|
size: ToggleButtonProps['size'];
|
|
@@ -132,9 +133,15 @@ type ToggleButtonGroupItem<TValue> = {
|
|
|
132
133
|
renderContent: ({ size }: RenderContentProps) => React$1.ReactNode;
|
|
133
134
|
showTooltip?: boolean;
|
|
134
135
|
};
|
|
136
|
+
declare const StyledToggleButtonGroup: _emotion_styled.StyledComponent<any, {}, {
|
|
137
|
+
ref?: React$1.Ref<any> | undefined;
|
|
138
|
+
}>;
|
|
139
|
+
declare const StyledToggleButton: _emotion_styled.StyledComponent<any, {}, {
|
|
140
|
+
ref?: React$1.Ref<any> | undefined;
|
|
141
|
+
}>;
|
|
135
142
|
type ExclusiveValue<TValue> = TValue;
|
|
136
143
|
type NonExclusiveValue<TValue> = TValue[];
|
|
137
|
-
type Props$
|
|
144
|
+
type Props$9<TValue> = {
|
|
138
145
|
disabled?: boolean;
|
|
139
146
|
justify?: StackProps['justifyContent'];
|
|
140
147
|
size?: ToggleButtonProps['size'];
|
|
@@ -151,10 +158,10 @@ type Props$7<TValue> = {
|
|
|
151
158
|
value: ExclusiveValue<TValue>;
|
|
152
159
|
onChange: (value: ExclusiveValue<TValue>) => void;
|
|
153
160
|
});
|
|
154
|
-
declare const ToggleButtonGroupUi: <TValue>(props: Props$
|
|
161
|
+
declare const ToggleButtonGroupUi: <TValue>(props: Props$9<TValue> & {
|
|
155
162
|
ref?: React$1.Ref<HTMLDivElement>;
|
|
156
163
|
}) => React$1.ReactElement;
|
|
157
|
-
declare const ControlToggleButtonGroup: <TValue>(props: Props$
|
|
164
|
+
declare const ControlToggleButtonGroup: <TValue>(props: Props$9<TValue>) => React$1.JSX.Element;
|
|
158
165
|
|
|
159
166
|
type ToggleControlProps<T extends PropValue> = {
|
|
160
167
|
options: Array<ToggleButtonGroupItem<T> & {
|
|
@@ -185,22 +192,22 @@ type Item$1 = {
|
|
|
185
192
|
bind: PropKey;
|
|
186
193
|
};
|
|
187
194
|
type EqualUnequalItems = [Item$1, Item$1, Item$1, Item$1];
|
|
188
|
-
type Props$
|
|
195
|
+
type Props$8<TMultiPropType extends string, TPropValue extends MultiSizePropValue> = {
|
|
189
196
|
label: string;
|
|
190
197
|
icon: ReactNode;
|
|
191
198
|
tooltipLabel: string;
|
|
192
199
|
items: EqualUnequalItems;
|
|
193
200
|
multiSizePropTypeUtil: PropTypeUtil<TMultiPropType, TPropValue>;
|
|
194
201
|
};
|
|
195
|
-
declare function EqualUnequalSizesControl<TMultiPropType extends string, TPropValue extends MultiSizePropValue>({ label, icon, tooltipLabel, items, multiSizePropTypeUtil, }: Props$
|
|
202
|
+
declare function EqualUnequalSizesControl<TMultiPropType extends string, TPropValue extends MultiSizePropValue>({ label, icon, tooltipLabel, items, multiSizePropTypeUtil, }: Props$8<TMultiPropType, TPropValue>): React$1.JSX.Element;
|
|
196
203
|
|
|
197
|
-
type Props$
|
|
204
|
+
type Props$7 = {
|
|
198
205
|
label: string;
|
|
199
206
|
isSiteRtl?: boolean;
|
|
200
207
|
extendedOptions?: ExtendedOption[];
|
|
201
208
|
min?: number;
|
|
202
209
|
};
|
|
203
|
-
declare const LinkedDimensionsControl: ({ label, isSiteRtl, extendedOptions, min }: Props$
|
|
210
|
+
declare const LinkedDimensionsControl: ({ label, isSiteRtl, extendedOptions, min }: Props$7) => React$1.JSX.Element;
|
|
204
211
|
|
|
205
212
|
type FontCategory = {
|
|
206
213
|
label: string;
|
|
@@ -253,7 +260,7 @@ type ControlProps<TControlProps = unknown> = TControlProps & {
|
|
|
253
260
|
};
|
|
254
261
|
};
|
|
255
262
|
|
|
256
|
-
type Props$
|
|
263
|
+
type Props$6 = ControlProps<{
|
|
257
264
|
queryOptions: {
|
|
258
265
|
params: Record<string, unknown>;
|
|
259
266
|
url: string;
|
|
@@ -265,21 +272,21 @@ type Props$4 = ControlProps<{
|
|
|
265
272
|
ariaLabel?: string;
|
|
266
273
|
}>;
|
|
267
274
|
type DestinationProp = LinkPropValue['value']['destination'];
|
|
268
|
-
declare const LinkControl: ControlComponent$1<(props: Props$
|
|
275
|
+
declare const LinkControl: ControlComponent$1<(props: Props$6) => React$1.JSX.Element>;
|
|
269
276
|
|
|
270
277
|
type SelectOption = {
|
|
271
278
|
label: string;
|
|
272
279
|
value: StringPropValue['value'];
|
|
273
280
|
disabled?: boolean;
|
|
274
281
|
};
|
|
275
|
-
type Props$
|
|
282
|
+
type Props$5 = {
|
|
276
283
|
options: SelectOption[];
|
|
277
284
|
onChange?: (newValue: string | null, previousValue: string | null | undefined) => void;
|
|
278
285
|
fallbackLabels?: Record<string, string>;
|
|
279
286
|
};
|
|
280
|
-
declare const HtmlTagControl: ControlComponent$1<({ options, onChange, fallbackLabels }: Props$
|
|
287
|
+
declare const HtmlTagControl: ControlComponent$1<({ options, onChange, fallbackLabels }: Props$5) => React$1.JSX.Element>;
|
|
281
288
|
|
|
282
|
-
type Props$
|
|
289
|
+
type Props$4 = {
|
|
283
290
|
queryOptions: {
|
|
284
291
|
params: Record<string, unknown>;
|
|
285
292
|
url: string;
|
|
@@ -290,7 +297,7 @@ type Props$2 = {
|
|
|
290
297
|
onSetValue?: (value: DestinationProp | null) => void;
|
|
291
298
|
ariaLabel?: string;
|
|
292
299
|
};
|
|
293
|
-
declare const QueryControl: ControlComponent$1<(props: Props$
|
|
300
|
+
declare const QueryControl: ControlComponent$1<(props: Props$4) => React$1.JSX.Element>;
|
|
294
301
|
|
|
295
302
|
declare const GapControl: ({ label }: {
|
|
296
303
|
label: string;
|
|
@@ -408,47 +415,6 @@ declare const InlineEditingControl: ControlComponent$1<({ sx, attributes, props,
|
|
|
408
415
|
|
|
409
416
|
declare const EmailFormActionControl: ControlComponent$1<() => React$1.JSX.Element>;
|
|
410
417
|
|
|
411
|
-
declare const ControlFormLabel: (props: FormLabelProps) => React$1.JSX.Element;
|
|
412
|
-
|
|
413
|
-
declare const DisplayConditionsControl: ControlComponent$1<() => React$1.JSX.Element>;
|
|
414
|
-
|
|
415
|
-
declare const AttributesControl: ControlComponent$1<() => React$1.JSX.Element>;
|
|
416
|
-
|
|
417
|
-
type PromotionTrackingData = {
|
|
418
|
-
target_name: string;
|
|
419
|
-
target_location?: 'widget_panel' | 'variables_manager';
|
|
420
|
-
location_l1?: string;
|
|
421
|
-
location_l2?: 'style' | 'general' | 'interactions';
|
|
422
|
-
};
|
|
423
|
-
declare const trackViewPromotion: (data: PromotionTrackingData) => void;
|
|
424
|
-
declare const trackUpgradePromotionClick: (data: PromotionTrackingData) => void;
|
|
425
|
-
|
|
426
|
-
type V4PromotionData = {
|
|
427
|
-
title: string;
|
|
428
|
-
content: string;
|
|
429
|
-
image: string;
|
|
430
|
-
ctaUrl: string;
|
|
431
|
-
};
|
|
432
|
-
type V4PromotionKey = 'displayConditions' | 'customCss' | 'attributes';
|
|
433
|
-
|
|
434
|
-
type PromotionTriggerProps = {
|
|
435
|
-
promotionKey: V4PromotionKey;
|
|
436
|
-
children?: ReactNode;
|
|
437
|
-
trackingData: PromotionTrackingData;
|
|
438
|
-
};
|
|
439
|
-
type PromotionTriggerRef = {
|
|
440
|
-
toggle: () => void;
|
|
441
|
-
};
|
|
442
|
-
declare const PromotionTrigger: React$1.ForwardRefExoticComponent<PromotionTriggerProps & React$1.RefAttributes<PromotionTriggerRef>>;
|
|
443
|
-
|
|
444
|
-
type ClearIconButtonProps = {
|
|
445
|
-
onClick?: () => void;
|
|
446
|
-
tooltipText: React$1.ReactNode;
|
|
447
|
-
disabled?: boolean;
|
|
448
|
-
size?: 'tiny' | 'small' | 'medium' | 'large';
|
|
449
|
-
};
|
|
450
|
-
declare const ClearIconButton: ({ tooltipText, onClick, disabled, size }: ClearIconButtonProps) => React$1.JSX.Element;
|
|
451
|
-
|
|
452
418
|
type Action = {
|
|
453
419
|
type: string;
|
|
454
420
|
payload?: object;
|
|
@@ -504,6 +470,67 @@ type EnhancedPropKeyContextValue<T, P> = PropKeyContextValue<T, P> & {
|
|
|
504
470
|
declare function useBoundProp<T extends PropValue = PropValue, P extends PropType = PropType>(): EnhancedPropKeyContextValue<T, P>;
|
|
505
471
|
declare function useBoundProp<TKey extends string, TValue extends PropValue>(propTypeUtil: PropTypeUtil<TKey, TValue>): UseBoundProp<TValue>;
|
|
506
472
|
|
|
473
|
+
type LengthUnit = 'px' | '%' | 'em' | 'rem' | 'vw' | 'vh' | 'ch';
|
|
474
|
+
type AngleUnit = 'deg' | 'rad' | 'grad' | 'turn';
|
|
475
|
+
type TimeUnit = 's' | 'ms';
|
|
476
|
+
type ExtendedSizeOption = 'auto' | 'custom';
|
|
477
|
+
type Unit = LengthUnit | AngleUnit | TimeUnit;
|
|
478
|
+
type SizeUnit$1 = Unit | ExtendedSizeOption;
|
|
479
|
+
type SizeVariant = 'length' | 'angle' | 'time';
|
|
480
|
+
type SetSizeValue<T> = (value: T, options?: CreateOptions, meta?: SetValueMeta) => void;
|
|
481
|
+
|
|
482
|
+
type Props$3 = {
|
|
483
|
+
placeholder?: string;
|
|
484
|
+
variant?: SizeVariant;
|
|
485
|
+
anchorRef?: RefObject<HTMLDivElement | null>;
|
|
486
|
+
startIcon?: React$1.ReactNode;
|
|
487
|
+
ariaLabel?: string;
|
|
488
|
+
min?: number;
|
|
489
|
+
id?: string;
|
|
490
|
+
};
|
|
491
|
+
declare const UnstableSizeControl: ControlComponent$1<({ variant, placeholder: propPlaceholder, anchorRef, startIcon, ariaLabel, min }: Props$3) => React$1.JSX.Element>;
|
|
492
|
+
|
|
493
|
+
declare const ControlFormLabel: (props: FormLabelProps) => React$1.JSX.Element;
|
|
494
|
+
|
|
495
|
+
declare const DisplayConditionsControl: ControlComponent$1<() => React$1.JSX.Element>;
|
|
496
|
+
|
|
497
|
+
declare const AttributesControl: ControlComponent$1<() => React$1.JSX.Element>;
|
|
498
|
+
|
|
499
|
+
type PromotionTrackingData = {
|
|
500
|
+
target_name: string;
|
|
501
|
+
target_location?: 'widget_panel' | 'variables_manager';
|
|
502
|
+
location_l1?: string;
|
|
503
|
+
location_l2?: 'style' | 'general' | 'interactions';
|
|
504
|
+
};
|
|
505
|
+
declare const trackViewPromotion: (data: PromotionTrackingData) => void;
|
|
506
|
+
declare const trackUpgradePromotionClick: (data: PromotionTrackingData) => void;
|
|
507
|
+
|
|
508
|
+
type V4PromotionData = {
|
|
509
|
+
title: string;
|
|
510
|
+
content: string;
|
|
511
|
+
image: string;
|
|
512
|
+
ctaUrl: string;
|
|
513
|
+
};
|
|
514
|
+
type V4PromotionKey = 'displayConditions' | 'customCss' | 'attributes';
|
|
515
|
+
|
|
516
|
+
type PromotionTriggerProps = {
|
|
517
|
+
promotionKey: V4PromotionKey;
|
|
518
|
+
children?: ReactNode;
|
|
519
|
+
trackingData: PromotionTrackingData;
|
|
520
|
+
};
|
|
521
|
+
type PromotionTriggerRef = {
|
|
522
|
+
toggle: () => void;
|
|
523
|
+
};
|
|
524
|
+
declare const PromotionTrigger: React$1.ForwardRefExoticComponent<PromotionTriggerProps & React$1.RefAttributes<PromotionTriggerRef>>;
|
|
525
|
+
|
|
526
|
+
type ClearIconButtonProps = {
|
|
527
|
+
onClick?: () => void;
|
|
528
|
+
tooltipText: React$1.ReactNode;
|
|
529
|
+
disabled?: boolean;
|
|
530
|
+
size?: 'tiny' | 'small' | 'medium' | 'large';
|
|
531
|
+
};
|
|
532
|
+
declare const ClearIconButton: ({ tooltipText, onClick, disabled, size }: ClearIconButtonProps) => React$1.JSX.Element;
|
|
533
|
+
|
|
507
534
|
type AnchorEl = HTMLElement | null;
|
|
508
535
|
type RepeaterItem<T> = {
|
|
509
536
|
disabled?: boolean;
|
|
@@ -621,20 +648,63 @@ type InlineEditorToolbarProps = {
|
|
|
621
648
|
};
|
|
622
649
|
declare const InlineEditorToolbar: ({ editor, elementId, sx }: InlineEditorToolbarProps) => React$1.JSX.Element;
|
|
623
650
|
|
|
624
|
-
type Props$
|
|
651
|
+
type Props$2<TValue> = {
|
|
625
652
|
value: TValue;
|
|
626
|
-
units: Unit[];
|
|
627
|
-
defaultUnit?: Unit;
|
|
653
|
+
units: Unit$1[];
|
|
654
|
+
defaultUnit?: Unit$1;
|
|
628
655
|
onChange: (value: TValue) => void;
|
|
629
656
|
onBlur?: (event: React$1.FocusEvent<HTMLInputElement>) => void;
|
|
630
657
|
disabled?: boolean;
|
|
631
658
|
InputProps?: TextFieldProps['InputProps'];
|
|
632
659
|
startIcon?: React$1.ReactNode;
|
|
633
660
|
};
|
|
634
|
-
declare const UnstableSizeField: <T extends SizePropValue["value"]>({ value, InputProps, onChange, onBlur, units, defaultUnit, startIcon, }: Props$
|
|
661
|
+
declare const UnstableSizeField: <T extends SizePropValue["value"]>({ value, InputProps, onChange, onBlur, units, defaultUnit, startIcon, }: Props$2<T>) => React$1.JSX.Element;
|
|
635
662
|
|
|
636
663
|
declare const NumberInput: React$1.ForwardRefExoticComponent<(Omit<_mui_material.FilledTextFieldProps, "ref"> | Omit<_mui_material.OutlinedTextFieldProps, "ref"> | Omit<_mui_material.StandardTextFieldProps, "ref">) & React$1.RefAttributes<unknown>>;
|
|
637
664
|
|
|
665
|
+
type UnitSelectorProps<T extends string> = {
|
|
666
|
+
options: T[];
|
|
667
|
+
value: T;
|
|
668
|
+
onSelect: (value: T) => void;
|
|
669
|
+
isActive: boolean;
|
|
670
|
+
menuItemsAttributes?: {
|
|
671
|
+
[key in T]?: Record<string, unknown>;
|
|
672
|
+
};
|
|
673
|
+
optionLabelOverrides?: {
|
|
674
|
+
[key in T]?: React$1.ReactNode;
|
|
675
|
+
};
|
|
676
|
+
disabled?: boolean;
|
|
677
|
+
};
|
|
678
|
+
|
|
679
|
+
type SizeFieldProps<TValue extends SizePropValue['value'], TUnit extends SizeUnit$1> = {
|
|
680
|
+
units: TUnit[];
|
|
681
|
+
value: TValue | null;
|
|
682
|
+
placeholder?: string;
|
|
683
|
+
defaultUnit?: SizeUnit$1;
|
|
684
|
+
startIcon?: React$1.ReactNode;
|
|
685
|
+
setValue: SetSizeValue<TValue>;
|
|
686
|
+
onBlur?: (event: React$1.FocusEvent<HTMLInputElement>) => void;
|
|
687
|
+
onKeyDown?: (event: React$1.KeyboardEvent<HTMLInputElement>) => void;
|
|
688
|
+
onUnitChange?: (unit: SizeUnit$1) => void;
|
|
689
|
+
disabled?: boolean;
|
|
690
|
+
focused?: boolean;
|
|
691
|
+
ariaLabel?: string;
|
|
692
|
+
min?: number;
|
|
693
|
+
InputProps?: TextFieldProps['InputProps'];
|
|
694
|
+
unitSelectorProps?: Partial<UnitSelectorProps<TUnit>>;
|
|
695
|
+
};
|
|
696
|
+
|
|
697
|
+
type SizeValue = SizePropValue['value'];
|
|
698
|
+
type SizeUnit = SizePropValue['value']['unit'];
|
|
699
|
+
type Props$1 = SizeFieldProps<SizeValue, SizeUnit> & {
|
|
700
|
+
anchorRef?: RefObject<HTMLDivElement | null>;
|
|
701
|
+
isUnitActive?: boolean;
|
|
702
|
+
SizeFieldWrapper?: React$1.ComponentType<{
|
|
703
|
+
children: React$1.ReactNode;
|
|
704
|
+
}>;
|
|
705
|
+
};
|
|
706
|
+
declare const SizeComponent: ({ anchorRef, isUnitActive, SizeFieldWrapper, ...sizeFieldProps }: Props$1) => React$1.JSX.Element;
|
|
707
|
+
|
|
638
708
|
type AnyComponentType = ComponentType<any>;
|
|
639
709
|
declare const brandSymbol: unique symbol;
|
|
640
710
|
type ControlComponent$1<TComponent extends AnyComponentType = AnyComponentType> = TComponent & {
|
|
@@ -738,4 +808,4 @@ declare function useTypingBuffer(options?: UseTypingBufferOptions): {
|
|
|
738
808
|
startsWith: (haystack: string, needle: string) => boolean;
|
|
739
809
|
};
|
|
740
810
|
|
|
741
|
-
export { type AdornmentComponent, type AngleUnit, AspectRatioControl, AttributesControl, BackgroundControl, BoxShadowRepeaterControl, ChipsControl, ClearIconButton, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent$1 as ControlComponent, ControlFormLabel, type ControlReplacement, ControlReplacementsProvider, ControlToggleButtonGroup, DateTimeControl, DisplayConditionsControl, EmailFormActionControl, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, type FontCategory, FontFamilyControl, GapControl, HtmlTagControl, ImageControl, InlineEditingControl, InlineEditor, InlineEditorToolbar, type InlineEditorToolbarProps, ItemSelector, type ItemsActionPayload, KeyValueControl, type LengthUnit, LinkControl, LinkedDimensionsControl, NumberControl, NumberInput, PopoverContent, PopoverGridContainer, PositionControl, type PromotionTrackingData, PromotionTrigger, type PromotionTriggerRef, 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, UnstableSizeField, UrlControl, type UseTypingBufferOptions, type V4PromotionData, type V4PromotionKey, VideoMediaControl, createControl, createControlReplacementsRegistry, enqueueFont, getControlReplacements, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, isUnitExtendedOption, registerControlReplacement, trackUpgradePromotionClick, trackViewPromotion, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useControlReplacement, useFontFamilies, useSyncExternalState, useTypingBuffer };
|
|
811
|
+
export { type AdornmentComponent, type AngleUnit$1 as AngleUnit, AspectRatioControl, AttributesControl, BackgroundControl, BoxShadowRepeaterControl, ChipsControl, ClearIconButton, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent$1 as ControlComponent, ControlFormLabel, type ControlReplacement, ControlReplacementsProvider, ControlToggleButtonGroup, DateTimeControl, DisplayConditionsControl, EmailFormActionControl, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, type FontCategory, FontFamilyControl, GapControl, HtmlTagControl, ImageControl, InlineEditingControl, InlineEditor, InlineEditorToolbar, type InlineEditorToolbarProps, ItemSelector, type ItemsActionPayload, KeyValueControl, type LengthUnit$1 as LengthUnit, LinkControl, LinkedDimensionsControl, NumberControl, NumberInput, PopoverContent, PopoverGridContainer, PositionControl, type PromotionTrackingData, PromotionTrigger, type PromotionTriggerRef, PropKeyProvider, PropProvider, type PropProviderProps, QueryControl, RepeatableControl, Repeater, type RepeaterItem, SelectControl, SelectControlWrapper, type SetRepeaterValuesMeta, type SetValue, type SetValueMeta, SizeComponent, SizeControl, StrokeControl, StyledToggleButton, StyledToggleButtonGroup, SvgMediaControl, SwitchControl, TextAreaControl, TextControl, type TimeUnit$1 as TimeUnit, type ToggleButtonGroupItem, ToggleButtonGroupUi, ToggleControl, type ToggleControlProps, TransformRepeaterControl, TransformSettingsControl, TransitionRepeaterControl, type Unit$1 as Unit, UnstableSizeControl, UnstableSizeField, UrlControl, type UseTypingBufferOptions, type V4PromotionData, type V4PromotionKey, VideoMediaControl, createControl, createControlReplacementsRegistry, enqueueFont, getControlReplacements, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, isUnitExtendedOption, registerControlReplacement, trackUpgradePromotionClick, trackViewPromotion, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useControlReplacement, useFontFamilies, useSyncExternalState, useTypingBuffer };
|