@baseline-ui/core 0.2.0 → 0.4.0
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.css +1 -1
- package/dist/index.d.mts +152 -148
- package/dist/index.d.ts +152 -148
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +10 -17
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React, { Key } from 'react';
|
|
2
2
|
import { IconProps, SVGRProps } from '@baseline-ui/icons';
|
|
3
3
|
import * as react_aria from 'react-aria';
|
|
4
|
-
import { AriaButtonProps, AriaSliderProps, AriaSwitchProps, AriaSearchFieldProps, AriaPopoverProps, AriaMenuProps, AriaMenuTriggerProps, AriaLinkOptions, SeparatorProps as SeparatorProps$1, AriaProgressBarProps, AriaTextFieldProps, AriaTooltipProps, AriaPositionProps, OverlayProps, AriaToggleButtonProps, AriaCheckboxProps, AriaNumberFieldProps, I18nProviderProps as I18nProviderProps$1, LocalizedStrings, useNumberFormatter, useDateFormatter, AriaTagGroupProps,
|
|
4
|
+
import { AriaButtonProps, AriaSliderProps, AriaSwitchProps, AriaSearchFieldProps, AriaPopoverProps, AriaMenuProps, AriaMenuTriggerProps, AriaLinkOptions, SeparatorProps as SeparatorProps$1, AriaProgressBarProps, AriaTextFieldProps, AriaTooltipProps, AriaPositionProps, OverlayProps, AriaToggleButtonProps, AriaCheckboxProps, AriaNumberFieldProps, I18nProviderProps as I18nProviderProps$1, LocalizedStrings, useNumberFormatter, useDateFormatter, AriaTagGroupProps, AriaListBoxProps, AriaListBoxOptions, OptionAria, AriaSelectOptions, AriaDialogProps, DropOptions, ClipboardProps, PressProps, AriaRadioGroupProps, AriaModalOverlayProps, Locale } from 'react-aria';
|
|
5
5
|
export { I18nProviderProps, useCollator, useDateFormatter, useNumberFormatter } from 'react-aria';
|
|
6
6
|
import { SliderStateOptions, ToggleProps, MenuTriggerProps, TooltipTriggerProps, NumberFieldStateOptions, ListProps, Orientation, SelectStateOptions, Item as Item$2, OverlayTriggerProps } from 'react-stately';
|
|
7
7
|
import { Theme, Sprinkles } from '@baseline-ui/tokens';
|
|
@@ -11,7 +11,12 @@ import { ColorFieldProps } from '@react-stately/color';
|
|
|
11
11
|
import { OnRender, OnRenderStart, OnDragStart, OnDrag, OnDragEnd, OnResizeStart, OnResize, OnResizeEnd, OnRotateStart, OnRotate, OnRotateEnd, OnSnap, RotationPosition } from 'react-moveable';
|
|
12
12
|
|
|
13
13
|
interface BlockProps {
|
|
14
|
-
|
|
14
|
+
/**
|
|
15
|
+
* The unique identifier for the block. This is used to identify the block in
|
|
16
|
+
* the DOM and in the block map. It is added as a data attribute
|
|
17
|
+
* `data-blockid` to the root element of the block if a DOM node is rendered.
|
|
18
|
+
*/
|
|
19
|
+
"data-blockid"?: Key;
|
|
15
20
|
}
|
|
16
21
|
|
|
17
22
|
interface StylingProps extends BlockProps {
|
|
@@ -19,16 +24,10 @@ interface StylingProps extends BlockProps {
|
|
|
19
24
|
className?: string;
|
|
20
25
|
|
|
21
26
|
/** The style applied to the root element of the component. */
|
|
22
|
-
style?: React
|
|
27
|
+
style?: React.CSSProperties;
|
|
23
28
|
}
|
|
24
29
|
|
|
25
|
-
interface ActionButtonSharedProps extends Omit<AriaButtonProps<"button" | "div">, "onKeyUp" | "rel" | "href" | "target">, StylingProps {
|
|
26
|
-
/**
|
|
27
|
-
* Handler that is called when the element receives or loses focus.
|
|
28
|
-
*
|
|
29
|
-
* @param isHovered
|
|
30
|
-
*/
|
|
31
|
-
onHoverChange?: (isHovered: boolean) => void;
|
|
30
|
+
interface ActionButtonSharedProps extends Omit<AriaButtonProps<"button" | "div">, "onKeyUp" | "rel" | "href" | "target" | "children">, StylingProps {
|
|
32
31
|
}
|
|
33
32
|
interface ActionButtonProps extends ActionButtonSharedProps {
|
|
34
33
|
/**
|
|
@@ -38,11 +37,11 @@ interface ActionButtonProps extends ActionButtonSharedProps {
|
|
|
38
37
|
*/
|
|
39
38
|
variant?: "primary" | "secondary" | "tertiary" | "ghost";
|
|
40
39
|
/** The button's label. */
|
|
41
|
-
label:
|
|
40
|
+
label: React.ReactNode;
|
|
42
41
|
/** The button's icon before the label. */
|
|
43
|
-
iconStart?: React
|
|
42
|
+
iconStart?: React.FC<IconProps>;
|
|
44
43
|
/** The button's icon after the label. */
|
|
45
|
-
iconEnd?: React
|
|
44
|
+
iconEnd?: React.FC<IconProps>;
|
|
46
45
|
/**
|
|
47
46
|
* The button's size.
|
|
48
47
|
*
|
|
@@ -51,7 +50,7 @@ interface ActionButtonProps extends ActionButtonSharedProps {
|
|
|
51
50
|
size?: "sm" | "md";
|
|
52
51
|
}
|
|
53
52
|
|
|
54
|
-
declare const ActionButton: React
|
|
53
|
+
declare const ActionButton: React.ForwardRefExoticComponent<ActionButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
55
54
|
|
|
56
55
|
interface DomNodeRendererProps {
|
|
57
56
|
/** The class name applied to the wrapper `div` component. */
|
|
@@ -65,9 +64,9 @@ interface DomNodeRendererProps {
|
|
|
65
64
|
node: Node;
|
|
66
65
|
}
|
|
67
66
|
|
|
68
|
-
declare const DomNodeRenderer: React
|
|
67
|
+
declare const DomNodeRenderer: React.ForwardRefExoticComponent<DomNodeRendererProps & React.RefAttributes<HTMLDivElement>>;
|
|
69
68
|
|
|
70
|
-
interface SliderProps extends AriaSliderProps<number
|
|
69
|
+
interface SliderProps extends Omit<AriaSliderProps<number> & SliderStateOptions<number>, "orientation" | "numberFormatter">, StylingProps {
|
|
71
70
|
/**
|
|
72
71
|
* Whether the slider is read only.
|
|
73
72
|
*
|
|
@@ -78,10 +77,8 @@ interface SliderProps extends AriaSliderProps<number>, Omit<SliderStateOptions<n
|
|
|
78
77
|
numberFormatOptions?: Intl.NumberFormatOptions & {
|
|
79
78
|
numberingSystem?: string;
|
|
80
79
|
};
|
|
81
|
-
/** The class name applied to the root element. */
|
|
82
|
-
className?: string;
|
|
83
80
|
/** The label for the slider. */
|
|
84
|
-
label?:
|
|
81
|
+
label?: React.ReactNode;
|
|
85
82
|
/**
|
|
86
83
|
* Whether to include a number input for the slider.
|
|
87
84
|
*
|
|
@@ -90,11 +87,11 @@ interface SliderProps extends AriaSliderProps<number>, Omit<SliderStateOptions<n
|
|
|
90
87
|
includeNumberInput?: boolean;
|
|
91
88
|
}
|
|
92
89
|
|
|
93
|
-
declare const Slider: React
|
|
90
|
+
declare const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLDivElement>>;
|
|
94
91
|
|
|
95
|
-
interface SwitchProps extends Omit<AriaSwitchProps, "children">, Omit<ToggleProps, "children">, StylingProps {
|
|
92
|
+
interface SwitchProps extends Omit<AriaSwitchProps, "children">, Omit<ToggleProps, "children" | "isRequired" | "validate" | "validationBehavior" | "validationState" | "isInvalid">, StylingProps {
|
|
96
93
|
/** The label to display next to the switch. */
|
|
97
|
-
label?:
|
|
94
|
+
label?: React.ReactNode;
|
|
98
95
|
/** The position of the label. */
|
|
99
96
|
labelPosition?: "top" | "left";
|
|
100
97
|
/** The status label to display next to the switch. */
|
|
@@ -104,9 +101,9 @@ interface SwitchProps extends Omit<AriaSwitchProps, "children">, Omit<ToggleProp
|
|
|
104
101
|
};
|
|
105
102
|
}
|
|
106
103
|
|
|
107
|
-
declare const Switch: React
|
|
104
|
+
declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLLabelElement>>;
|
|
108
105
|
|
|
109
|
-
interface SearchInputProps extends Omit<AriaSearchFieldProps, "validationState" | "label" | "aria-autocomplete" | "autoComplete" | "isRequired" | "aria-haspopup" | "isReadOnly" | "aria-activedescendant" | "type">, StylingProps {
|
|
106
|
+
interface SearchInputProps extends Omit<AriaSearchFieldProps, "validationState" | "label" | "aria-autocomplete" | "autoComplete" | "isRequired" | "aria-haspopup" | "isReadOnly" | "aria-activedescendant" | "type" | "validationBehavior" | "validate" | "isInvalid">, StylingProps {
|
|
110
107
|
/**
|
|
111
108
|
* The size of the search input.
|
|
112
109
|
*
|
|
@@ -123,7 +120,7 @@ interface SearchInputProps extends Omit<AriaSearchFieldProps, "validationState"
|
|
|
123
120
|
"aria-label": string;
|
|
124
121
|
}
|
|
125
122
|
|
|
126
|
-
declare const SearchInput: React
|
|
123
|
+
declare const SearchInput: React.ForwardRefExoticComponent<SearchInputProps & React.RefAttributes<HTMLDivElement>>;
|
|
127
124
|
|
|
128
125
|
interface ThemeProviderProps extends StylingProps {
|
|
129
126
|
/**
|
|
@@ -135,7 +132,7 @@ interface ThemeProviderProps extends StylingProps {
|
|
|
135
132
|
*/
|
|
136
133
|
theme?: Theme | "light" | "dark" | "system";
|
|
137
134
|
/** The children to render. */
|
|
138
|
-
children: React
|
|
135
|
+
children: React.ReactNode;
|
|
139
136
|
/**
|
|
140
137
|
* A function that will be called when the theme changes from any of the child
|
|
141
138
|
* components.
|
|
@@ -143,7 +140,7 @@ interface ThemeProviderProps extends StylingProps {
|
|
|
143
140
|
setTheme?: (theme: Theme | "light" | "dark" | "system") => void;
|
|
144
141
|
}
|
|
145
142
|
|
|
146
|
-
declare const ThemeProvider: React
|
|
143
|
+
declare const ThemeProvider: React.ForwardRefExoticComponent<ThemeProviderProps & React.RefAttributes<HTMLDivElement>>;
|
|
147
144
|
|
|
148
145
|
/**
|
|
149
146
|
* A hook that returns the user preferences for color scheme, contrast, reduced
|
|
@@ -151,22 +148,16 @@ declare const ThemeProvider: React$1.ForwardRefExoticComponent<ThemeProviderProp
|
|
|
151
148
|
* changes their preferences.
|
|
152
149
|
*
|
|
153
150
|
* @example
|
|
154
|
-
* const {
|
|
155
|
-
*
|
|
156
|
-
* contrast,
|
|
157
|
-
* reducedMotion,
|
|
158
|
-
* transparency,
|
|
159
|
-
* reducedData,
|
|
160
|
-
* } = useUserPreferences();
|
|
151
|
+
* const { colorScheme, highContrast, reducedMotion, transparency } =
|
|
152
|
+
* useUserPreferences();
|
|
161
153
|
*
|
|
162
154
|
* @returns The user preferences.
|
|
163
155
|
*/
|
|
164
156
|
declare function useUserPreferences(): {
|
|
165
157
|
colorScheme: "dark" | "light";
|
|
166
|
-
|
|
158
|
+
highContrast: boolean;
|
|
167
159
|
reducedMotion: boolean;
|
|
168
160
|
transparency: boolean;
|
|
169
|
-
reducedData: boolean;
|
|
170
161
|
};
|
|
171
162
|
|
|
172
163
|
interface PopoverContentProps extends Omit<AriaPopoverProps, "popoverRef" | "triggerRef">, StylingProps {
|
|
@@ -174,11 +165,11 @@ interface PopoverContentProps extends Omit<AriaPopoverProps, "popoverRef" | "tri
|
|
|
174
165
|
* The reference element for the popover position. By default, the popover is
|
|
175
166
|
* positioned relative to the trigger element.
|
|
176
167
|
*/
|
|
177
|
-
triggerRef?: React
|
|
168
|
+
triggerRef?: React.RefObject<HTMLElement>;
|
|
178
169
|
/** The class name for the underlay element. */
|
|
179
170
|
underlayClassName?: string;
|
|
180
171
|
/** The contents of the popover. */
|
|
181
|
-
children: React
|
|
172
|
+
children: React.ReactNode;
|
|
182
173
|
}
|
|
183
174
|
|
|
184
175
|
type Item$1 = {
|
|
@@ -228,18 +219,18 @@ interface MenuProps extends MenuTriggerProps, MenuPopoverProps, Omit<AriaMenuPro
|
|
|
228
219
|
items: ItemsUnion[];
|
|
229
220
|
}
|
|
230
221
|
|
|
231
|
-
declare const Menu: React
|
|
222
|
+
declare const Menu: React.ForwardRefExoticComponent<MenuProps & React.RefAttributes<HTMLButtonElement>>;
|
|
232
223
|
|
|
233
224
|
interface LinkProps extends AriaLinkOptions, StylingProps {
|
|
234
225
|
/** The link's style variant. */
|
|
235
226
|
variant?: "default" | "inline";
|
|
236
227
|
/** The children to render. */
|
|
237
|
-
children: React
|
|
228
|
+
children: React.ReactNode;
|
|
238
229
|
/** The size of the link. */
|
|
239
230
|
size?: "sm" | "md" | "lg";
|
|
240
231
|
}
|
|
241
232
|
|
|
242
|
-
declare const Link: React
|
|
233
|
+
declare const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLElement>>;
|
|
243
234
|
|
|
244
235
|
interface SharedFileUploadProps extends StylingProps {
|
|
245
236
|
/** Whether the component is inlined. */
|
|
@@ -258,7 +249,7 @@ interface SharedFileUploadProps extends StylingProps {
|
|
|
258
249
|
/** The name of the input. */
|
|
259
250
|
name?: string;
|
|
260
251
|
/** The callback function that is fired when the value changes. */
|
|
261
|
-
onChange?: (event: React
|
|
252
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
262
253
|
/**
|
|
263
254
|
* The callback function that is fired when the value changes and the value is
|
|
264
255
|
* valid.
|
|
@@ -272,12 +263,12 @@ interface SharedFileUploadProps extends StylingProps {
|
|
|
272
263
|
}
|
|
273
264
|
interface FileUploadProps extends SharedFileUploadProps {
|
|
274
265
|
/** The Icon to display. */
|
|
275
|
-
icon?: React
|
|
266
|
+
icon?: React.FC<IconProps>;
|
|
276
267
|
/** Whether to allow multiple files to be uploaded. */
|
|
277
268
|
multiple?: boolean;
|
|
278
269
|
}
|
|
279
270
|
|
|
280
|
-
declare const FileUpload: React
|
|
271
|
+
declare const FileUpload: React.ForwardRefExoticComponent<FileUploadProps & React.RefAttributes<HTMLLabelElement>>;
|
|
281
272
|
|
|
282
273
|
interface SeparatorProps extends Omit<SeparatorProps$1, "elementType">, StylingProps {
|
|
283
274
|
/**
|
|
@@ -288,7 +279,7 @@ interface SeparatorProps extends Omit<SeparatorProps$1, "elementType">, StylingP
|
|
|
288
279
|
variant?: "primary" | "secondary";
|
|
289
280
|
}
|
|
290
281
|
|
|
291
|
-
declare const Separator: React
|
|
282
|
+
declare const Separator: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
292
283
|
|
|
293
284
|
interface ProgressBarProps extends Omit<AriaProgressBarProps, "isIndeterminate"> {
|
|
294
285
|
/** The `className` property assigned to the root element of the component. */
|
|
@@ -311,7 +302,7 @@ interface ProgressBarProps extends Omit<AriaProgressBarProps, "isIndeterminate">
|
|
|
311
302
|
errorMessage?: string;
|
|
312
303
|
}
|
|
313
304
|
|
|
314
|
-
declare const ProgressBar: React
|
|
305
|
+
declare const ProgressBar: React.ForwardRefExoticComponent<ProgressBarProps & React.RefAttributes<HTMLDivElement>>;
|
|
315
306
|
|
|
316
307
|
interface InputMessage {
|
|
317
308
|
/** The description to display below the input. */
|
|
@@ -339,29 +330,29 @@ interface TextInputProps extends Omit<AriaTextFieldProps, "validationState" | "i
|
|
|
339
330
|
/** Whether the input is read only. */
|
|
340
331
|
readOnly?: boolean;
|
|
341
332
|
/** The style object to apply to the input element */
|
|
342
|
-
inputStyle?: React
|
|
333
|
+
inputStyle?: React.CSSProperties;
|
|
343
334
|
/** The class name to apply to the input element */
|
|
344
335
|
inputClassName?: string;
|
|
345
336
|
}
|
|
346
337
|
|
|
347
|
-
declare const TextInput: React
|
|
338
|
+
declare const TextInput: React.ForwardRefExoticComponent<TextInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
348
339
|
|
|
349
|
-
interface ReactionProps extends Omit<AriaSwitchProps & ToggleProps, "validationState" | "isRequired" | "children" | "isInvalid">, StylingProps {
|
|
340
|
+
interface ReactionProps extends Omit<AriaSwitchProps & ToggleProps, "validationState" | "isRequired" | "children" | "isInvalid" | "validationBehavior" | "validate" | "onKeyUp">, StylingProps {
|
|
350
341
|
/** The size of the reaction. */
|
|
351
|
-
size?: "
|
|
342
|
+
size?: "sm" | "md";
|
|
352
343
|
/** The number of reactions. */
|
|
353
344
|
count: number;
|
|
354
345
|
/** The icon to render. */
|
|
355
|
-
icon?: React
|
|
346
|
+
icon?: React.FC<IconProps>;
|
|
356
347
|
}
|
|
357
348
|
|
|
358
|
-
declare const Reaction: React
|
|
349
|
+
declare const Reaction: React.ForwardRefExoticComponent<ReactionProps & React.RefAttributes<HTMLLabelElement>>;
|
|
359
350
|
|
|
360
351
|
interface TooltipProps extends TooltipTriggerProps, AriaTooltipProps, Omit<AriaPositionProps, "overlayRef" | "targetRef" | "maxHeight" | "isOpen" | "arrowSize"> {
|
|
361
352
|
/** The content of the tooltip. */
|
|
362
353
|
text?: string;
|
|
363
354
|
/** The tooltip trigger element. */
|
|
364
|
-
children: React
|
|
355
|
+
children: React.ReactNode;
|
|
365
356
|
/**
|
|
366
357
|
* The delay time for the tooltip to show up.
|
|
367
358
|
*
|
|
@@ -376,14 +367,14 @@ interface TooltipProps extends TooltipTriggerProps, AriaTooltipProps, Omit<AriaP
|
|
|
376
367
|
closeDelay?: number;
|
|
377
368
|
}
|
|
378
369
|
|
|
379
|
-
declare const Tooltip: React
|
|
370
|
+
declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLDivElement>>;
|
|
380
371
|
|
|
381
372
|
interface PortalProps extends OverlayProps {
|
|
382
373
|
/** The `className` property assigned to the root element of the component. */
|
|
383
374
|
className?: string;
|
|
384
375
|
}
|
|
385
376
|
|
|
386
|
-
declare const Portal: React
|
|
377
|
+
declare const Portal: React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<HTMLDivElement>>;
|
|
387
378
|
|
|
388
379
|
interface ProgressSpinnerProps extends Omit<AriaProgressBarProps, "value" | "isIndeterminate" | "formatOptions" | "maxValue" | "minValue" | "valueLabel">, StylingProps {
|
|
389
380
|
/**
|
|
@@ -400,11 +391,11 @@ interface ProgressSpinnerProps extends Omit<AriaProgressBarProps, "value" | "isI
|
|
|
400
391
|
variant?: "active" | "inactive" | "success" | "error";
|
|
401
392
|
}
|
|
402
393
|
|
|
403
|
-
declare const ProgressSpinner: React
|
|
394
|
+
declare const ProgressSpinner: React.ForwardRefExoticComponent<ProgressSpinnerProps & React.RefAttributes<HTMLDivElement>>;
|
|
404
395
|
|
|
405
396
|
interface ActionIconButtonProps extends ActionButtonSharedProps {
|
|
406
397
|
/** The icon to display */
|
|
407
|
-
icon: React
|
|
398
|
+
icon: React.FC<IconProps>;
|
|
408
399
|
/**
|
|
409
400
|
* The size of the icon button.
|
|
410
401
|
*
|
|
@@ -419,13 +410,13 @@ interface ActionIconButtonProps extends ActionButtonSharedProps {
|
|
|
419
410
|
variant?: "primary" | "secondary" | "tertiary";
|
|
420
411
|
}
|
|
421
412
|
|
|
422
|
-
declare const ActionIconButton: React
|
|
413
|
+
declare const ActionIconButton: React.ForwardRefExoticComponent<ActionIconButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
423
414
|
|
|
424
|
-
interface ToggleButtonProps extends StylingProps, Omit<AriaToggleButtonProps, "
|
|
415
|
+
interface ToggleButtonProps extends StylingProps, Omit<AriaToggleButtonProps, "children"> {
|
|
425
416
|
/** The text content of the button. */
|
|
426
|
-
label:
|
|
417
|
+
label: React.ReactNode;
|
|
427
418
|
/** The icon to display before the label. */
|
|
428
|
-
iconStart?: React
|
|
419
|
+
iconStart?: React.FC<SVGRProps>;
|
|
429
420
|
/**
|
|
430
421
|
* In case the button is being used as a trigger for a popover, this prop will
|
|
431
422
|
* determine the direction of caret in which the popover will be displayed.
|
|
@@ -441,9 +432,9 @@ interface ToggleButtonProps extends StylingProps, Omit<AriaToggleButtonProps, "t
|
|
|
441
432
|
size?: "md" | "lg";
|
|
442
433
|
}
|
|
443
434
|
|
|
444
|
-
declare const ToggleButton: React
|
|
435
|
+
declare const ToggleButton: React.ForwardRefExoticComponent<ToggleButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
445
436
|
|
|
446
|
-
interface CheckboxProps extends
|
|
437
|
+
interface CheckboxProps extends Omit<AriaCheckboxProps, "children" | "validationBehavior" | "validationState" | "validate">, StylingProps {
|
|
447
438
|
/** The checkbox's label. */
|
|
448
439
|
label?: string;
|
|
449
440
|
/**
|
|
@@ -454,9 +445,9 @@ interface CheckboxProps extends AriaCheckboxProps, Omit<ToggleProps, "children">
|
|
|
454
445
|
labelPosition?: "start" | "end";
|
|
455
446
|
}
|
|
456
447
|
|
|
457
|
-
declare const Checkbox: React
|
|
448
|
+
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLLabelElement>>;
|
|
458
449
|
|
|
459
|
-
type Excluded = "isDisabled" | "isReadOnly" | "isRequired" | "locale" | "validationState" | "label" | "formatOptions" | "isInvalid";
|
|
450
|
+
type Excluded = "isDisabled" | "isReadOnly" | "isRequired" | "locale" | "validationState" | "label" | "formatOptions" | "isInvalid" | "validationBehaviour" | "validate" | "description" | "errorMessage";
|
|
460
451
|
interface PaginationProps extends Omit<AriaNumberFieldProps, Excluded>, Omit<NumberFieldStateOptions, Excluded>, StylingProps {
|
|
461
452
|
/** The largest value allowed for the input. */
|
|
462
453
|
maxValue: number;
|
|
@@ -476,34 +467,34 @@ interface PaginationProps extends Omit<AriaNumberFieldProps, Excluded>, Omit<Num
|
|
|
476
467
|
size?: "xs" | "sm" | "md" | "lg";
|
|
477
468
|
}
|
|
478
469
|
|
|
479
|
-
declare const Pagination: React
|
|
470
|
+
declare const Pagination: React.ForwardRefExoticComponent<PaginationProps & React.RefAttributes<HTMLDivElement>>;
|
|
480
471
|
|
|
481
472
|
interface I18nProviderProps extends I18nProviderProps$1 {
|
|
482
473
|
/** The messages to use for internationalization. */
|
|
483
474
|
messages?: LocalizedStrings;
|
|
484
475
|
}
|
|
485
476
|
|
|
486
|
-
declare const I18nProvider: React
|
|
477
|
+
declare const I18nProvider: React.FC<I18nProviderProps>;
|
|
487
478
|
|
|
488
479
|
type NumberFormatProps = Parameters<typeof useNumberFormatter>[0] & {
|
|
489
480
|
/** The number to format. */
|
|
490
481
|
value: number;
|
|
491
482
|
};
|
|
492
483
|
|
|
493
|
-
declare const NumberFormat: React
|
|
484
|
+
declare const NumberFormat: React.FC<NumberFormatProps>;
|
|
494
485
|
|
|
495
486
|
type DateFormatProps = Parameters<typeof useDateFormatter>[0] & {
|
|
496
487
|
/** The date to format. */
|
|
497
488
|
date: Date;
|
|
498
489
|
};
|
|
499
490
|
|
|
500
|
-
declare const DateFormat: React
|
|
491
|
+
declare const DateFormat: React.FC<DateFormatProps>;
|
|
501
492
|
|
|
502
493
|
type Item = {
|
|
503
494
|
id: string;
|
|
504
495
|
label: string;
|
|
505
496
|
variant?: "neutral" | "red" | "green" | "blue" | "high-contrast";
|
|
506
|
-
icon?: React
|
|
497
|
+
icon?: React.FC<SVGRProps>;
|
|
507
498
|
};
|
|
508
499
|
interface TagGroupProps extends StylingProps, Omit<AriaTagGroupProps<Item>, "children" | "errorMessage" | "description">, Omit<ListProps<Item>, "children" | "collection" | "filter"> {
|
|
509
500
|
/**
|
|
@@ -523,7 +514,7 @@ interface TagGroupProps extends StylingProps, Omit<AriaTagGroupProps<Item>, "chi
|
|
|
523
514
|
"aria-label": string;
|
|
524
515
|
}
|
|
525
516
|
|
|
526
|
-
declare const TagGroup: React
|
|
517
|
+
declare const TagGroup: React.ForwardRefExoticComponent<TagGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
527
518
|
|
|
528
519
|
interface AccordionProps extends StylingProps {
|
|
529
520
|
/**
|
|
@@ -537,7 +528,7 @@ interface AccordionProps extends StylingProps {
|
|
|
537
528
|
/** This callback is called when the expanded state of the accordion changes. */
|
|
538
529
|
onChange?: (value: Set<Key>) => void;
|
|
539
530
|
/** The children of the accordion. Each child should be an `AccordionItem`. */
|
|
540
|
-
children: React
|
|
531
|
+
children: React.ReactNode;
|
|
541
532
|
/** The keys of the items that should be expanded by default. */
|
|
542
533
|
defaultExpandedKeys?: Set<Key>;
|
|
543
534
|
/**
|
|
@@ -582,7 +573,7 @@ interface AccordionItemProps extends StylingProps {
|
|
|
582
573
|
*/
|
|
583
574
|
showActionsOnTriggerOnly?: boolean;
|
|
584
575
|
/** The content of the accordion item. */
|
|
585
|
-
children: React
|
|
576
|
+
children: React.ReactNode;
|
|
586
577
|
/** The key of the accordion item. */
|
|
587
578
|
value: Key;
|
|
588
579
|
/**
|
|
@@ -592,15 +583,15 @@ interface AccordionItemProps extends StylingProps {
|
|
|
592
583
|
subLabel?: string;
|
|
593
584
|
}
|
|
594
585
|
|
|
595
|
-
declare const Accordion: React
|
|
586
|
+
declare const Accordion: React.ForwardRefExoticComponent<AccordionProps & React.RefAttributes<HTMLDivElement>>;
|
|
596
587
|
|
|
597
|
-
declare const AccordionItem: React
|
|
588
|
+
declare const AccordionItem: React.ForwardRefExoticComponent<AccordionItemProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
598
589
|
|
|
599
590
|
type ListOption = {
|
|
600
591
|
id: string;
|
|
601
592
|
label: string;
|
|
602
593
|
description?: string;
|
|
603
|
-
icon?: React
|
|
594
|
+
icon?: React.FC<IconProps>;
|
|
604
595
|
/**
|
|
605
596
|
* The type of item.
|
|
606
597
|
*
|
|
@@ -615,7 +606,7 @@ type ListSection = {
|
|
|
615
606
|
children: ListOption[];
|
|
616
607
|
};
|
|
617
608
|
type ListItem = ListOption | ListSection;
|
|
618
|
-
interface ListBoxProps extends StylingProps,
|
|
609
|
+
interface ListBoxProps extends StylingProps, Omit<AriaListBoxProps<ListItem> & AriaListBoxOptions<ListItem>, "children" | "linkBehavior" | "isVirtualized"> {
|
|
619
610
|
/**
|
|
620
611
|
* The items to render in the listbox. Items have the following shape:
|
|
621
612
|
*
|
|
@@ -644,11 +635,11 @@ interface ListBoxProps extends StylingProps, AriaListBoxOptions<ListItem>, Omit<
|
|
|
644
635
|
* @param options [OptionAria]()
|
|
645
636
|
* @param ref React.RefObject<HTMLLIElement>
|
|
646
637
|
*/
|
|
647
|
-
renderOption?: (item: Node$1<ListItem>, options: OptionAria, ref: React
|
|
638
|
+
renderOption?: (item: Node$1<ListItem>, options: OptionAria, ref: React.RefObject<HTMLLIElement>) => React.ReactNode;
|
|
648
639
|
/** Whether to show the selected checkmark icon. */
|
|
649
640
|
showSelectedIcon?: boolean;
|
|
650
641
|
/** The label for the listbox. */
|
|
651
|
-
label?:
|
|
642
|
+
label?: React.ReactNode;
|
|
652
643
|
/**
|
|
653
644
|
* Whether the items are arranged in a stack or grid.
|
|
654
645
|
*
|
|
@@ -664,7 +655,7 @@ interface ListBoxProps extends StylingProps, AriaListBoxOptions<ListItem>, Omit<
|
|
|
664
655
|
orientation?: Orientation;
|
|
665
656
|
}
|
|
666
657
|
|
|
667
|
-
interface SelectProps extends Omit<AriaSelectOptions<ListItem
|
|
658
|
+
interface SelectProps extends Omit<AriaSelectOptions<ListItem> & SelectStateOptions<ListItem> & PopoverContentProps, "validationState" | "items" | "children" | "isRequired" | "className" | "style" | "triggerRef" | "validate" | "validationBehavior" | "keyboardDelegate">, Pick<ListBoxProps, "items" | "showSelectedIcon">, StylingProps {
|
|
668
659
|
/**
|
|
669
660
|
* The position of the label.
|
|
670
661
|
*
|
|
@@ -678,7 +669,7 @@ interface SelectProps extends Omit<AriaSelectOptions<ListItem>, "validationState
|
|
|
678
669
|
/** The warning message of the select component. */
|
|
679
670
|
warningMessage?: string;
|
|
680
671
|
/** The label of the select component. */
|
|
681
|
-
label?:
|
|
672
|
+
label?: React.ReactNode;
|
|
682
673
|
/** The variant of the select component. */
|
|
683
674
|
variant?: "primary" | "ghost";
|
|
684
675
|
/** The state of the select component. */
|
|
@@ -687,9 +678,9 @@ interface SelectProps extends Omit<AriaSelectOptions<ListItem>, "validationState
|
|
|
687
678
|
isReadOnly?: boolean;
|
|
688
679
|
}
|
|
689
680
|
|
|
690
|
-
declare const Select: React
|
|
681
|
+
declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLDivElement>>;
|
|
691
682
|
|
|
692
|
-
declare const ListBox: React
|
|
683
|
+
declare const ListBox: React.ForwardRefExoticComponent<ListBoxProps & React.RefAttributes<HTMLUListElement>>;
|
|
693
684
|
|
|
694
685
|
interface AvatarProps extends StylingProps {
|
|
695
686
|
/**
|
|
@@ -702,7 +693,7 @@ interface AvatarProps extends StylingProps {
|
|
|
702
693
|
* The icon to display. This icon has to be imported from the
|
|
703
694
|
* `@baseline-ui/icons` package.
|
|
704
695
|
*/
|
|
705
|
-
icon?: React
|
|
696
|
+
icon?: React.FC<SVGRProps>;
|
|
706
697
|
/** The name of the user. */
|
|
707
698
|
name: string;
|
|
708
699
|
/** The URL of the image to display. */
|
|
@@ -720,11 +711,11 @@ interface AvatarProps extends StylingProps {
|
|
|
720
711
|
hasNotifications?: boolean;
|
|
721
712
|
}
|
|
722
713
|
|
|
723
|
-
declare const Avatar: React
|
|
714
|
+
declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
|
|
724
715
|
|
|
725
|
-
type ItemProps = React
|
|
716
|
+
type ItemProps = React.ComponentProps<typeof Item$2> & StylingProps & {
|
|
726
717
|
key?: Key;
|
|
727
|
-
icon?: React
|
|
718
|
+
icon?: React.FC<SVGRProps>;
|
|
728
719
|
value?: string;
|
|
729
720
|
title?: string;
|
|
730
721
|
};
|
|
@@ -743,7 +734,7 @@ type TabsProps = Omit<StylingProps & AriaTabListProps<ItemProps>, "orientation"
|
|
|
743
734
|
* </Tabs>;
|
|
744
735
|
* ```
|
|
745
736
|
*/
|
|
746
|
-
children: React
|
|
737
|
+
children: React.ReactNode;
|
|
747
738
|
/**
|
|
748
739
|
* The key of the tab that needs to be removed.
|
|
749
740
|
*
|
|
@@ -763,30 +754,30 @@ type TabsProps = Omit<StylingProps & AriaTabListProps<ItemProps>, "orientation"
|
|
|
763
754
|
/** The className to apply to the tab header container. */
|
|
764
755
|
tabHeaderClassName?: string;
|
|
765
756
|
/** The style to apply to the tab header container. */
|
|
766
|
-
tabHeaderStyle?: React
|
|
757
|
+
tabHeaderStyle?: React.CSSProperties;
|
|
767
758
|
};
|
|
768
759
|
type TabItemProps = StylingProps & {
|
|
769
760
|
/** The title of the tab. This will be displayed in the tab button. */
|
|
770
761
|
title: string;
|
|
771
762
|
/** The icon to display in front of the title. */
|
|
772
|
-
icon?: React
|
|
763
|
+
icon?: React.FC<SVGRProps>;
|
|
773
764
|
/** The value of the tab. This will be used to identify the tab. */
|
|
774
765
|
value: string;
|
|
775
766
|
};
|
|
776
767
|
|
|
777
|
-
declare const Tabs: React
|
|
778
|
-
children: React
|
|
779
|
-
onRemove?: ((key: React
|
|
768
|
+
declare const Tabs: React.ForwardRefExoticComponent<Omit<StylingProps & react_aria.AriaTabListProps<ItemProps>, "children" | "orientation" | "items" | "disabledKeys" | "selectedKey" | "defaultSelectedKey"> & {
|
|
769
|
+
children: React.ReactNode;
|
|
770
|
+
onRemove?: ((key: React.Key) => void) | undefined;
|
|
780
771
|
selectedValue?: string | undefined;
|
|
781
772
|
defaultSelectedValue?: string | undefined;
|
|
782
|
-
disabledValues?: Set<React
|
|
773
|
+
disabledValues?: Set<React.Key> | undefined;
|
|
783
774
|
actions?: Omit<ActionIconButtonProps, "size" | "variant">[] | undefined;
|
|
784
775
|
variant?: "primary" | "ghost" | undefined;
|
|
785
776
|
tabHeaderClassName?: string | undefined;
|
|
786
|
-
tabHeaderStyle?: React
|
|
787
|
-
} & React
|
|
777
|
+
tabHeaderStyle?: React.CSSProperties | undefined;
|
|
778
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
788
779
|
|
|
789
|
-
declare const TabItem: React
|
|
780
|
+
declare const TabItem: React.FC<TabItemProps>;
|
|
790
781
|
|
|
791
782
|
interface InlineAlertProps extends StylingProps {
|
|
792
783
|
/**
|
|
@@ -826,9 +817,9 @@ interface InlineAlertProps extends StylingProps {
|
|
|
826
817
|
size?: "sm" | "md";
|
|
827
818
|
}
|
|
828
819
|
|
|
829
|
-
declare const InlineAlert: React
|
|
820
|
+
declare const InlineAlert: React.ForwardRefExoticComponent<InlineAlertProps & React.RefAttributes<HTMLDivElement>>;
|
|
830
821
|
|
|
831
|
-
interface NumberInputProps extends StylingProps, Omit<AriaNumberFieldProps, "validationState" | "isRequired"> {
|
|
822
|
+
interface NumberInputProps extends StylingProps, Omit<AriaNumberFieldProps, "validationState" | "isRequired" | "validate" | "validationBehavior"> {
|
|
832
823
|
/**
|
|
833
824
|
* The position of the label relative to the input.
|
|
834
825
|
*
|
|
@@ -853,11 +844,11 @@ interface NumberInputProps extends StylingProps, Omit<AriaNumberFieldProps, "val
|
|
|
853
844
|
errorMessage?: string;
|
|
854
845
|
}
|
|
855
846
|
|
|
856
|
-
declare const NumberInput: React
|
|
847
|
+
declare const NumberInput: React.ForwardRefExoticComponent<NumberInputProps & React.RefAttributes<HTMLDivElement>>;
|
|
857
848
|
|
|
858
849
|
interface DialogProps extends AriaDialogProps, StylingProps {
|
|
859
850
|
/** The children to render. */
|
|
860
|
-
children: React
|
|
851
|
+
children: React.ReactNode;
|
|
861
852
|
/**
|
|
862
853
|
* The size of the dialog. This defines the max width of the dialog.
|
|
863
854
|
*
|
|
@@ -873,12 +864,12 @@ interface DialogProps extends AriaDialogProps, StylingProps {
|
|
|
873
864
|
}
|
|
874
865
|
interface DialogTitleProps extends StylingProps {
|
|
875
866
|
/** The children to render. */
|
|
876
|
-
children: React
|
|
867
|
+
children: React.ReactNode;
|
|
877
868
|
}
|
|
878
869
|
|
|
879
|
-
declare const Dialog: React
|
|
870
|
+
declare const Dialog: React.ForwardRefExoticComponent<DialogProps & React.RefAttributes<HTMLDivElement>>;
|
|
880
871
|
|
|
881
|
-
declare const DialogTitle: React
|
|
872
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<DialogTitleProps & React.RefAttributes<HTMLDivElement>>;
|
|
882
873
|
|
|
883
874
|
interface ColorPreset {
|
|
884
875
|
label: string;
|
|
@@ -921,9 +912,9 @@ interface ColorInputProps extends OverlayTriggerProps, StylingProps, Pick<ColorF
|
|
|
921
912
|
labelPosition?: "top" | "start";
|
|
922
913
|
}
|
|
923
914
|
|
|
924
|
-
declare const ColorInput: React
|
|
915
|
+
declare const ColorInput: React.ForwardRefExoticComponent<ColorInputProps & React.RefAttributes<HTMLDivElement>>;
|
|
925
916
|
|
|
926
|
-
declare const ColorSwatch: React
|
|
917
|
+
declare const ColorSwatch: React.FC<ColorSwatchProps>;
|
|
927
918
|
interface ColorSwatchProps {
|
|
928
919
|
color?: string;
|
|
929
920
|
isFocusVisible?: boolean;
|
|
@@ -936,11 +927,11 @@ interface FreehandCanvasProps extends StylingProps, AriaLabelingProps {
|
|
|
936
927
|
/** The className applicable to the SVG canvas. */
|
|
937
928
|
canvasClassName?: string;
|
|
938
929
|
/** The style applicable to the SVG canvas. */
|
|
939
|
-
canvasStyle?: React
|
|
930
|
+
canvasStyle?: React.CSSProperties;
|
|
940
931
|
/** The className applicable to the footer. */
|
|
941
932
|
footerClassName?: string;
|
|
942
933
|
/** The style applicable to the footer. */
|
|
943
|
-
footerStyle?: React
|
|
934
|
+
footerStyle?: React.CSSProperties;
|
|
944
935
|
/**
|
|
945
936
|
* How much to soften the stroke's edges.
|
|
946
937
|
*
|
|
@@ -1035,9 +1026,9 @@ interface FreehandCanvasProps extends StylingProps, AriaLabelingProps {
|
|
|
1035
1026
|
description?: string;
|
|
1036
1027
|
}
|
|
1037
1028
|
|
|
1038
|
-
declare const FreehandCanvas: React
|
|
1029
|
+
declare const FreehandCanvas: React.ForwardRefExoticComponent<FreehandCanvasProps & React.RefAttributes<HTMLDivElement>>;
|
|
1039
1030
|
|
|
1040
|
-
type TextProps<T extends keyof React
|
|
1031
|
+
type TextProps<T extends keyof React.JSX.IntrinsicElements = "span"> = StylingProps & React.ComponentProps<T> & {
|
|
1041
1032
|
/**
|
|
1042
1033
|
* The type of text to render.
|
|
1043
1034
|
*
|
|
@@ -1051,26 +1042,26 @@ type TextProps<T extends keyof React$1.JSX.IntrinsicElements = "span"> = Styling
|
|
|
1051
1042
|
*/
|
|
1052
1043
|
size?: "sm" | "md" | "lg";
|
|
1053
1044
|
/** The text to render. Can be a string or a number. */
|
|
1054
|
-
children: React
|
|
1045
|
+
children: React.ReactNode;
|
|
1055
1046
|
/**
|
|
1056
1047
|
* The HTML element to render.
|
|
1057
1048
|
*
|
|
1058
1049
|
* @default "span"
|
|
1059
1050
|
*/
|
|
1060
|
-
elementType?: React
|
|
1051
|
+
elementType?: React.ElementType;
|
|
1061
1052
|
};
|
|
1062
1053
|
|
|
1063
|
-
declare const Text: React
|
|
1054
|
+
declare const Text: React.ForwardRefExoticComponent<Pick<TextProps, "color" | "size" | "content" | "translate" | "hidden" | "style" | "onKeyUp" | "rel" | "children" | "autoFocus" | "onFocus" | "onBlur" | "onKeyDown" | "elementType" | "aria-expanded" | "aria-haspopup" | "aria-controls" | "aria-pressed" | "type" | "id" | "aria-label" | "aria-labelledby" | "aria-describedby" | "aria-details" | "slot" | "title" | "className" | "data-blockid" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-current" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-flowto" | "aria-grabbed" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key"> & React.RefAttributes<HTMLDivElement>>;
|
|
1064
1055
|
|
|
1065
1056
|
type TransformProps = {
|
|
1066
1057
|
/** The `className` property assigned to the root element of the component. */
|
|
1067
1058
|
className?: string;
|
|
1068
1059
|
/** The `style` property assigned to the root element of the component. */
|
|
1069
|
-
style?: React
|
|
1060
|
+
style?: React.CSSProperties;
|
|
1070
1061
|
/** The children to render. */
|
|
1071
1062
|
children: (options: {
|
|
1072
|
-
style: React
|
|
1073
|
-
}) => React
|
|
1063
|
+
style: React.CSSProperties;
|
|
1064
|
+
}) => React.ReactNode;
|
|
1074
1065
|
/** Whether the transform is draggable. */
|
|
1075
1066
|
isDraggable?: boolean;
|
|
1076
1067
|
/** Whether the transform is resizable. */
|
|
@@ -1106,7 +1097,7 @@ type TransformProps = {
|
|
|
1106
1097
|
/** A callback that will be called when the target is snapped. */
|
|
1107
1098
|
onSnap?: (e: OnSnap) => void;
|
|
1108
1099
|
/** A callback that will be called when the child is double clicked. */
|
|
1109
|
-
onDoubleClick?: (e: React
|
|
1100
|
+
onDoubleClick?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
1110
1101
|
/** A list of selectors relative to which the guidelines will be rendered. */
|
|
1111
1102
|
elementGuidelines?: string[];
|
|
1112
1103
|
/**
|
|
@@ -1141,9 +1132,9 @@ type TransformProps = {
|
|
|
1141
1132
|
/** Whether the transform should be updated automatically. */
|
|
1142
1133
|
autoUpdate?: boolean;
|
|
1143
1134
|
/** The element ref, selector or element to which the transform will be bound. */
|
|
1144
|
-
bound?: React
|
|
1135
|
+
bound?: React.RefObject<HTMLElement> | string | HTMLElement;
|
|
1145
1136
|
/** The element ref, selector or element that is it's scrollable ancestor. */
|
|
1146
|
-
scrollableAncestor?: React
|
|
1137
|
+
scrollableAncestor?: React.RefObject<HTMLElement> | string | HTMLElement;
|
|
1147
1138
|
/**
|
|
1148
1139
|
* Whether to prevent bubbling of events like mousedown, touchstart, etc.
|
|
1149
1140
|
*
|
|
@@ -1164,7 +1155,7 @@ type TransformProps = {
|
|
|
1164
1155
|
transformOrigin?: Array<string | number> | string | "";
|
|
1165
1156
|
};
|
|
1166
1157
|
|
|
1167
|
-
declare const Transform: React
|
|
1158
|
+
declare const Transform: React.ForwardRefExoticComponent<TransformProps & React.RefAttributes<HTMLDivElement>>;
|
|
1168
1159
|
|
|
1169
1160
|
interface ImageDropZoneProps extends Omit<SharedFileUploadProps, "label" | "variant">, Omit<DropOptions, "ref" | "getDropOperation" | "hasDropButton" | "getDropOperationForPoint">, Omit<ClipboardProps, "getItems" | "onCut" | "onCopy">, AriaLabelingProps {
|
|
1170
1161
|
/**
|
|
@@ -1199,7 +1190,7 @@ interface ImageDropZoneProps extends Omit<SharedFileUploadProps, "label" | "vari
|
|
|
1199
1190
|
isInline?: boolean;
|
|
1200
1191
|
}
|
|
1201
1192
|
|
|
1202
|
-
declare const ImageDropZone: React
|
|
1193
|
+
declare const ImageDropZone: React.ForwardRefExoticComponent<ImageDropZoneProps & React.RefAttributes<HTMLLabelElement>>;
|
|
1203
1194
|
|
|
1204
1195
|
interface PreviewProps extends StylingProps, AriaLabelingProps {
|
|
1205
1196
|
/**
|
|
@@ -1217,7 +1208,7 @@ interface PreviewProps extends StylingProps, AriaLabelingProps {
|
|
|
1217
1208
|
/** The alt text for the image. */
|
|
1218
1209
|
imageAlt?: string;
|
|
1219
1210
|
/** The SVG to display in the preview. This can be a React element or a string. */
|
|
1220
|
-
svgSrc?: string | React
|
|
1211
|
+
svgSrc?: string | React.ReactElement;
|
|
1221
1212
|
/** Whether the preview should be disabled or not. */
|
|
1222
1213
|
isDisabled?: boolean;
|
|
1223
1214
|
/**
|
|
@@ -1229,12 +1220,18 @@ interface PreviewProps extends StylingProps, AriaLabelingProps {
|
|
|
1229
1220
|
/** The text to display in the preview. */
|
|
1230
1221
|
textValue?: string;
|
|
1231
1222
|
/** The style of the text. */
|
|
1232
|
-
textStyle?: React
|
|
1223
|
+
textStyle?: React.CSSProperties;
|
|
1224
|
+
/**
|
|
1225
|
+
* This is fired when the `actionButtons` are not passed and you trigger a
|
|
1226
|
+
* `click` event on the preview. In case you have passed `actionButtons`, this
|
|
1227
|
+
* is not fired as focus shifts to the action buttons.
|
|
1228
|
+
*/
|
|
1229
|
+
onPress?: PressProps["onPress"];
|
|
1233
1230
|
}
|
|
1234
1231
|
|
|
1235
|
-
declare const Preview: React
|
|
1232
|
+
declare const Preview: React.ForwardRefExoticComponent<PreviewProps & React.RefAttributes<HTMLDivElement>>;
|
|
1236
1233
|
|
|
1237
|
-
interface RadioGroupProps extends StylingProps, Omit<AriaRadioGroupProps, "description" | "errorMessage" | "isRequired"> {
|
|
1234
|
+
interface RadioGroupProps extends StylingProps, Omit<AriaRadioGroupProps, "description" | "errorMessage" | "isRequired" | "isInvalid" | "validate" | "validationBehavior" | "validationState"> {
|
|
1238
1235
|
/**
|
|
1239
1236
|
* The position of the label relative to the input.
|
|
1240
1237
|
*
|
|
@@ -1278,11 +1275,12 @@ interface RadioGroupProps extends StylingProps, Omit<AriaRadioGroupProps, "descr
|
|
|
1278
1275
|
isHovered: boolean;
|
|
1279
1276
|
isDisabled: boolean;
|
|
1280
1277
|
optionLabelPosition: "start" | "end";
|
|
1281
|
-
|
|
1278
|
+
isReadOnly?: boolean;
|
|
1279
|
+
}) => React.ReactNode;
|
|
1282
1280
|
/** The class name for the group container. */
|
|
1283
|
-
|
|
1281
|
+
optionsContainerClassName?: string;
|
|
1284
1282
|
/** The style for the group container. */
|
|
1285
|
-
|
|
1283
|
+
optionsContainerStyle?: React.CSSProperties;
|
|
1286
1284
|
/** The ids of the items that are disabled. */
|
|
1287
1285
|
disabledValues?: string[];
|
|
1288
1286
|
/**
|
|
@@ -1292,28 +1290,28 @@ interface RadioGroupProps extends StylingProps, Omit<AriaRadioGroupProps, "descr
|
|
|
1292
1290
|
*/
|
|
1293
1291
|
optionLabelPosition?: "start" | "end";
|
|
1294
1292
|
/** The className applicable to the label. */
|
|
1295
|
-
|
|
1293
|
+
optionClassName?: string;
|
|
1296
1294
|
/** The style applicable to the label. */
|
|
1297
|
-
|
|
1295
|
+
optionStyle?: React.CSSProperties;
|
|
1298
1296
|
}
|
|
1299
1297
|
|
|
1300
|
-
declare const RadioGroup: React
|
|
1298
|
+
declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
1301
1299
|
|
|
1302
1300
|
interface ModalProps extends OverlayTriggerProps {
|
|
1303
1301
|
}
|
|
1304
1302
|
interface ModalContentProps extends AriaModalOverlayProps, StylingProps {
|
|
1305
|
-
children: React
|
|
1303
|
+
children: React.ReactNode | ((props: {
|
|
1306
1304
|
close: () => void;
|
|
1307
|
-
}) => React
|
|
1305
|
+
}) => React.ReactNode);
|
|
1308
1306
|
}
|
|
1309
1307
|
|
|
1310
|
-
declare const Modal: React
|
|
1308
|
+
declare const Modal: React.FC<ModalProps>;
|
|
1311
1309
|
|
|
1312
|
-
declare const ModalContent: React
|
|
1310
|
+
declare const ModalContent: React.FC<ModalContentProps>;
|
|
1313
1311
|
|
|
1314
|
-
declare const ModalTrigger: React
|
|
1312
|
+
declare const ModalTrigger: React.FC;
|
|
1315
1313
|
|
|
1316
|
-
declare const ModalClose: React
|
|
1314
|
+
declare const ModalClose: React.FC;
|
|
1317
1315
|
|
|
1318
1316
|
interface MessageFormatProps {
|
|
1319
1317
|
/**
|
|
@@ -1322,14 +1320,14 @@ interface MessageFormatProps {
|
|
|
1322
1320
|
* it with another React element (recommended), specify a different tagName
|
|
1323
1321
|
* (e.g., 'div')
|
|
1324
1322
|
*/
|
|
1325
|
-
elementType?: React
|
|
1323
|
+
elementType?: React.ElementType | "div" | "span";
|
|
1326
1324
|
/** The id of the message to format. */
|
|
1327
1325
|
id: string;
|
|
1328
1326
|
/** The default message to use if the message id is not found. */
|
|
1329
1327
|
defaultMessage?: string;
|
|
1330
1328
|
}
|
|
1331
1329
|
|
|
1332
|
-
declare const MessageFormat: React
|
|
1330
|
+
declare const MessageFormat: React.FC<MessageFormatProps>;
|
|
1333
1331
|
|
|
1334
1332
|
interface GroupProps extends StylingProps, AriaLabelingProps {
|
|
1335
1333
|
/**
|
|
@@ -1348,10 +1346,10 @@ interface GroupProps extends StylingProps, AriaLabelingProps {
|
|
|
1348
1346
|
children: React.ReactNode;
|
|
1349
1347
|
}
|
|
1350
1348
|
|
|
1351
|
-
declare const Group: React
|
|
1349
|
+
declare const Group: React.ForwardRefExoticComponent<GroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
1352
1350
|
|
|
1353
1351
|
type SprinkleProps = Parameters<Sprinkles>[0];
|
|
1354
|
-
interface BoxProps extends Pick<StylingProps, "data-blockid">, Omit<React
|
|
1352
|
+
interface BoxProps extends Pick<StylingProps, "data-blockid">, Omit<React.ComponentPropsWithoutRef<"div">, "color">, SprinkleProps {
|
|
1355
1353
|
/**
|
|
1356
1354
|
* The HTML element to use for the box.
|
|
1357
1355
|
*
|
|
@@ -1360,7 +1358,13 @@ interface BoxProps extends Pick<StylingProps, "data-blockid">, Omit<React$1.Comp
|
|
|
1360
1358
|
elementType?: string;
|
|
1361
1359
|
}
|
|
1362
1360
|
|
|
1363
|
-
declare const Box: React
|
|
1361
|
+
declare const Box: React.ForwardRefExoticComponent<BoxProps & React.RefAttributes<HTMLDivElement>>;
|
|
1362
|
+
|
|
1363
|
+
interface ColorPresetInlineInputProps extends Omit<RadioGroupProps, "items" | "disabledValues"> {
|
|
1364
|
+
items: ColorPreset[];
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
declare const ColorPresetInlineInput: React.ForwardRefExoticComponent<ColorPresetInlineInputProps & React.RefAttributes<HTMLDivElement>>;
|
|
1364
1368
|
|
|
1365
1369
|
/**
|
|
1366
1370
|
* A hook that creates an IntersectionObserver and observes a target element.
|
|
@@ -1398,9 +1402,9 @@ declare const Box: React$1.ForwardRefExoticComponent<BoxProps & React$1.RefAttri
|
|
|
1398
1402
|
*/
|
|
1399
1403
|
declare function useIntersectionObserver({ ref, onIntersect, isDisabled, threshold, rootMargin, root, }: IntersectionObserverOptions): void;
|
|
1400
1404
|
interface IntersectionObserverOptions {
|
|
1401
|
-
ref: React
|
|
1405
|
+
ref: React.RefObject<HTMLElement>;
|
|
1402
1406
|
onIntersect: (entry: IntersectionObserverEntry) => void;
|
|
1403
|
-
root?: React
|
|
1407
|
+
root?: React.RefObject<HTMLElement>;
|
|
1404
1408
|
rootMargin?: string;
|
|
1405
1409
|
threshold?: number;
|
|
1406
1410
|
isDisabled?: boolean;
|
|
@@ -1439,7 +1443,7 @@ declare function useResizeObserver({ ref, onResize, isDisabled, }: ResizeObserve
|
|
|
1439
1443
|
} | undefined;
|
|
1440
1444
|
};
|
|
1441
1445
|
interface ResizeObserverOptions {
|
|
1442
|
-
ref: React
|
|
1446
|
+
ref: React.RefObject<HTMLElement>;
|
|
1443
1447
|
onResize?: (entry: ResizeObserverEntry) => void;
|
|
1444
1448
|
isDisabled?: boolean;
|
|
1445
1449
|
}
|
|
@@ -1672,10 +1676,10 @@ declare function useLocalStorage<T>(key: string, initialValue: T): [T, SetValue<
|
|
|
1672
1676
|
*/
|
|
1673
1677
|
declare function useTextSelection({ ref, onSelectionChange, onSelectionEnd, isDisabled, }: TextSelectionProps): void;
|
|
1674
1678
|
interface TextSelectionProps {
|
|
1675
|
-
ref: React
|
|
1679
|
+
ref: React.RefObject<HTMLElement>;
|
|
1676
1680
|
onSelectionChange: (selection: Selection) => void;
|
|
1677
1681
|
onSelectionEnd?: (selection: Selection) => void;
|
|
1678
1682
|
isDisabled?: boolean;
|
|
1679
1683
|
}
|
|
1680
1684
|
|
|
1681
|
-
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionButton, type ActionButtonProps, ActionIconButton, type ActionIconButtonProps, Avatar, type AvatarProps, type BlockProps, Box, type BoxProps, Checkbox, type CheckboxProps, ColorInput, type ColorInputProps, type ColorPreset, ColorSwatch, DateFormat, type DateFormatProps, Dialog, type DialogProps, DialogTitle, type DialogTitleProps, DomNodeRenderer, type DomNodeRendererProps, FileUpload, type FileUploadProps, FreehandCanvas, type FreehandCanvasProps, Group, type GroupProps, I18nProvider, type I18nResult, ImageDropZone, type ImageDropZoneProps, InlineAlert, type InlineAlertProps, Link, type LinkProps, ListBox, type ListBoxProps, type ListOption, Menu, type MenuProps, type MessageDescriptor, MessageFormat, type MessageFormatProps, Modal, ModalClose, ModalContent, type ModalContentProps, type ModalProps, ModalTrigger, NumberFormat, type NumberFormatProps, NumberInput, type NumberInputProps, Pagination, type PaginationProps, Portal, type PortalProps, Preview, type PreviewProps, ProgressBar, type ProgressBarProps, ProgressSpinner, type ProgressSpinnerProps, RadioGroup, type RadioGroupProps, Reaction, type ReactionProps, SearchInput, type SearchInputProps, Select, type SelectProps, Separator, type SeparatorProps, Slider, type SliderProps, type StylingProps, Switch, type SwitchProps, TabItem, type TabItemProps, Tabs, type TabsProps, TagGroup, type TagGroupProps, Text, TextInput, type TextInputProps, type TextProps, ThemeProvider, type ThemeProviderProps, ToggleButton, type ToggleButtonProps, Tooltip, type TooltipProps, Transform, type TransformProps, defineMessages, useI18n, useImage, useIntersectionObserver, useIsFirstRender, useLocalStorage, useMutationObserver, useResizeObserver, useTextSelection, useUndoRedo, useUserPreferences };
|
|
1685
|
+
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionButton, type ActionButtonProps, ActionIconButton, type ActionIconButtonProps, Avatar, type AvatarProps, type BlockProps, Box, type BoxProps, Checkbox, type CheckboxProps, ColorInput, type ColorInputProps, type ColorPreset, ColorPresetInlineInput, type ColorPresetInlineInputProps, ColorSwatch, DateFormat, type DateFormatProps, Dialog, type DialogProps, DialogTitle, type DialogTitleProps, DomNodeRenderer, type DomNodeRendererProps, FileUpload, type FileUploadProps, FreehandCanvas, type FreehandCanvasProps, Group, type GroupProps, I18nProvider, type I18nResult, ImageDropZone, type ImageDropZoneProps, InlineAlert, type InlineAlertProps, Link, type LinkProps, ListBox, type ListBoxProps, type ListOption, Menu, type MenuProps, type MessageDescriptor, MessageFormat, type MessageFormatProps, Modal, ModalClose, ModalContent, type ModalContentProps, type ModalProps, ModalTrigger, NumberFormat, type NumberFormatProps, NumberInput, type NumberInputProps, Pagination, type PaginationProps, Portal, type PortalProps, Preview, type PreviewProps, ProgressBar, type ProgressBarProps, ProgressSpinner, type ProgressSpinnerProps, RadioGroup, type RadioGroupProps, Reaction, type ReactionProps, SearchInput, type SearchInputProps, Select, type SelectProps, Separator, type SeparatorProps, Slider, type SliderProps, type StylingProps, Switch, type SwitchProps, TabItem, type TabItemProps, Tabs, type TabsProps, TagGroup, type TagGroupProps, Text, TextInput, type TextInputProps, type TextProps, ThemeProvider, type ThemeProviderProps, ToggleButton, type ToggleButtonProps, Tooltip, type TooltipProps, Transform, type TransformProps, defineMessages, useI18n, useImage, useIntersectionObserver, useIsFirstRender, useLocalStorage, useMutationObserver, useResizeObserver, useTextSelection, useUndoRedo, useUserPreferences };
|