@baseline-ui/core 0.1.3 → 0.3.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 +164 -139
- package/dist/index.d.ts +164 -139
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +12 -12
package/dist/index.d.mts
CHANGED
|
@@ -1,19 +1,15 @@
|
|
|
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, AriaListBoxOptions, AriaListBoxProps, OptionAria, AriaSelectOptions, AriaDialogProps, DropOptions, ClipboardProps, AriaRadioGroupProps, AriaModalOverlayProps, Locale } 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, AriaListBoxOptions, AriaListBoxProps, 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
|
-
import { Theme } from '@baseline-ui/tokens';
|
|
7
|
+
import { Theme, Sprinkles } from '@baseline-ui/tokens';
|
|
8
8
|
import { Node as Node$1, AriaLabelingProps } from '@react-types/shared';
|
|
9
9
|
import { AriaTabListProps } from '@react-types/tabs';
|
|
10
10
|
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
|
-
declare function assignInlineTheme(theme: Theme): {
|
|
14
|
-
[cssVarName: string]: string;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
13
|
interface BlockProps {
|
|
18
14
|
"data-blockid"?: string;
|
|
19
15
|
}
|
|
@@ -23,16 +19,10 @@ interface StylingProps extends BlockProps {
|
|
|
23
19
|
className?: string;
|
|
24
20
|
|
|
25
21
|
/** The style applied to the root element of the component. */
|
|
26
|
-
style?: React
|
|
22
|
+
style?: React.CSSProperties;
|
|
27
23
|
}
|
|
28
24
|
|
|
29
|
-
interface ActionButtonSharedProps extends Omit<AriaButtonProps<"button" | "div">, "onKeyUp" | "rel" | "href" | "target">, StylingProps {
|
|
30
|
-
/**
|
|
31
|
-
* Handler that is called when the element receives or loses focus.
|
|
32
|
-
*
|
|
33
|
-
* @param isHovered
|
|
34
|
-
*/
|
|
35
|
-
onHoverChange?: (isHovered: boolean) => void;
|
|
25
|
+
interface ActionButtonSharedProps extends Omit<AriaButtonProps<"button" | "div">, "onKeyUp" | "rel" | "href" | "target" | "children">, StylingProps {
|
|
36
26
|
}
|
|
37
27
|
interface ActionButtonProps extends ActionButtonSharedProps {
|
|
38
28
|
/**
|
|
@@ -42,11 +32,11 @@ interface ActionButtonProps extends ActionButtonSharedProps {
|
|
|
42
32
|
*/
|
|
43
33
|
variant?: "primary" | "secondary" | "tertiary" | "ghost";
|
|
44
34
|
/** The button's label. */
|
|
45
|
-
label:
|
|
35
|
+
label: React.ReactNode;
|
|
46
36
|
/** The button's icon before the label. */
|
|
47
|
-
iconStart?: React
|
|
37
|
+
iconStart?: React.FC<IconProps>;
|
|
48
38
|
/** The button's icon after the label. */
|
|
49
|
-
iconEnd?: React
|
|
39
|
+
iconEnd?: React.FC<IconProps>;
|
|
50
40
|
/**
|
|
51
41
|
* The button's size.
|
|
52
42
|
*
|
|
@@ -55,7 +45,7 @@ interface ActionButtonProps extends ActionButtonSharedProps {
|
|
|
55
45
|
size?: "sm" | "md";
|
|
56
46
|
}
|
|
57
47
|
|
|
58
|
-
declare const ActionButton: React
|
|
48
|
+
declare const ActionButton: React.ForwardRefExoticComponent<ActionButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
59
49
|
|
|
60
50
|
interface DomNodeRendererProps {
|
|
61
51
|
/** The class name applied to the wrapper `div` component. */
|
|
@@ -69,7 +59,7 @@ interface DomNodeRendererProps {
|
|
|
69
59
|
node: Node;
|
|
70
60
|
}
|
|
71
61
|
|
|
72
|
-
declare const DomNodeRenderer: React
|
|
62
|
+
declare const DomNodeRenderer: React.ForwardRefExoticComponent<DomNodeRendererProps & React.RefAttributes<HTMLDivElement>>;
|
|
73
63
|
|
|
74
64
|
interface SliderProps extends AriaSliderProps<number>, Omit<SliderStateOptions<number>, "numberFormatter"> {
|
|
75
65
|
/**
|
|
@@ -94,7 +84,7 @@ interface SliderProps extends AriaSliderProps<number>, Omit<SliderStateOptions<n
|
|
|
94
84
|
includeNumberInput?: boolean;
|
|
95
85
|
}
|
|
96
86
|
|
|
97
|
-
declare const Slider: React
|
|
87
|
+
declare const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLDivElement>>;
|
|
98
88
|
|
|
99
89
|
interface SwitchProps extends Omit<AriaSwitchProps, "children">, Omit<ToggleProps, "children">, StylingProps {
|
|
100
90
|
/** The label to display next to the switch. */
|
|
@@ -108,7 +98,7 @@ interface SwitchProps extends Omit<AriaSwitchProps, "children">, Omit<ToggleProp
|
|
|
108
98
|
};
|
|
109
99
|
}
|
|
110
100
|
|
|
111
|
-
declare const Switch: React
|
|
101
|
+
declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLLabelElement>>;
|
|
112
102
|
|
|
113
103
|
interface SearchInputProps extends Omit<AriaSearchFieldProps, "validationState" | "label" | "aria-autocomplete" | "autoComplete" | "isRequired" | "aria-haspopup" | "isReadOnly" | "aria-activedescendant" | "type">, StylingProps {
|
|
114
104
|
/**
|
|
@@ -127,25 +117,27 @@ interface SearchInputProps extends Omit<AriaSearchFieldProps, "validationState"
|
|
|
127
117
|
"aria-label": string;
|
|
128
118
|
}
|
|
129
119
|
|
|
130
|
-
declare const SearchInput: React
|
|
120
|
+
declare const SearchInput: React.ForwardRefExoticComponent<SearchInputProps & React.RefAttributes<HTMLDivElement>>;
|
|
131
121
|
|
|
132
122
|
interface ThemeProviderProps extends StylingProps {
|
|
133
123
|
/**
|
|
134
124
|
* The theme to use. If not provided, the theme will be inherited from the
|
|
135
125
|
* parent ThemeProvider. If there is no parent ThemeProvider, the default
|
|
136
126
|
* theme will be used.
|
|
127
|
+
*
|
|
128
|
+
* @default "system"
|
|
137
129
|
*/
|
|
138
|
-
theme
|
|
130
|
+
theme?: Theme | "light" | "dark" | "system";
|
|
139
131
|
/** The children to render. */
|
|
140
|
-
children: React
|
|
132
|
+
children: React.ReactNode;
|
|
141
133
|
/**
|
|
142
134
|
* A function that will be called when the theme changes from any of the child
|
|
143
135
|
* components.
|
|
144
136
|
*/
|
|
145
|
-
setTheme?: (theme: Theme) => void;
|
|
137
|
+
setTheme?: (theme: Theme | "light" | "dark" | "system") => void;
|
|
146
138
|
}
|
|
147
139
|
|
|
148
|
-
declare const ThemeProvider: React
|
|
140
|
+
declare const ThemeProvider: React.ForwardRefExoticComponent<ThemeProviderProps & React.RefAttributes<HTMLDivElement>>;
|
|
149
141
|
|
|
150
142
|
/**
|
|
151
143
|
* A hook that returns the user preferences for color scheme, contrast, reduced
|
|
@@ -176,11 +168,11 @@ interface PopoverContentProps extends Omit<AriaPopoverProps, "popoverRef" | "tri
|
|
|
176
168
|
* The reference element for the popover position. By default, the popover is
|
|
177
169
|
* positioned relative to the trigger element.
|
|
178
170
|
*/
|
|
179
|
-
triggerRef?: React
|
|
171
|
+
triggerRef?: React.RefObject<HTMLElement>;
|
|
180
172
|
/** The class name for the underlay element. */
|
|
181
173
|
underlayClassName?: string;
|
|
182
174
|
/** The contents of the popover. */
|
|
183
|
-
children: React
|
|
175
|
+
children: React.ReactNode;
|
|
184
176
|
}
|
|
185
177
|
|
|
186
178
|
type Item$1 = {
|
|
@@ -230,18 +222,18 @@ interface MenuProps extends MenuTriggerProps, MenuPopoverProps, Omit<AriaMenuPro
|
|
|
230
222
|
items: ItemsUnion[];
|
|
231
223
|
}
|
|
232
224
|
|
|
233
|
-
declare const Menu: React
|
|
225
|
+
declare const Menu: React.ForwardRefExoticComponent<MenuProps & React.RefAttributes<HTMLButtonElement>>;
|
|
234
226
|
|
|
235
227
|
interface LinkProps extends AriaLinkOptions, StylingProps {
|
|
236
228
|
/** The link's style variant. */
|
|
237
229
|
variant?: "default" | "inline";
|
|
238
230
|
/** The children to render. */
|
|
239
|
-
children: React
|
|
231
|
+
children: React.ReactNode;
|
|
240
232
|
/** The size of the link. */
|
|
241
233
|
size?: "sm" | "md" | "lg";
|
|
242
234
|
}
|
|
243
235
|
|
|
244
|
-
declare const Link: React
|
|
236
|
+
declare const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLElement>>;
|
|
245
237
|
|
|
246
238
|
interface SharedFileUploadProps extends StylingProps {
|
|
247
239
|
/** Whether the component is inlined. */
|
|
@@ -260,7 +252,7 @@ interface SharedFileUploadProps extends StylingProps {
|
|
|
260
252
|
/** The name of the input. */
|
|
261
253
|
name?: string;
|
|
262
254
|
/** The callback function that is fired when the value changes. */
|
|
263
|
-
onChange?: (event: React
|
|
255
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
264
256
|
/**
|
|
265
257
|
* The callback function that is fired when the value changes and the value is
|
|
266
258
|
* valid.
|
|
@@ -274,12 +266,12 @@ interface SharedFileUploadProps extends StylingProps {
|
|
|
274
266
|
}
|
|
275
267
|
interface FileUploadProps extends SharedFileUploadProps {
|
|
276
268
|
/** The Icon to display. */
|
|
277
|
-
icon?: React
|
|
269
|
+
icon?: React.FC<IconProps>;
|
|
278
270
|
/** Whether to allow multiple files to be uploaded. */
|
|
279
271
|
multiple?: boolean;
|
|
280
272
|
}
|
|
281
273
|
|
|
282
|
-
declare const FileUpload: React
|
|
274
|
+
declare const FileUpload: React.ForwardRefExoticComponent<FileUploadProps & React.RefAttributes<HTMLLabelElement>>;
|
|
283
275
|
|
|
284
276
|
interface SeparatorProps extends Omit<SeparatorProps$1, "elementType">, StylingProps {
|
|
285
277
|
/**
|
|
@@ -290,7 +282,7 @@ interface SeparatorProps extends Omit<SeparatorProps$1, "elementType">, StylingP
|
|
|
290
282
|
variant?: "primary" | "secondary";
|
|
291
283
|
}
|
|
292
284
|
|
|
293
|
-
declare const Separator: React
|
|
285
|
+
declare const Separator: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
294
286
|
|
|
295
287
|
interface ProgressBarProps extends Omit<AriaProgressBarProps, "isIndeterminate"> {
|
|
296
288
|
/** The `className` property assigned to the root element of the component. */
|
|
@@ -313,7 +305,7 @@ interface ProgressBarProps extends Omit<AriaProgressBarProps, "isIndeterminate">
|
|
|
313
305
|
errorMessage?: string;
|
|
314
306
|
}
|
|
315
307
|
|
|
316
|
-
declare const ProgressBar: React
|
|
308
|
+
declare const ProgressBar: React.ForwardRefExoticComponent<ProgressBarProps & React.RefAttributes<HTMLDivElement>>;
|
|
317
309
|
|
|
318
310
|
interface InputMessage {
|
|
319
311
|
/** The description to display below the input. */
|
|
@@ -341,29 +333,29 @@ interface TextInputProps extends Omit<AriaTextFieldProps, "validationState" | "i
|
|
|
341
333
|
/** Whether the input is read only. */
|
|
342
334
|
readOnly?: boolean;
|
|
343
335
|
/** The style object to apply to the input element */
|
|
344
|
-
inputStyle?: React
|
|
336
|
+
inputStyle?: React.CSSProperties;
|
|
345
337
|
/** The class name to apply to the input element */
|
|
346
338
|
inputClassName?: string;
|
|
347
339
|
}
|
|
348
340
|
|
|
349
|
-
declare const TextInput: React
|
|
341
|
+
declare const TextInput: React.ForwardRefExoticComponent<TextInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
350
342
|
|
|
351
|
-
interface ReactionProps extends Omit<AriaSwitchProps & ToggleProps, "validationState" | "isRequired" | "children" | "isInvalid">, StylingProps {
|
|
343
|
+
interface ReactionProps extends Omit<AriaSwitchProps & ToggleProps, "validationState" | "isRequired" | "children" | "isInvalid" | "validationBehavior" | "validate" | "onKeyUp">, StylingProps {
|
|
352
344
|
/** The size of the reaction. */
|
|
353
|
-
size?: "
|
|
345
|
+
size?: "sm" | "md";
|
|
354
346
|
/** The number of reactions. */
|
|
355
347
|
count: number;
|
|
356
348
|
/** The icon to render. */
|
|
357
|
-
icon?: React
|
|
349
|
+
icon?: React.FC<IconProps>;
|
|
358
350
|
}
|
|
359
351
|
|
|
360
|
-
declare const Reaction: React
|
|
352
|
+
declare const Reaction: React.ForwardRefExoticComponent<ReactionProps & React.RefAttributes<HTMLLabelElement>>;
|
|
361
353
|
|
|
362
354
|
interface TooltipProps extends TooltipTriggerProps, AriaTooltipProps, Omit<AriaPositionProps, "overlayRef" | "targetRef" | "maxHeight" | "isOpen" | "arrowSize"> {
|
|
363
355
|
/** The content of the tooltip. */
|
|
364
356
|
text?: string;
|
|
365
357
|
/** The tooltip trigger element. */
|
|
366
|
-
children: React
|
|
358
|
+
children: React.ReactNode;
|
|
367
359
|
/**
|
|
368
360
|
* The delay time for the tooltip to show up.
|
|
369
361
|
*
|
|
@@ -378,14 +370,14 @@ interface TooltipProps extends TooltipTriggerProps, AriaTooltipProps, Omit<AriaP
|
|
|
378
370
|
closeDelay?: number;
|
|
379
371
|
}
|
|
380
372
|
|
|
381
|
-
declare const Tooltip: React
|
|
373
|
+
declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLDivElement>>;
|
|
382
374
|
|
|
383
375
|
interface PortalProps extends OverlayProps {
|
|
384
376
|
/** The `className` property assigned to the root element of the component. */
|
|
385
377
|
className?: string;
|
|
386
378
|
}
|
|
387
379
|
|
|
388
|
-
declare const Portal: React
|
|
380
|
+
declare const Portal: React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<HTMLDivElement>>;
|
|
389
381
|
|
|
390
382
|
interface ProgressSpinnerProps extends Omit<AriaProgressBarProps, "value" | "isIndeterminate" | "formatOptions" | "maxValue" | "minValue" | "valueLabel">, StylingProps {
|
|
391
383
|
/**
|
|
@@ -402,11 +394,11 @@ interface ProgressSpinnerProps extends Omit<AriaProgressBarProps, "value" | "isI
|
|
|
402
394
|
variant?: "active" | "inactive" | "success" | "error";
|
|
403
395
|
}
|
|
404
396
|
|
|
405
|
-
declare const ProgressSpinner: React
|
|
397
|
+
declare const ProgressSpinner: React.ForwardRefExoticComponent<ProgressSpinnerProps & React.RefAttributes<HTMLDivElement>>;
|
|
406
398
|
|
|
407
399
|
interface ActionIconButtonProps extends ActionButtonSharedProps {
|
|
408
400
|
/** The icon to display */
|
|
409
|
-
icon: React
|
|
401
|
+
icon: React.FC<IconProps>;
|
|
410
402
|
/**
|
|
411
403
|
* The size of the icon button.
|
|
412
404
|
*
|
|
@@ -421,13 +413,13 @@ interface ActionIconButtonProps extends ActionButtonSharedProps {
|
|
|
421
413
|
variant?: "primary" | "secondary" | "tertiary";
|
|
422
414
|
}
|
|
423
415
|
|
|
424
|
-
declare const ActionIconButton: React
|
|
416
|
+
declare const ActionIconButton: React.ForwardRefExoticComponent<ActionIconButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
425
417
|
|
|
426
|
-
interface ToggleButtonProps extends StylingProps, Omit<AriaToggleButtonProps, "
|
|
418
|
+
interface ToggleButtonProps extends StylingProps, Omit<AriaToggleButtonProps, "children"> {
|
|
427
419
|
/** The text content of the button. */
|
|
428
|
-
label:
|
|
420
|
+
label: React.ReactNode;
|
|
429
421
|
/** The icon to display before the label. */
|
|
430
|
-
iconStart?: React
|
|
422
|
+
iconStart?: React.FC<SVGRProps>;
|
|
431
423
|
/**
|
|
432
424
|
* In case the button is being used as a trigger for a popover, this prop will
|
|
433
425
|
* determine the direction of caret in which the popover will be displayed.
|
|
@@ -443,7 +435,7 @@ interface ToggleButtonProps extends StylingProps, Omit<AriaToggleButtonProps, "t
|
|
|
443
435
|
size?: "md" | "lg";
|
|
444
436
|
}
|
|
445
437
|
|
|
446
|
-
declare const ToggleButton: React
|
|
438
|
+
declare const ToggleButton: React.ForwardRefExoticComponent<ToggleButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
447
439
|
|
|
448
440
|
interface CheckboxProps extends AriaCheckboxProps, Omit<ToggleProps, "children">, StylingProps {
|
|
449
441
|
/** The checkbox's label. */
|
|
@@ -456,7 +448,7 @@ interface CheckboxProps extends AriaCheckboxProps, Omit<ToggleProps, "children">
|
|
|
456
448
|
labelPosition?: "start" | "end";
|
|
457
449
|
}
|
|
458
450
|
|
|
459
|
-
declare const Checkbox: React
|
|
451
|
+
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLLabelElement>>;
|
|
460
452
|
|
|
461
453
|
type Excluded = "isDisabled" | "isReadOnly" | "isRequired" | "locale" | "validationState" | "label" | "formatOptions" | "isInvalid";
|
|
462
454
|
interface PaginationProps extends Omit<AriaNumberFieldProps, Excluded>, Omit<NumberFieldStateOptions, Excluded>, StylingProps {
|
|
@@ -478,34 +470,34 @@ interface PaginationProps extends Omit<AriaNumberFieldProps, Excluded>, Omit<Num
|
|
|
478
470
|
size?: "xs" | "sm" | "md" | "lg";
|
|
479
471
|
}
|
|
480
472
|
|
|
481
|
-
declare const Pagination: React
|
|
473
|
+
declare const Pagination: React.ForwardRefExoticComponent<PaginationProps & React.RefAttributes<HTMLDivElement>>;
|
|
482
474
|
|
|
483
475
|
interface I18nProviderProps extends I18nProviderProps$1 {
|
|
484
476
|
/** The messages to use for internationalization. */
|
|
485
477
|
messages?: LocalizedStrings;
|
|
486
478
|
}
|
|
487
479
|
|
|
488
|
-
declare const I18nProvider: React
|
|
480
|
+
declare const I18nProvider: React.FC<I18nProviderProps>;
|
|
489
481
|
|
|
490
482
|
type NumberFormatProps = Parameters<typeof useNumberFormatter>[0] & {
|
|
491
483
|
/** The number to format. */
|
|
492
484
|
value: number;
|
|
493
485
|
};
|
|
494
486
|
|
|
495
|
-
declare const NumberFormat: React
|
|
487
|
+
declare const NumberFormat: React.FC<NumberFormatProps>;
|
|
496
488
|
|
|
497
489
|
type DateFormatProps = Parameters<typeof useDateFormatter>[0] & {
|
|
498
490
|
/** The date to format. */
|
|
499
491
|
date: Date;
|
|
500
492
|
};
|
|
501
493
|
|
|
502
|
-
declare const DateFormat: React
|
|
494
|
+
declare const DateFormat: React.FC<DateFormatProps>;
|
|
503
495
|
|
|
504
496
|
type Item = {
|
|
505
497
|
id: string;
|
|
506
498
|
label: string;
|
|
507
499
|
variant?: "neutral" | "red" | "green" | "blue" | "high-contrast";
|
|
508
|
-
icon?: React
|
|
500
|
+
icon?: React.FC<SVGRProps>;
|
|
509
501
|
};
|
|
510
502
|
interface TagGroupProps extends StylingProps, Omit<AriaTagGroupProps<Item>, "children" | "errorMessage" | "description">, Omit<ListProps<Item>, "children" | "collection" | "filter"> {
|
|
511
503
|
/**
|
|
@@ -525,7 +517,7 @@ interface TagGroupProps extends StylingProps, Omit<AriaTagGroupProps<Item>, "chi
|
|
|
525
517
|
"aria-label": string;
|
|
526
518
|
}
|
|
527
519
|
|
|
528
|
-
declare const TagGroup: React
|
|
520
|
+
declare const TagGroup: React.ForwardRefExoticComponent<TagGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
529
521
|
|
|
530
522
|
interface AccordionProps extends StylingProps {
|
|
531
523
|
/**
|
|
@@ -539,7 +531,7 @@ interface AccordionProps extends StylingProps {
|
|
|
539
531
|
/** This callback is called when the expanded state of the accordion changes. */
|
|
540
532
|
onChange?: (value: Set<Key>) => void;
|
|
541
533
|
/** The children of the accordion. Each child should be an `AccordionItem`. */
|
|
542
|
-
children: React
|
|
534
|
+
children: React.ReactNode;
|
|
543
535
|
/** The keys of the items that should be expanded by default. */
|
|
544
536
|
defaultExpandedKeys?: Set<Key>;
|
|
545
537
|
/**
|
|
@@ -584,7 +576,7 @@ interface AccordionItemProps extends StylingProps {
|
|
|
584
576
|
*/
|
|
585
577
|
showActionsOnTriggerOnly?: boolean;
|
|
586
578
|
/** The content of the accordion item. */
|
|
587
|
-
children: React
|
|
579
|
+
children: React.ReactNode;
|
|
588
580
|
/** The key of the accordion item. */
|
|
589
581
|
value: Key;
|
|
590
582
|
/**
|
|
@@ -594,15 +586,15 @@ interface AccordionItemProps extends StylingProps {
|
|
|
594
586
|
subLabel?: string;
|
|
595
587
|
}
|
|
596
588
|
|
|
597
|
-
declare const Accordion: React
|
|
589
|
+
declare const Accordion: React.ForwardRefExoticComponent<AccordionProps & React.RefAttributes<HTMLDivElement>>;
|
|
598
590
|
|
|
599
|
-
declare const AccordionItem: React
|
|
591
|
+
declare const AccordionItem: React.ForwardRefExoticComponent<AccordionItemProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
600
592
|
|
|
601
593
|
type ListOption = {
|
|
602
594
|
id: string;
|
|
603
595
|
label: string;
|
|
604
596
|
description?: string;
|
|
605
|
-
icon?: React
|
|
597
|
+
icon?: React.FC<IconProps>;
|
|
606
598
|
/**
|
|
607
599
|
* The type of item.
|
|
608
600
|
*
|
|
@@ -646,7 +638,7 @@ interface ListBoxProps extends StylingProps, AriaListBoxOptions<ListItem>, Omit<
|
|
|
646
638
|
* @param options [OptionAria]()
|
|
647
639
|
* @param ref React.RefObject<HTMLLIElement>
|
|
648
640
|
*/
|
|
649
|
-
renderOption?: (item: Node$1<ListItem>, options: OptionAria, ref: React
|
|
641
|
+
renderOption?: (item: Node$1<ListItem>, options: OptionAria, ref: React.RefObject<HTMLLIElement>) => React.ReactNode;
|
|
650
642
|
/** Whether to show the selected checkmark icon. */
|
|
651
643
|
showSelectedIcon?: boolean;
|
|
652
644
|
/** The label for the listbox. */
|
|
@@ -689,9 +681,9 @@ interface SelectProps extends Omit<AriaSelectOptions<ListItem>, "validationState
|
|
|
689
681
|
isReadOnly?: boolean;
|
|
690
682
|
}
|
|
691
683
|
|
|
692
|
-
declare const Select: React
|
|
684
|
+
declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLDivElement>>;
|
|
693
685
|
|
|
694
|
-
declare const ListBox: React
|
|
686
|
+
declare const ListBox: React.ForwardRefExoticComponent<ListBoxProps & React.RefAttributes<HTMLUListElement>>;
|
|
695
687
|
|
|
696
688
|
interface AvatarProps extends StylingProps {
|
|
697
689
|
/**
|
|
@@ -704,7 +696,7 @@ interface AvatarProps extends StylingProps {
|
|
|
704
696
|
* The icon to display. This icon has to be imported from the
|
|
705
697
|
* `@baseline-ui/icons` package.
|
|
706
698
|
*/
|
|
707
|
-
icon?: React
|
|
699
|
+
icon?: React.FC<SVGRProps>;
|
|
708
700
|
/** The name of the user. */
|
|
709
701
|
name: string;
|
|
710
702
|
/** The URL of the image to display. */
|
|
@@ -722,11 +714,11 @@ interface AvatarProps extends StylingProps {
|
|
|
722
714
|
hasNotifications?: boolean;
|
|
723
715
|
}
|
|
724
716
|
|
|
725
|
-
declare const Avatar: React
|
|
717
|
+
declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
|
|
726
718
|
|
|
727
|
-
type ItemProps = React
|
|
719
|
+
type ItemProps = React.ComponentProps<typeof Item$2> & StylingProps & {
|
|
728
720
|
key?: Key;
|
|
729
|
-
icon?: React
|
|
721
|
+
icon?: React.FC<SVGRProps>;
|
|
730
722
|
value?: string;
|
|
731
723
|
title?: string;
|
|
732
724
|
};
|
|
@@ -745,7 +737,7 @@ type TabsProps = Omit<StylingProps & AriaTabListProps<ItemProps>, "orientation"
|
|
|
745
737
|
* </Tabs>;
|
|
746
738
|
* ```
|
|
747
739
|
*/
|
|
748
|
-
children: React
|
|
740
|
+
children: React.ReactNode;
|
|
749
741
|
/**
|
|
750
742
|
* The key of the tab that needs to be removed.
|
|
751
743
|
*
|
|
@@ -765,30 +757,30 @@ type TabsProps = Omit<StylingProps & AriaTabListProps<ItemProps>, "orientation"
|
|
|
765
757
|
/** The className to apply to the tab header container. */
|
|
766
758
|
tabHeaderClassName?: string;
|
|
767
759
|
/** The style to apply to the tab header container. */
|
|
768
|
-
tabHeaderStyle?: React
|
|
760
|
+
tabHeaderStyle?: React.CSSProperties;
|
|
769
761
|
};
|
|
770
762
|
type TabItemProps = StylingProps & {
|
|
771
763
|
/** The title of the tab. This will be displayed in the tab button. */
|
|
772
764
|
title: string;
|
|
773
765
|
/** The icon to display in front of the title. */
|
|
774
|
-
icon?: React
|
|
766
|
+
icon?: React.FC<SVGRProps>;
|
|
775
767
|
/** The value of the tab. This will be used to identify the tab. */
|
|
776
768
|
value: string;
|
|
777
769
|
};
|
|
778
770
|
|
|
779
|
-
declare const Tabs: React
|
|
780
|
-
children: React
|
|
781
|
-
onRemove?: ((key: React
|
|
771
|
+
declare const Tabs: React.ForwardRefExoticComponent<Omit<StylingProps & react_aria.AriaTabListProps<ItemProps>, "children" | "orientation" | "items" | "disabledKeys" | "selectedKey" | "defaultSelectedKey"> & {
|
|
772
|
+
children: React.ReactNode;
|
|
773
|
+
onRemove?: ((key: React.Key) => void) | undefined;
|
|
782
774
|
selectedValue?: string | undefined;
|
|
783
775
|
defaultSelectedValue?: string | undefined;
|
|
784
|
-
disabledValues?: Set<React
|
|
776
|
+
disabledValues?: Set<React.Key> | undefined;
|
|
785
777
|
actions?: Omit<ActionIconButtonProps, "size" | "variant">[] | undefined;
|
|
786
778
|
variant?: "primary" | "ghost" | undefined;
|
|
787
779
|
tabHeaderClassName?: string | undefined;
|
|
788
|
-
tabHeaderStyle?: React
|
|
789
|
-
} & React
|
|
780
|
+
tabHeaderStyle?: React.CSSProperties | undefined;
|
|
781
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
790
782
|
|
|
791
|
-
declare const TabItem: React
|
|
783
|
+
declare const TabItem: React.FC<TabItemProps>;
|
|
792
784
|
|
|
793
785
|
interface InlineAlertProps extends StylingProps {
|
|
794
786
|
/**
|
|
@@ -828,7 +820,7 @@ interface InlineAlertProps extends StylingProps {
|
|
|
828
820
|
size?: "sm" | "md";
|
|
829
821
|
}
|
|
830
822
|
|
|
831
|
-
declare const InlineAlert: React
|
|
823
|
+
declare const InlineAlert: React.ForwardRefExoticComponent<InlineAlertProps & React.RefAttributes<HTMLDivElement>>;
|
|
832
824
|
|
|
833
825
|
interface NumberInputProps extends StylingProps, Omit<AriaNumberFieldProps, "validationState" | "isRequired"> {
|
|
834
826
|
/**
|
|
@@ -855,11 +847,11 @@ interface NumberInputProps extends StylingProps, Omit<AriaNumberFieldProps, "val
|
|
|
855
847
|
errorMessage?: string;
|
|
856
848
|
}
|
|
857
849
|
|
|
858
|
-
declare const NumberInput: React
|
|
850
|
+
declare const NumberInput: React.ForwardRefExoticComponent<NumberInputProps & React.RefAttributes<HTMLDivElement>>;
|
|
859
851
|
|
|
860
852
|
interface DialogProps extends AriaDialogProps, StylingProps {
|
|
861
853
|
/** The children to render. */
|
|
862
|
-
children: React
|
|
854
|
+
children: React.ReactNode;
|
|
863
855
|
/**
|
|
864
856
|
* The size of the dialog. This defines the max width of the dialog.
|
|
865
857
|
*
|
|
@@ -875,12 +867,12 @@ interface DialogProps extends AriaDialogProps, StylingProps {
|
|
|
875
867
|
}
|
|
876
868
|
interface DialogTitleProps extends StylingProps {
|
|
877
869
|
/** The children to render. */
|
|
878
|
-
children: React
|
|
870
|
+
children: React.ReactNode;
|
|
879
871
|
}
|
|
880
872
|
|
|
881
|
-
declare const Dialog: React
|
|
873
|
+
declare const Dialog: React.ForwardRefExoticComponent<DialogProps & React.RefAttributes<HTMLDivElement>>;
|
|
882
874
|
|
|
883
|
-
declare const DialogTitle: React
|
|
875
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<DialogTitleProps & React.RefAttributes<HTMLDivElement>>;
|
|
884
876
|
|
|
885
877
|
interface ColorPreset {
|
|
886
878
|
label: string;
|
|
@@ -923,9 +915,9 @@ interface ColorInputProps extends OverlayTriggerProps, StylingProps, Pick<ColorF
|
|
|
923
915
|
labelPosition?: "top" | "start";
|
|
924
916
|
}
|
|
925
917
|
|
|
926
|
-
declare const ColorInput: React
|
|
918
|
+
declare const ColorInput: React.ForwardRefExoticComponent<ColorInputProps & React.RefAttributes<HTMLDivElement>>;
|
|
927
919
|
|
|
928
|
-
declare const ColorSwatch: React
|
|
920
|
+
declare const ColorSwatch: React.FC<ColorSwatchProps>;
|
|
929
921
|
interface ColorSwatchProps {
|
|
930
922
|
color?: string;
|
|
931
923
|
isFocusVisible?: boolean;
|
|
@@ -938,11 +930,11 @@ interface FreehandCanvasProps extends StylingProps, AriaLabelingProps {
|
|
|
938
930
|
/** The className applicable to the SVG canvas. */
|
|
939
931
|
canvasClassName?: string;
|
|
940
932
|
/** The style applicable to the SVG canvas. */
|
|
941
|
-
canvasStyle?: React
|
|
933
|
+
canvasStyle?: React.CSSProperties;
|
|
942
934
|
/** The className applicable to the footer. */
|
|
943
935
|
footerClassName?: string;
|
|
944
936
|
/** The style applicable to the footer. */
|
|
945
|
-
footerStyle?: React
|
|
937
|
+
footerStyle?: React.CSSProperties;
|
|
946
938
|
/**
|
|
947
939
|
* How much to soften the stroke's edges.
|
|
948
940
|
*
|
|
@@ -1037,9 +1029,9 @@ interface FreehandCanvasProps extends StylingProps, AriaLabelingProps {
|
|
|
1037
1029
|
description?: string;
|
|
1038
1030
|
}
|
|
1039
1031
|
|
|
1040
|
-
declare const FreehandCanvas: React
|
|
1032
|
+
declare const FreehandCanvas: React.ForwardRefExoticComponent<FreehandCanvasProps & React.RefAttributes<HTMLDivElement>>;
|
|
1041
1033
|
|
|
1042
|
-
type TextProps<T extends keyof React
|
|
1034
|
+
type TextProps<T extends keyof React.JSX.IntrinsicElements = "span"> = StylingProps & React.ComponentProps<T> & {
|
|
1043
1035
|
/**
|
|
1044
1036
|
* The type of text to render.
|
|
1045
1037
|
*
|
|
@@ -1053,26 +1045,26 @@ type TextProps<T extends keyof React$1.JSX.IntrinsicElements = "span"> = Styling
|
|
|
1053
1045
|
*/
|
|
1054
1046
|
size?: "sm" | "md" | "lg";
|
|
1055
1047
|
/** The text to render. Can be a string or a number. */
|
|
1056
|
-
children: React
|
|
1048
|
+
children: React.ReactNode;
|
|
1057
1049
|
/**
|
|
1058
1050
|
* The HTML element to render.
|
|
1059
1051
|
*
|
|
1060
1052
|
* @default "span"
|
|
1061
1053
|
*/
|
|
1062
|
-
elementType?: React
|
|
1054
|
+
elementType?: React.ElementType;
|
|
1063
1055
|
};
|
|
1064
1056
|
|
|
1065
|
-
declare const Text: React
|
|
1057
|
+
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>>;
|
|
1066
1058
|
|
|
1067
1059
|
type TransformProps = {
|
|
1068
1060
|
/** The `className` property assigned to the root element of the component. */
|
|
1069
1061
|
className?: string;
|
|
1070
1062
|
/** The `style` property assigned to the root element of the component. */
|
|
1071
|
-
style?: React
|
|
1063
|
+
style?: React.CSSProperties;
|
|
1072
1064
|
/** The children to render. */
|
|
1073
1065
|
children: (options: {
|
|
1074
|
-
style: React
|
|
1075
|
-
}) => React
|
|
1066
|
+
style: React.CSSProperties;
|
|
1067
|
+
}) => React.ReactNode;
|
|
1076
1068
|
/** Whether the transform is draggable. */
|
|
1077
1069
|
isDraggable?: boolean;
|
|
1078
1070
|
/** Whether the transform is resizable. */
|
|
@@ -1108,7 +1100,7 @@ type TransformProps = {
|
|
|
1108
1100
|
/** A callback that will be called when the target is snapped. */
|
|
1109
1101
|
onSnap?: (e: OnSnap) => void;
|
|
1110
1102
|
/** A callback that will be called when the child is double clicked. */
|
|
1111
|
-
onDoubleClick?: (e: React
|
|
1103
|
+
onDoubleClick?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
1112
1104
|
/** A list of selectors relative to which the guidelines will be rendered. */
|
|
1113
1105
|
elementGuidelines?: string[];
|
|
1114
1106
|
/**
|
|
@@ -1143,9 +1135,9 @@ type TransformProps = {
|
|
|
1143
1135
|
/** Whether the transform should be updated automatically. */
|
|
1144
1136
|
autoUpdate?: boolean;
|
|
1145
1137
|
/** The element ref, selector or element to which the transform will be bound. */
|
|
1146
|
-
bound?: React
|
|
1138
|
+
bound?: React.RefObject<HTMLElement> | string | HTMLElement;
|
|
1147
1139
|
/** The element ref, selector or element that is it's scrollable ancestor. */
|
|
1148
|
-
scrollableAncestor?: React
|
|
1140
|
+
scrollableAncestor?: React.RefObject<HTMLElement> | string | HTMLElement;
|
|
1149
1141
|
/**
|
|
1150
1142
|
* Whether to prevent bubbling of events like mousedown, touchstart, etc.
|
|
1151
1143
|
*
|
|
@@ -1166,7 +1158,7 @@ type TransformProps = {
|
|
|
1166
1158
|
transformOrigin?: Array<string | number> | string | "";
|
|
1167
1159
|
};
|
|
1168
1160
|
|
|
1169
|
-
declare const Transform: React
|
|
1161
|
+
declare const Transform: React.ForwardRefExoticComponent<TransformProps & React.RefAttributes<HTMLDivElement>>;
|
|
1170
1162
|
|
|
1171
1163
|
interface ImageDropZoneProps extends Omit<SharedFileUploadProps, "label" | "variant">, Omit<DropOptions, "ref" | "getDropOperation" | "hasDropButton" | "getDropOperationForPoint">, Omit<ClipboardProps, "getItems" | "onCut" | "onCopy">, AriaLabelingProps {
|
|
1172
1164
|
/**
|
|
@@ -1201,7 +1193,7 @@ interface ImageDropZoneProps extends Omit<SharedFileUploadProps, "label" | "vari
|
|
|
1201
1193
|
isInline?: boolean;
|
|
1202
1194
|
}
|
|
1203
1195
|
|
|
1204
|
-
declare const ImageDropZone: React
|
|
1196
|
+
declare const ImageDropZone: React.ForwardRefExoticComponent<ImageDropZoneProps & React.RefAttributes<HTMLLabelElement>>;
|
|
1205
1197
|
|
|
1206
1198
|
interface PreviewProps extends StylingProps, AriaLabelingProps {
|
|
1207
1199
|
/**
|
|
@@ -1219,7 +1211,7 @@ interface PreviewProps extends StylingProps, AriaLabelingProps {
|
|
|
1219
1211
|
/** The alt text for the image. */
|
|
1220
1212
|
imageAlt?: string;
|
|
1221
1213
|
/** The SVG to display in the preview. This can be a React element or a string. */
|
|
1222
|
-
svgSrc?: string | React
|
|
1214
|
+
svgSrc?: string | React.ReactElement;
|
|
1223
1215
|
/** Whether the preview should be disabled or not. */
|
|
1224
1216
|
isDisabled?: boolean;
|
|
1225
1217
|
/**
|
|
@@ -1231,10 +1223,16 @@ interface PreviewProps extends StylingProps, AriaLabelingProps {
|
|
|
1231
1223
|
/** The text to display in the preview. */
|
|
1232
1224
|
textValue?: string;
|
|
1233
1225
|
/** The style of the text. */
|
|
1234
|
-
textStyle?: React
|
|
1226
|
+
textStyle?: React.CSSProperties;
|
|
1227
|
+
/**
|
|
1228
|
+
* This is fired when the `actionButtons` are not passed and you trigger a
|
|
1229
|
+
* `click` event on the preview. In case you have passed `actionButtons`, this
|
|
1230
|
+
* is not fired as focus shifts to the action buttons.
|
|
1231
|
+
*/
|
|
1232
|
+
onPress?: PressProps["onPress"];
|
|
1235
1233
|
}
|
|
1236
1234
|
|
|
1237
|
-
declare const Preview: React
|
|
1235
|
+
declare const Preview: React.ForwardRefExoticComponent<PreviewProps & React.RefAttributes<HTMLDivElement>>;
|
|
1238
1236
|
|
|
1239
1237
|
interface RadioGroupProps extends StylingProps, Omit<AriaRadioGroupProps, "description" | "errorMessage" | "isRequired"> {
|
|
1240
1238
|
/**
|
|
@@ -1280,11 +1278,11 @@ interface RadioGroupProps extends StylingProps, Omit<AriaRadioGroupProps, "descr
|
|
|
1280
1278
|
isHovered: boolean;
|
|
1281
1279
|
isDisabled: boolean;
|
|
1282
1280
|
optionLabelPosition: "start" | "end";
|
|
1283
|
-
}) => React
|
|
1281
|
+
}) => React.ReactNode;
|
|
1284
1282
|
/** The class name for the group container. */
|
|
1285
1283
|
groupContainerClassName?: string;
|
|
1286
1284
|
/** The style for the group container. */
|
|
1287
|
-
groupContainerStyle?: React
|
|
1285
|
+
groupContainerStyle?: React.CSSProperties;
|
|
1288
1286
|
/** The ids of the items that are disabled. */
|
|
1289
1287
|
disabledValues?: string[];
|
|
1290
1288
|
/**
|
|
@@ -1296,26 +1294,26 @@ interface RadioGroupProps extends StylingProps, Omit<AriaRadioGroupProps, "descr
|
|
|
1296
1294
|
/** The className applicable to the label. */
|
|
1297
1295
|
labelClassName?: string;
|
|
1298
1296
|
/** The style applicable to the label. */
|
|
1299
|
-
labelStyle?: React
|
|
1297
|
+
labelStyle?: React.CSSProperties;
|
|
1300
1298
|
}
|
|
1301
1299
|
|
|
1302
|
-
declare const RadioGroup: React
|
|
1300
|
+
declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
1303
1301
|
|
|
1304
1302
|
interface ModalProps extends OverlayTriggerProps {
|
|
1305
1303
|
}
|
|
1306
1304
|
interface ModalContentProps extends AriaModalOverlayProps, StylingProps {
|
|
1307
|
-
children: React
|
|
1305
|
+
children: React.ReactNode | ((props: {
|
|
1308
1306
|
close: () => void;
|
|
1309
|
-
}) => React
|
|
1307
|
+
}) => React.ReactNode);
|
|
1310
1308
|
}
|
|
1311
1309
|
|
|
1312
|
-
declare const Modal: React
|
|
1310
|
+
declare const Modal: React.FC<ModalProps>;
|
|
1313
1311
|
|
|
1314
|
-
declare const ModalContent: React
|
|
1312
|
+
declare const ModalContent: React.FC<ModalContentProps>;
|
|
1315
1313
|
|
|
1316
|
-
declare const ModalTrigger: React
|
|
1314
|
+
declare const ModalTrigger: React.FC;
|
|
1317
1315
|
|
|
1318
|
-
declare const ModalClose: React
|
|
1316
|
+
declare const ModalClose: React.FC;
|
|
1319
1317
|
|
|
1320
1318
|
interface MessageFormatProps {
|
|
1321
1319
|
/**
|
|
@@ -1324,16 +1322,14 @@ interface MessageFormatProps {
|
|
|
1324
1322
|
* it with another React element (recommended), specify a different tagName
|
|
1325
1323
|
* (e.g., 'div')
|
|
1326
1324
|
*/
|
|
1327
|
-
elementType?: React
|
|
1325
|
+
elementType?: React.ElementType | "div" | "span";
|
|
1328
1326
|
/** The id of the message to format. */
|
|
1329
1327
|
id: string;
|
|
1330
1328
|
/** The default message to use if the message id is not found. */
|
|
1331
1329
|
defaultMessage?: string;
|
|
1332
|
-
/** The values to use for formatting the message. */
|
|
1333
|
-
values?: Record<string, string | number | boolean | null | undefined>;
|
|
1334
1330
|
}
|
|
1335
1331
|
|
|
1336
|
-
declare const MessageFormat: React
|
|
1332
|
+
declare const MessageFormat: React.FC<MessageFormatProps>;
|
|
1337
1333
|
|
|
1338
1334
|
interface GroupProps extends StylingProps, AriaLabelingProps {
|
|
1339
1335
|
/**
|
|
@@ -1352,7 +1348,19 @@ interface GroupProps extends StylingProps, AriaLabelingProps {
|
|
|
1352
1348
|
children: React.ReactNode;
|
|
1353
1349
|
}
|
|
1354
1350
|
|
|
1355
|
-
declare const Group: React
|
|
1351
|
+
declare const Group: React.ForwardRefExoticComponent<GroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
1352
|
+
|
|
1353
|
+
type SprinkleProps = Parameters<Sprinkles>[0];
|
|
1354
|
+
interface BoxProps extends Pick<StylingProps, "data-blockid">, Omit<React.ComponentPropsWithoutRef<"div">, "color">, SprinkleProps {
|
|
1355
|
+
/**
|
|
1356
|
+
* The HTML element to use for the box.
|
|
1357
|
+
*
|
|
1358
|
+
* @default "div"
|
|
1359
|
+
*/
|
|
1360
|
+
elementType?: string;
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
declare const Box: React.ForwardRefExoticComponent<BoxProps & React.RefAttributes<HTMLDivElement>>;
|
|
1356
1364
|
|
|
1357
1365
|
/**
|
|
1358
1366
|
* A hook that creates an IntersectionObserver and observes a target element.
|
|
@@ -1390,9 +1398,9 @@ declare const Group: React$1.ForwardRefExoticComponent<GroupProps & React$1.RefA
|
|
|
1390
1398
|
*/
|
|
1391
1399
|
declare function useIntersectionObserver({ ref, onIntersect, isDisabled, threshold, rootMargin, root, }: IntersectionObserverOptions): void;
|
|
1392
1400
|
interface IntersectionObserverOptions {
|
|
1393
|
-
ref: React
|
|
1401
|
+
ref: React.RefObject<HTMLElement>;
|
|
1394
1402
|
onIntersect: (entry: IntersectionObserverEntry) => void;
|
|
1395
|
-
root?: React
|
|
1403
|
+
root?: React.RefObject<HTMLElement>;
|
|
1396
1404
|
rootMargin?: string;
|
|
1397
1405
|
threshold?: number;
|
|
1398
1406
|
isDisabled?: boolean;
|
|
@@ -1431,7 +1439,7 @@ declare function useResizeObserver({ ref, onResize, isDisabled, }: ResizeObserve
|
|
|
1431
1439
|
} | undefined;
|
|
1432
1440
|
};
|
|
1433
1441
|
interface ResizeObserverOptions {
|
|
1434
|
-
ref: React
|
|
1442
|
+
ref: React.RefObject<HTMLElement>;
|
|
1435
1443
|
onResize?: (entry: ResizeObserverEntry) => void;
|
|
1436
1444
|
isDisabled?: boolean;
|
|
1437
1445
|
}
|
|
@@ -1621,18 +1629,6 @@ declare function defineMessages<T extends LocalizedStrings[keyof LocalizedString
|
|
|
1621
1629
|
*/
|
|
1622
1630
|
declare function useMutationObserver(target: Element | null, options: MutationObserverInit, callback: MutationCallback): MutationObserver | null;
|
|
1623
1631
|
|
|
1624
|
-
/**
|
|
1625
|
-
* Returns the current window size. This is a custom hook that uses the
|
|
1626
|
-
* `window.addEventListener` API to listen for window resize events. It returns
|
|
1627
|
-
* the current window size as an object with `width` and `height` properties.
|
|
1628
|
-
*
|
|
1629
|
-
* @returns The current window size.
|
|
1630
|
-
*/
|
|
1631
|
-
declare function useWindowSize(): {
|
|
1632
|
-
width: number;
|
|
1633
|
-
height: number;
|
|
1634
|
-
};
|
|
1635
|
-
|
|
1636
1632
|
type SetValue<T> = (value: T | ((val: T) => T)) => void;
|
|
1637
1633
|
/**
|
|
1638
1634
|
* A hook to persist a value to localStorage.
|
|
@@ -1653,4 +1649,33 @@ type SetValue<T> = (value: T | ((val: T) => T)) => void;
|
|
|
1653
1649
|
*/
|
|
1654
1650
|
declare function useLocalStorage<T>(key: string, initialValue: T): [T, SetValue<T>];
|
|
1655
1651
|
|
|
1656
|
-
|
|
1652
|
+
/**
|
|
1653
|
+
* A hook that provides text selection functionality for a given HTML element.
|
|
1654
|
+
*
|
|
1655
|
+
* ```jsx
|
|
1656
|
+
* function MyComponent() {
|
|
1657
|
+
* const ref = useRef();
|
|
1658
|
+
* const [selection, setSelection] = useState();
|
|
1659
|
+
*
|
|
1660
|
+
* useTextSelection({
|
|
1661
|
+
* ref,
|
|
1662
|
+
* onSelectionChange: setSelection,
|
|
1663
|
+
* });
|
|
1664
|
+
*
|
|
1665
|
+
* return (
|
|
1666
|
+
* <div ref={ref}>
|
|
1667
|
+
* <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
|
1668
|
+
* </div>
|
|
1669
|
+
* );
|
|
1670
|
+
* }
|
|
1671
|
+
* ```
|
|
1672
|
+
*/
|
|
1673
|
+
declare function useTextSelection({ ref, onSelectionChange, onSelectionEnd, isDisabled, }: TextSelectionProps): void;
|
|
1674
|
+
interface TextSelectionProps {
|
|
1675
|
+
ref: React.RefObject<HTMLElement>;
|
|
1676
|
+
onSelectionChange: (selection: Selection) => void;
|
|
1677
|
+
onSelectionEnd?: (selection: Selection) => void;
|
|
1678
|
+
isDisabled?: boolean;
|
|
1679
|
+
}
|
|
1680
|
+
|
|
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 };
|