@marigold/components 6.0.1 → 6.2.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.d.ts +78 -83
- package/dist/index.js +764 -783
- package/dist/index.mjs +730 -733
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { useAsyncList, useListData } from '@react-stately/data';
|
|
2
|
-
import
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import react__default, { ReactElement, ReactNode, Key, HTMLAttributes, LabelHTMLAttributes, ComponentPropsWithRef, RefObject, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
4
|
import { AriaAccordionProps } from '@react-aria/accordion';
|
|
4
5
|
import * as _react_types_shared from '@react-types/shared';
|
|
5
6
|
import { ItemElement, ItemProps, Node, PressEvents, FocusableDOMProps, CollectionElement, StyleProps, LabelableProps, HelpTextProps } from '@react-types/shared';
|
|
@@ -13,8 +14,8 @@ import { AriaCheckboxProps, AriaCheckboxGroupProps } from '@react-types/checkbox
|
|
|
13
14
|
import { CheckboxGroupState } from '@react-stately/checkbox';
|
|
14
15
|
import { AriaDialogProps } from '@react-types/dialog';
|
|
15
16
|
import { SeparatorProps } from '@react-aria/separator';
|
|
16
|
-
import { AriaDateFieldProps, AriaDatePickerProps } from '@react-aria/datepicker';
|
|
17
17
|
import { DateValue, CalendarDate } from '@internationalized/date';
|
|
18
|
+
import { AriaDateFieldProps, AriaDatePickerProps } from '@react-aria/datepicker';
|
|
18
19
|
import { AriaCalendarProps, DateValue as DateValue$1, AriaCalendarCellProps, AriaCalendarGridProps } from '@react-aria/calendar';
|
|
19
20
|
import { CalendarState } from '@react-stately/calendar';
|
|
20
21
|
import { AriaNumberFieldProps } from '@react-types/numberfield';
|
|
@@ -26,7 +27,7 @@ import { AriaSelectProps } from '@react-types/select';
|
|
|
26
27
|
import { AriaSliderProps } from '@react-types/slider';
|
|
27
28
|
import { AriaSwitchProps } from '@react-types/switch';
|
|
28
29
|
import { AriaTableProps } from '@react-aria/table';
|
|
29
|
-
import { TableStateProps, RowProps as RowProps$1, TableBody, Cell,
|
|
30
|
+
import { TableStateProps, RowProps as RowProps$1, TableBody, Cell, TableHeader, ColumnProps as ColumnProps$1 } from '@react-stately/table';
|
|
30
31
|
import { AriaTextFieldProps } from '@react-types/textfield';
|
|
31
32
|
import { PositionProps } from '@react-types/overlays';
|
|
32
33
|
import { TooltipTriggerProps as TooltipTriggerProps$1 } from '@react-types/tooltip';
|
|
@@ -39,7 +40,7 @@ interface AccordionProps extends Omit<AriaAccordionProps<object>, 'children' | '
|
|
|
39
40
|
selectionMode?: string;
|
|
40
41
|
}
|
|
41
42
|
declare const Accordion: {
|
|
42
|
-
({ children, ...props }: AccordionProps):
|
|
43
|
+
({ children, ...props }: AccordionProps): react.JSX.Element;
|
|
43
44
|
Item: <T>(props: AccordionOwnItemProps<T>) => JSX.Element;
|
|
44
45
|
};
|
|
45
46
|
interface AccordionOwnItemProps<T> extends ItemProps<T> {
|
|
@@ -55,7 +56,7 @@ interface AccordionItemProps {
|
|
|
55
56
|
variant?: string;
|
|
56
57
|
size?: string;
|
|
57
58
|
}
|
|
58
|
-
declare const AccordionItem: ({ item, state, title, variant, size, ...props }: AccordionItemProps) =>
|
|
59
|
+
declare const AccordionItem: ({ item, state, title, variant, size, ...props }: AccordionItemProps) => react.JSX.Element;
|
|
59
60
|
|
|
60
61
|
interface AsideProps extends GapSpaceProp {
|
|
61
62
|
children: [ReactElement, ReactElement];
|
|
@@ -64,17 +65,13 @@ interface AsideProps extends GapSpaceProp {
|
|
|
64
65
|
stretch?: boolean;
|
|
65
66
|
wrap?: NonZeroPercentage;
|
|
66
67
|
}
|
|
67
|
-
declare const Aside: ({ children, sideWidth, space, side, stretch, wrap, }: AsideProps) =>
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Based on https://theme-ui.com/components/aspect-ratio
|
|
71
|
-
*/
|
|
68
|
+
declare const Aside: ({ children, sideWidth, space, side, stretch, wrap, }: AsideProps) => react.JSX.Element;
|
|
72
69
|
|
|
73
70
|
interface AspectProps extends HtmlProps<'div'>, AspectProp {
|
|
74
71
|
children?: ReactNode;
|
|
75
72
|
maxWidth?: string;
|
|
76
73
|
}
|
|
77
|
-
declare const Aspect: ({ ratio, maxWidth, children, }: AspectProps) =>
|
|
74
|
+
declare const Aspect: ({ ratio, maxWidth, children, }: AspectProps) => react.JSX.Element;
|
|
78
75
|
|
|
79
76
|
interface AutocompleteProps extends Omit<SearchAutocompleteProps<object>, 'isDisabled' | 'isRequired' | 'isReadonly' | 'validationState' | 'icon' | 'onInputChange' | 'inputValue' | 'defaultInputValue'> {
|
|
80
77
|
disabled?: boolean;
|
|
@@ -102,7 +99,7 @@ interface AutocompleteProps extends Omit<SearchAutocompleteProps<object>, 'isDis
|
|
|
102
99
|
width?: WidthProp['width'];
|
|
103
100
|
}
|
|
104
101
|
declare const Autocomplete: {
|
|
105
|
-
({ disabled, required, readOnly, error, onChange, value, defaultValue, variant, size, width, ...rest }: AutocompleteProps):
|
|
102
|
+
({ disabled, required, readOnly, error, onChange, value, defaultValue, variant, size, width, ...rest }: AutocompleteProps): react.JSX.Element;
|
|
106
103
|
Item: <T>(props: _react_types_shared.ItemProps<T>) => JSX.Element;
|
|
107
104
|
};
|
|
108
105
|
|
|
@@ -119,7 +116,7 @@ interface ComboBoxProps extends Omit<ComboBoxProps$1<object>, 'isDisabled' | 'is
|
|
|
119
116
|
onChange?: ComboBoxProps$1<object>['onInputChange'];
|
|
120
117
|
}
|
|
121
118
|
declare const ComboBox: {
|
|
122
|
-
({ error, width, disabled, required, readOnly, defaultValue, value, onChange, variant, size, ...rest }: ComboBoxProps):
|
|
119
|
+
({ error, width, disabled, required, readOnly, defaultValue, value, onChange, variant, size, ...rest }: ComboBoxProps): react__default.JSX.Element;
|
|
123
120
|
Item: <T>(props: _react_types_shared.ItemProps<T>) => JSX.Element;
|
|
124
121
|
};
|
|
125
122
|
|
|
@@ -128,7 +125,7 @@ interface BadgeProps extends HtmlProps<'div'> {
|
|
|
128
125
|
variant?: string;
|
|
129
126
|
size?: string;
|
|
130
127
|
}
|
|
131
|
-
declare const Badge: ({ variant, size, children, ...props }: BadgeProps) =>
|
|
128
|
+
declare const Badge: ({ variant, size, children, ...props }: BadgeProps) => react.JSX.Element;
|
|
132
129
|
|
|
133
130
|
interface BreakoutProps extends HtmlProps<'div'>, AlignmentProp {
|
|
134
131
|
children?: ReactNode;
|
|
@@ -136,14 +133,14 @@ interface BreakoutProps extends HtmlProps<'div'>, AlignmentProp {
|
|
|
136
133
|
alignX?: keyof typeof alignment.horizontal.alignmentX;
|
|
137
134
|
alignY?: keyof typeof alignment.horizontal.alignmentY;
|
|
138
135
|
}
|
|
139
|
-
declare const Breakout: ({ height, children, orientation, alignX, alignY, ...props }: BreakoutProps) =>
|
|
136
|
+
declare const Breakout: ({ height, children, orientation, alignX, alignY, ...props }: BreakoutProps) => react.JSX.Element;
|
|
140
137
|
|
|
141
138
|
interface BodyProps extends HtmlProps<'section'> {
|
|
142
139
|
children?: ReactNode;
|
|
143
140
|
variant?: string;
|
|
144
141
|
size?: string;
|
|
145
142
|
}
|
|
146
|
-
declare const Body: ({ children, variant, size, ...props }: BodyProps) =>
|
|
143
|
+
declare const Body: ({ children, variant, size, ...props }: BodyProps) => react.JSX.Element;
|
|
147
144
|
|
|
148
145
|
interface ButtonOwnProps extends PressEvents, FocusableDOMProps, HtmlProps<'button'> {
|
|
149
146
|
children?: ReactNode;
|
|
@@ -163,13 +160,13 @@ interface CardProps extends HtmlProps<'div'>, GapSpaceProp, PaddingSpaceProp, Pa
|
|
|
163
160
|
px?: PaddingSpacePropX['spaceX'];
|
|
164
161
|
py?: PaddingSpacePropY['spaceY'];
|
|
165
162
|
}
|
|
166
|
-
declare const Card: ({ children, variant, size, space, p, px, py, pt, pb, pl, pr, ...props }: CardProps) =>
|
|
163
|
+
declare const Card: ({ children, variant, size, space, p, px, py, pt, pb, pl, pr, ...props }: CardProps) => react.JSX.Element;
|
|
167
164
|
|
|
168
165
|
interface CenterProps extends HtmlProps<'div'>, GapSpaceProp {
|
|
169
166
|
children?: ReactNode;
|
|
170
167
|
maxWidth?: string;
|
|
171
168
|
}
|
|
172
|
-
declare const Center: ({ maxWidth, space, children, ...props }: CenterProps) =>
|
|
169
|
+
declare const Center: ({ maxWidth, space, children, ...props }: CenterProps) => react.JSX.Element;
|
|
173
170
|
|
|
174
171
|
/**
|
|
175
172
|
* `react-aria` has a slightly different API for the above events.
|
|
@@ -183,7 +180,7 @@ interface CheckboxProps extends Omit<HtmlProps<'input'>, 'size' | 'type' | 'defa
|
|
|
183
180
|
variant?: string;
|
|
184
181
|
size?: string;
|
|
185
182
|
}
|
|
186
|
-
declare const Checkbox:
|
|
183
|
+
declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<HTMLInputElement>>;
|
|
187
184
|
|
|
188
185
|
interface CheckboxGroupContextProps extends CheckboxGroupState {
|
|
189
186
|
error?: boolean;
|
|
@@ -192,7 +189,7 @@ interface CheckboxGroupContextProps extends CheckboxGroupState {
|
|
|
192
189
|
* Needs to be falsy so we can check if a checkbox is used as standalone
|
|
193
190
|
* or in a group.
|
|
194
191
|
*/
|
|
195
|
-
declare const CheckboxGroupContext:
|
|
192
|
+
declare const CheckboxGroupContext: react.Context<CheckboxGroupContextProps>;
|
|
196
193
|
declare const useCheckboxGroupContext: () => CheckboxGroupContextProps;
|
|
197
194
|
interface CheckboxGroupProps extends Omit<HtmlProps<'div'>, 'onChange'>, AriaCheckboxGroupProps {
|
|
198
195
|
children: ReactNode;
|
|
@@ -208,7 +205,7 @@ interface CheckboxGroupProps extends Omit<HtmlProps<'div'>, 'onChange'>, AriaChe
|
|
|
208
205
|
onChange?: (value: string[]) => void;
|
|
209
206
|
width?: WidthProp['width'];
|
|
210
207
|
}
|
|
211
|
-
declare const CheckboxGroup: ({ children, required, disabled, readOnly, error, width, ...rest }: CheckboxGroupProps) =>
|
|
208
|
+
declare const CheckboxGroup: ({ children, required, disabled, readOnly, error, width, ...rest }: CheckboxGroupProps) => react.JSX.Element;
|
|
212
209
|
|
|
213
210
|
interface ColumnsProps extends GapSpaceProp {
|
|
214
211
|
children?: ReactNode;
|
|
@@ -216,7 +213,7 @@ interface ColumnsProps extends GapSpaceProp {
|
|
|
216
213
|
collapseAt?: string | 0;
|
|
217
214
|
stretch?: boolean;
|
|
218
215
|
}
|
|
219
|
-
declare const Columns: ({ space, columns, collapseAt, stretch, children, ...props }: ColumnsProps) =>
|
|
216
|
+
declare const Columns: ({ space, columns, collapseAt, stretch, children, ...props }: ColumnsProps) => react.JSX.Element;
|
|
220
217
|
|
|
221
218
|
interface ContainerProps extends HtmlProps<'div'>, PlaceItemsProp, GridColumn, GridColsAlignProp {
|
|
222
219
|
children?: ReactNode;
|
|
@@ -235,7 +232,7 @@ declare const header: {
|
|
|
235
232
|
medium: string;
|
|
236
233
|
large: string;
|
|
237
234
|
};
|
|
238
|
-
declare const Container: ({ contentType, size, align, alignItems, children, ...props }: ContainerProps) =>
|
|
235
|
+
declare const Container: ({ contentType, size, align, alignItems, children, ...props }: ContainerProps) => react.JSX.Element;
|
|
239
236
|
|
|
240
237
|
interface DialogControllerProps {
|
|
241
238
|
children: ReactNode;
|
|
@@ -267,15 +264,15 @@ interface DialogProps extends AriaDialogProps {
|
|
|
267
264
|
closeButton?: boolean;
|
|
268
265
|
}
|
|
269
266
|
declare const Dialog: {
|
|
270
|
-
({ children, variant, size, closeButton, ...props }: DialogProps):
|
|
271
|
-
Trigger: ({ children, dismissable, keyboardDismissable, }: DialogTriggerProps) =>
|
|
272
|
-
Controller: ({ children, dismissable, keyboardDismissable, open, onOpenChange, }: DialogControllerProps) =>
|
|
267
|
+
({ children, variant, size, closeButton, ...props }: DialogProps): react.JSX.Element;
|
|
268
|
+
Trigger: ({ children, dismissable, keyboardDismissable, }: DialogTriggerProps) => react.JSX.Element;
|
|
269
|
+
Controller: ({ children, dismissable, keyboardDismissable, open, onOpenChange, }: DialogControllerProps) => react.JSX.Element;
|
|
273
270
|
};
|
|
274
271
|
|
|
275
272
|
interface DividerProps extends SeparatorProps {
|
|
276
273
|
variant?: string;
|
|
277
274
|
}
|
|
278
|
-
declare const Divider: ({ variant, ...props }: DividerProps) =>
|
|
275
|
+
declare const Divider: ({ variant, ...props }: DividerProps) => react.JSX.Element;
|
|
279
276
|
|
|
280
277
|
interface LabelProps extends HtmlProps<'label'> {
|
|
281
278
|
as?: 'label' | 'span';
|
|
@@ -283,7 +280,7 @@ interface LabelProps extends HtmlProps<'label'> {
|
|
|
283
280
|
size?: string;
|
|
284
281
|
labelWidth?: string;
|
|
285
282
|
}
|
|
286
|
-
declare const Label: ({ as, children, variant, size, labelWidth, ...props }: LabelProps) =>
|
|
283
|
+
declare const Label: ({ as, children, variant, size, labelWidth, ...props }: LabelProps) => react.JSX.Element;
|
|
287
284
|
|
|
288
285
|
interface FieldBaseProps extends WidthProp {
|
|
289
286
|
children?: ReactNode;
|
|
@@ -299,32 +296,32 @@ interface FieldBaseProps extends WidthProp {
|
|
|
299
296
|
errorMessageProps?: HTMLAttributes<HTMLElement>;
|
|
300
297
|
stateProps?: StateAttrProps;
|
|
301
298
|
}
|
|
302
|
-
declare const FieldBase: ({ children, variant, size, width, disabled, label, labelProps, description, descriptionProps, error, errorMessage, errorMessageProps, stateProps, ...props }: FieldBaseProps) =>
|
|
299
|
+
declare const FieldBase: ({ children, variant, size, width, disabled, label, labelProps, description, descriptionProps, error, errorMessage, errorMessageProps, stateProps, ...props }: FieldBaseProps) => react.JSX.Element;
|
|
303
300
|
|
|
304
301
|
interface FieldGroupContextProps {
|
|
305
302
|
labelWidth?: string;
|
|
306
303
|
}
|
|
307
|
-
declare const FieldGroupContext:
|
|
304
|
+
declare const FieldGroupContext: react.Context<FieldGroupContextProps>;
|
|
308
305
|
declare const useFieldGroupContext: () => FieldGroupContextProps;
|
|
309
306
|
interface FieldGroupProps {
|
|
310
307
|
labelWidth?: string;
|
|
311
308
|
children: ReactNode;
|
|
312
309
|
}
|
|
313
|
-
declare const FieldGroup: ({ labelWidth, children }: FieldGroupProps) =>
|
|
310
|
+
declare const FieldGroup: ({ labelWidth, children }: FieldGroupProps) => react.JSX.Element;
|
|
314
311
|
|
|
315
312
|
interface FooterProps extends HtmlProps<'footer'> {
|
|
316
313
|
children?: ReactNode;
|
|
317
314
|
variant?: string;
|
|
318
315
|
size?: string;
|
|
319
316
|
}
|
|
320
|
-
declare const Footer: ({ children, variant, size, ...props }: FooterProps) =>
|
|
317
|
+
declare const Footer: ({ children, variant, size, ...props }: FooterProps) => react.JSX.Element;
|
|
321
318
|
|
|
322
319
|
interface HeaderProps extends HtmlProps<'header'> {
|
|
323
320
|
children?: ReactNode;
|
|
324
321
|
variant?: string;
|
|
325
322
|
size?: string;
|
|
326
323
|
}
|
|
327
|
-
declare const Header: ({ children, variant, size, className, ...props }: HeaderProps) =>
|
|
324
|
+
declare const Header: ({ children, variant, size, className, ...props }: HeaderProps) => react.JSX.Element;
|
|
328
325
|
|
|
329
326
|
interface HeadlineProps extends HtmlProps<'h1'>, TextAlignProp {
|
|
330
327
|
children?: ReactNode;
|
|
@@ -334,7 +331,7 @@ interface HeadlineProps extends HtmlProps<'h1'>, TextAlignProp {
|
|
|
334
331
|
size?: string;
|
|
335
332
|
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
336
333
|
}
|
|
337
|
-
declare const Headline: ({ children, variant, size, align, color, level, as, ...props }: HeadlineProps) =>
|
|
334
|
+
declare const Headline: ({ children, variant, size, align, color, level, as, ...props }: HeadlineProps) => react.JSX.Element;
|
|
338
335
|
|
|
339
336
|
interface ImageProps extends HtmlProps<'img'>, ObjectFitProp, ObjectPositionProp {
|
|
340
337
|
variant?: string;
|
|
@@ -342,14 +339,14 @@ interface ImageProps extends HtmlProps<'img'>, ObjectFitProp, ObjectPositionProp
|
|
|
342
339
|
children?: never;
|
|
343
340
|
alt: string;
|
|
344
341
|
}
|
|
345
|
-
declare const Image: ({ variant, size, fit, position, ...props }: ImageProps) =>
|
|
342
|
+
declare const Image: ({ variant, size, fit, position, ...props }: ImageProps) => react.JSX.Element;
|
|
346
343
|
|
|
347
344
|
interface InlineProps extends AlignmentProp, GapSpaceProp {
|
|
348
345
|
children?: ReactNode;
|
|
349
346
|
alignX?: keyof typeof alignment.horizontal.alignmentX;
|
|
350
347
|
alignY?: keyof typeof alignment.horizontal.alignmentY;
|
|
351
348
|
}
|
|
352
|
-
declare const Inline: ({ space, orientation, alignX, alignY, children, ...props }: InlineProps) =>
|
|
349
|
+
declare const Inline: ({ space, orientation, alignX, alignY, children, ...props }: InlineProps) => react.JSX.Element;
|
|
353
350
|
|
|
354
351
|
interface InputOwnProps extends Omit<HtmlProps<'input'>, 'size' | 'className'> {
|
|
355
352
|
icon?: ReactElement;
|
|
@@ -362,16 +359,16 @@ interface InputOwnProps extends Omit<HtmlProps<'input'>, 'size' | 'className'> {
|
|
|
362
359
|
icon?: string;
|
|
363
360
|
};
|
|
364
361
|
}
|
|
365
|
-
interface InputProps extends Omit<
|
|
362
|
+
interface InputProps extends Omit<ComponentPropsWithRef<'input'>, 'size' | 'className'>, InputOwnProps {
|
|
366
363
|
}
|
|
367
|
-
declare const Input:
|
|
364
|
+
declare const Input: react.ForwardRefExoticComponent<InputOwnProps & react.RefAttributes<HTMLInputElement>>;
|
|
368
365
|
|
|
369
366
|
interface DateFieldProps extends Omit<AriaDateFieldProps<DateValue>, 'isDisabled' | 'isReadOnly' | 'isRequired'> {
|
|
370
367
|
onChange?: (value: DateValue) => void;
|
|
371
368
|
value?: DateValue | null;
|
|
372
369
|
defaultValue?: DateValue | null;
|
|
373
|
-
ref?:
|
|
374
|
-
triggerRef?:
|
|
370
|
+
ref?: RefObject<unknown> | undefined;
|
|
371
|
+
triggerRef?: RefObject<HTMLDivElement> | undefined;
|
|
375
372
|
action?: ReactElement;
|
|
376
373
|
isPressed?: boolean;
|
|
377
374
|
error?: boolean;
|
|
@@ -383,7 +380,7 @@ interface DateFieldProps extends Omit<AriaDateFieldProps<DateValue>, 'isDisabled
|
|
|
383
380
|
size?: string;
|
|
384
381
|
width?: WidthProp['width'];
|
|
385
382
|
}
|
|
386
|
-
declare const DateField: ({ disabled, readOnly, required, error, errorMessage, errorMessageProps, variant, size, action, isPressed, triggerRef, width, ...res }: DateFieldProps) =>
|
|
383
|
+
declare const DateField: ({ disabled, readOnly, required, error, errorMessage, errorMessageProps, variant, size, action, isPressed, triggerRef, width, ...res }: DateFieldProps) => react.JSX.Element;
|
|
387
384
|
|
|
388
385
|
interface CalendarProps extends Omit<AriaCalendarProps<DateValue$1>, 'isDisabled' | 'isReadOnly'> {
|
|
389
386
|
disabled?: boolean;
|
|
@@ -391,17 +388,17 @@ interface CalendarProps extends Omit<AriaCalendarProps<DateValue$1>, 'isDisabled
|
|
|
391
388
|
variant?: string;
|
|
392
389
|
size?: string;
|
|
393
390
|
}
|
|
394
|
-
declare const Calendar: ({ disabled, readOnly, size, variant, ...rest }: CalendarProps) =>
|
|
391
|
+
declare const Calendar: ({ disabled, readOnly, size, variant, ...rest }: CalendarProps) => react.JSX.Element;
|
|
395
392
|
|
|
396
393
|
interface CalendarCellProps extends AriaCalendarCellProps {
|
|
397
394
|
state: CalendarState;
|
|
398
395
|
}
|
|
399
|
-
declare const CalendarCell: (props: CalendarCellProps) =>
|
|
396
|
+
declare const CalendarCell: (props: CalendarCellProps) => react.JSX.Element;
|
|
400
397
|
|
|
401
398
|
interface CalendarGridProps extends AriaCalendarGridProps {
|
|
402
399
|
state: CalendarState;
|
|
403
400
|
}
|
|
404
|
-
declare const CalendarGrid: ({ state, ...props }: CalendarGridProps) =>
|
|
401
|
+
declare const CalendarGrid: ({ state, ...props }: CalendarGridProps) => react.JSX.Element;
|
|
405
402
|
|
|
406
403
|
interface DatePickerProps extends Omit<AriaDatePickerProps<CalendarDate>, 'isDisabled' | 'isRequired' | 'isReadOnly' | 'isOpen'> {
|
|
407
404
|
disabled?: boolean;
|
|
@@ -413,7 +410,7 @@ interface DatePickerProps extends Omit<AriaDatePickerProps<CalendarDate>, 'isDis
|
|
|
413
410
|
variant?: string;
|
|
414
411
|
size?: string;
|
|
415
412
|
}
|
|
416
|
-
declare const DatePicker: ({ disabled, required, readonly, open, error, shouldCloseOnSelect, variant, size, ...rest }: DatePickerProps) =>
|
|
413
|
+
declare const DatePicker: ({ disabled, required, readonly, open, error, shouldCloseOnSelect, variant, size, ...rest }: DatePickerProps) => react.JSX.Element;
|
|
417
414
|
|
|
418
415
|
type InsetProps = {
|
|
419
416
|
children: ReactNode;
|
|
@@ -426,7 +423,7 @@ type InsetProps = {
|
|
|
426
423
|
spaceX?: never;
|
|
427
424
|
spaceY?: never;
|
|
428
425
|
};
|
|
429
|
-
declare const Inset: ({ space, spaceX, spaceY, children, }: InsetProps) =>
|
|
426
|
+
declare const Inset: ({ space, spaceX, spaceY, children, }: InsetProps) => react.JSX.Element;
|
|
430
427
|
|
|
431
428
|
interface LinkOwnProps extends PressEvents {
|
|
432
429
|
disabled?: boolean;
|
|
@@ -449,8 +446,8 @@ interface ListProps extends HtmlProps<'ul'> {
|
|
|
449
446
|
children?: ReactNode;
|
|
450
447
|
}
|
|
451
448
|
declare const List: {
|
|
452
|
-
({ as, children, variant, size, ...props }: ListProps):
|
|
453
|
-
Item: ({ children, ...props }: ListItemProps) =>
|
|
449
|
+
({ as, children, variant, size, ...props }: ListProps): react.JSX.Element;
|
|
450
|
+
Item: ({ children, ...props }: ListItemProps) => react.JSX.Element;
|
|
454
451
|
};
|
|
455
452
|
|
|
456
453
|
interface MenuTriggerProps {
|
|
@@ -467,27 +464,27 @@ interface MenuProps extends Omit<HtmlProps<'ul'>, 'onSelect' | 'size'> {
|
|
|
467
464
|
onAction?: (key: Key) => void;
|
|
468
465
|
}
|
|
469
466
|
declare const Menu: {
|
|
470
|
-
({ variant, size, ...props }: MenuProps):
|
|
471
|
-
Trigger: ({ disabled, open, onOpenChange, children, }: MenuTriggerProps) =>
|
|
467
|
+
({ variant, size, ...props }: MenuProps): react.JSX.Element;
|
|
468
|
+
Trigger: ({ disabled, open, onOpenChange, children, }: MenuTriggerProps) => react.JSX.Element;
|
|
472
469
|
Item: <T>(props: _react_types_shared.ItemProps<T>) => JSX.Element;
|
|
473
470
|
Section: <T_1>(props: _react_types_shared.SectionProps<T_1>) => JSX.Element;
|
|
474
471
|
};
|
|
475
472
|
|
|
476
473
|
interface ActionMenuProps extends MenuProps {
|
|
477
474
|
}
|
|
478
|
-
declare const ActionMenu: (props: ActionMenuProps) =>
|
|
475
|
+
declare const ActionMenu: (props: ActionMenuProps) => react.JSX.Element;
|
|
479
476
|
|
|
480
477
|
declare const icons: {
|
|
481
|
-
info: () =>
|
|
482
|
-
warning: () =>
|
|
483
|
-
error: () =>
|
|
478
|
+
info: () => react.JSX.Element;
|
|
479
|
+
warning: () => react.JSX.Element;
|
|
480
|
+
error: () => react.JSX.Element;
|
|
484
481
|
};
|
|
485
482
|
interface MessageProps extends HtmlProps<'div'> {
|
|
486
483
|
messageTitle: ReactNode;
|
|
487
484
|
variant?: keyof typeof icons;
|
|
488
485
|
size?: string;
|
|
489
486
|
}
|
|
490
|
-
declare const Message: ({ messageTitle, variant, size, children, ...props }: MessageProps) =>
|
|
487
|
+
declare const Message: ({ messageTitle, variant, size, children, ...props }: MessageProps) => react.JSX.Element;
|
|
491
488
|
|
|
492
489
|
/**
|
|
493
490
|
* `react-aria` has a slightly different API for some DOM props.
|
|
@@ -500,7 +497,7 @@ interface NumberFieldProps extends Omit<HtmlProps<'input'>, CustomProps>, Omit<A
|
|
|
500
497
|
width?: WidthProp['width'];
|
|
501
498
|
hideStepper?: boolean;
|
|
502
499
|
}
|
|
503
|
-
declare const NumberField:
|
|
500
|
+
declare const NumberField: react.ForwardRefExoticComponent<NumberFieldProps & react.RefAttributes<HTMLInputElement>>;
|
|
504
501
|
|
|
505
502
|
interface ModalProps extends HTMLAttributes<HTMLElement> {
|
|
506
503
|
children?: ReactNode;
|
|
@@ -509,21 +506,21 @@ interface ModalProps extends HTMLAttributes<HTMLElement> {
|
|
|
509
506
|
dismissable?: boolean;
|
|
510
507
|
keyboardDismissable?: boolean;
|
|
511
508
|
}
|
|
512
|
-
declare const Modal:
|
|
509
|
+
declare const Modal: react.ForwardRefExoticComponent<ModalProps & react.RefAttributes<HTMLDivElement>>;
|
|
513
510
|
|
|
514
511
|
interface OverlayProps {
|
|
515
512
|
open: boolean;
|
|
516
513
|
children: OverlayProps$1['children'];
|
|
517
514
|
container?: OverlayProps$1['portalContainer'];
|
|
518
515
|
}
|
|
519
|
-
declare const Overlay: ({ children, container, open }: OverlayProps) =>
|
|
516
|
+
declare const Overlay: ({ children, container, open }: OverlayProps) => react.JSX.Element | null;
|
|
520
517
|
|
|
521
518
|
interface PopoverProps extends Pick<AriaPopoverProps, 'triggerRef' | 'scrollRef' | 'isNonModal'> {
|
|
522
519
|
keyboardDismissDisabled?: AriaPopoverProps['isKeyboardDismissDisabled'];
|
|
523
520
|
state: OverlayTriggerState;
|
|
524
521
|
children: ReactNode;
|
|
525
522
|
}
|
|
526
|
-
declare const Popover:
|
|
523
|
+
declare const Popover: react.ForwardRefExoticComponent<PopoverProps & react.RefAttributes<HTMLDivElement>>;
|
|
527
524
|
|
|
528
525
|
interface TrayProps extends AriaModalOverlayProps, StyleProps, OverlayProps$1 {
|
|
529
526
|
children: ReactNode;
|
|
@@ -531,18 +528,18 @@ interface TrayProps extends AriaModalOverlayProps, StyleProps, OverlayProps$1 {
|
|
|
531
528
|
}
|
|
532
529
|
interface TrayWrapperProps extends TrayProps {
|
|
533
530
|
}
|
|
534
|
-
declare const Tray:
|
|
535
|
-
declare const TrayWrapper:
|
|
531
|
+
declare const Tray: react.ForwardRefExoticComponent<TrayProps & react.RefAttributes<HTMLDivElement>>;
|
|
532
|
+
declare const TrayWrapper: react.ForwardRefExoticComponent<TrayWrapperProps & react.RefAttributes<HTMLDivElement>>;
|
|
536
533
|
|
|
537
534
|
interface UnderlayProps extends HTMLAttributes<HTMLElement> {
|
|
538
535
|
variant?: string;
|
|
539
536
|
size?: string;
|
|
540
537
|
}
|
|
541
|
-
declare const Underlay: ({ size, variant, ...props }: UnderlayProps) =>
|
|
538
|
+
declare const Underlay: ({ size, variant, ...props }: UnderlayProps) => react.JSX.Element;
|
|
542
539
|
|
|
543
540
|
interface MarigoldProviderProps<T extends Theme> extends ThemeProviderProps<T> {
|
|
544
541
|
}
|
|
545
|
-
declare function MarigoldProvider<T extends Theme>({ children, theme, }: MarigoldProviderProps<T>):
|
|
542
|
+
declare function MarigoldProvider<T extends Theme>({ children, theme, }: MarigoldProviderProps<T>): react.JSX.Element;
|
|
546
543
|
|
|
547
544
|
interface RadioGroupProps extends Omit<AriaRadioGroupProps, 'isDisabled' | 'isRquired' | 'isReadOnly ' | 'validationState'> {
|
|
548
545
|
children: ReactNode[];
|
|
@@ -552,7 +549,7 @@ interface RadioGroupProps extends Omit<AriaRadioGroupProps, 'isDisabled' | 'isRq
|
|
|
552
549
|
readOnly?: boolean;
|
|
553
550
|
error?: boolean;
|
|
554
551
|
}
|
|
555
|
-
declare const RadioGroup: ({ children, orientation, width, required, disabled, readOnly, error, ...rest }: RadioGroupProps) =>
|
|
552
|
+
declare const RadioGroup: ({ children, orientation, width, required, disabled, readOnly, error, ...rest }: RadioGroupProps) => react.JSX.Element;
|
|
556
553
|
|
|
557
554
|
type CustomRadioProps = 'size' | 'width' | 'type' | 'defaultChecked' | 'value' | 'onFocus' | 'onBlur' | 'onKeyUp' | 'onKeyDown';
|
|
558
555
|
interface RadioProps extends Omit<HtmlProps<'input'>, CustomRadioProps>, AriaRadioProps {
|
|
@@ -590,10 +587,6 @@ interface SelectComponent extends ForwardRefExoticComponent<SelectProps & RefAtt
|
|
|
590
587
|
Section: typeof Section;
|
|
591
588
|
}
|
|
592
589
|
|
|
593
|
-
/**
|
|
594
|
-
* Thanks to react-aria: https://react-spectrum.adobe.com/react-aria/useSlider.html
|
|
595
|
-
*/
|
|
596
|
-
|
|
597
590
|
interface SliderProps extends Omit<HtmlProps<'input'>, 'step' | 'value' | 'defaultValue' | 'onChange' | 'onFocus' | 'onBlur' | 'size' | 'width'>,
|
|
598
591
|
/**
|
|
599
592
|
* `react-aria` has a slightly different API for some events e.g `onChange`, `onFocus`
|
|
@@ -611,11 +604,11 @@ Pick<AriaSliderProps, 'maxValue' | 'step' | 'value' | 'defaultValue' | 'onChange
|
|
|
611
604
|
* A label + the output value and the slider functionality itself.
|
|
612
605
|
* The slider itself consists of a track line and a thumb.
|
|
613
606
|
*/
|
|
614
|
-
declare const Slider:
|
|
607
|
+
declare const Slider: react.ForwardRefExoticComponent<SliderProps & react.RefAttributes<HTMLDivElement>>;
|
|
615
608
|
|
|
616
609
|
interface SplitProps extends HtmlProps<'div'> {
|
|
617
610
|
}
|
|
618
|
-
declare const Split: (props: SplitProps) =>
|
|
611
|
+
declare const Split: (props: SplitProps) => react.JSX.Element;
|
|
619
612
|
|
|
620
613
|
interface StackProps extends AlignmentProp, GapSpaceProp {
|
|
621
614
|
children?: ReactNode;
|
|
@@ -623,7 +616,7 @@ interface StackProps extends AlignmentProp, GapSpaceProp {
|
|
|
623
616
|
alignX?: keyof typeof alignment.vertical.alignmentX;
|
|
624
617
|
alignY?: keyof typeof alignment.vertical.alignmentY;
|
|
625
618
|
}
|
|
626
|
-
declare const Stack: ({ children, space, stretch, orientation, alignX, alignY, ...props }: StackProps) =>
|
|
619
|
+
declare const Stack: ({ children, space, stretch, orientation, alignX, alignY, ...props }: StackProps) => react.JSX.Element;
|
|
627
620
|
|
|
628
621
|
type CustomSwitchProps = 'size' | 'value' | 'onBlur' | 'onChange' | 'onFocus' | 'onKeyDown' | 'onKeyUp';
|
|
629
622
|
interface SwitchProps extends Omit<AriaSwitchProps, 'isSelected'>, Omit<HtmlProps<'input'>, CustomSwitchProps> {
|
|
@@ -632,7 +625,7 @@ interface SwitchProps extends Omit<AriaSwitchProps, 'isSelected'>, Omit<HtmlProp
|
|
|
632
625
|
size?: string;
|
|
633
626
|
width?: string;
|
|
634
627
|
}
|
|
635
|
-
declare const Switch:
|
|
628
|
+
declare const Switch: react.ForwardRefExoticComponent<SwitchProps & react.RefAttributes<HTMLInputElement>>;
|
|
636
629
|
|
|
637
630
|
interface TableProps extends Pick<AriaTableProps<object>, 'focusMode' | 'onRowAction' | 'onCellAction'>, Omit<TableStateProps<object>, 'showSelectionCheckboxes'> {
|
|
638
631
|
variant?: string;
|
|
@@ -643,6 +636,8 @@ interface RowProps extends RowProps$1 {
|
|
|
643
636
|
variant?: string;
|
|
644
637
|
size?: string;
|
|
645
638
|
}
|
|
639
|
+
interface ColumnProps extends Omit<ColumnProps$1<any>, 'width'>, WidthProp {
|
|
640
|
+
}
|
|
646
641
|
declare const Table: Table;
|
|
647
642
|
/**
|
|
648
643
|
* Necessary since TypeScript can not infer the
|
|
@@ -652,8 +647,8 @@ interface Table {
|
|
|
652
647
|
(props: TableProps): JSX.Element;
|
|
653
648
|
Body: typeof TableBody;
|
|
654
649
|
Cell: typeof Cell;
|
|
655
|
-
Column: typeof Column;
|
|
656
650
|
Header: typeof TableHeader;
|
|
651
|
+
Column: (props: ColumnProps) => JSX.Element;
|
|
657
652
|
Row: (props: RowProps) => JSX.Element;
|
|
658
653
|
}
|
|
659
654
|
|
|
@@ -663,7 +658,7 @@ interface TextProps extends HtmlProps<'p'>, TextAlignProp, FontSizeProp, FontWei
|
|
|
663
658
|
color?: string;
|
|
664
659
|
size?: string;
|
|
665
660
|
}
|
|
666
|
-
declare const Text: ({ variant, size, color, align, cursor, weight, fontSize, fontStyle, children, ...props }: TextProps) =>
|
|
661
|
+
declare const Text: ({ variant, size, color, align, cursor, weight, fontSize, fontStyle, children, ...props }: TextProps) => react.JSX.Element;
|
|
667
662
|
|
|
668
663
|
/**
|
|
669
664
|
* `react-aria` has a slightly different API for the above events.
|
|
@@ -677,7 +672,7 @@ interface TextAreaProps extends Omit<HtmlProps<'textarea'>, 'value' | 'defaultVa
|
|
|
677
672
|
value?: string;
|
|
678
673
|
defaultValue?: string;
|
|
679
674
|
}
|
|
680
|
-
declare const TextArea:
|
|
675
|
+
declare const TextArea: react.ForwardRefExoticComponent<TextAreaProps & react.RefAttributes<HTMLTextAreaElement>>;
|
|
681
676
|
|
|
682
677
|
/**
|
|
683
678
|
* `react-aria` has a slightly different API for the above events.
|
|
@@ -696,7 +691,7 @@ Pick<AriaTextFieldProps, CustomTextFieldEvents>, Pick<FieldBaseProps, 'label' |
|
|
|
696
691
|
value?: string;
|
|
697
692
|
defaultValue?: string;
|
|
698
693
|
}
|
|
699
|
-
declare const TextField:
|
|
694
|
+
declare const TextField: react.ForwardRefExoticComponent<TextFieldProps & react.RefAttributes<HTMLInputElement>>;
|
|
700
695
|
|
|
701
696
|
interface TilesProps extends GapSpaceProp {
|
|
702
697
|
children: ReactNode;
|
|
@@ -704,7 +699,7 @@ interface TilesProps extends GapSpaceProp {
|
|
|
704
699
|
stretch?: boolean;
|
|
705
700
|
equalHeight?: boolean;
|
|
706
701
|
}
|
|
707
|
-
declare const Tiles: ({ space, stretch, equalHeight, tilesWidth, children, ...props }: TilesProps) =>
|
|
702
|
+
declare const Tiles: ({ space, stretch, equalHeight, tilesWidth, children, ...props }: TilesProps) => react.JSX.Element;
|
|
708
703
|
|
|
709
704
|
interface TooltipTriggerProps extends Omit<TooltipTriggerProps$1, 'isDisabled' | 'isOpen'>, Omit<PositionProps, 'isOpen'> {
|
|
710
705
|
children: [trigger: ReactElement, menu: ReactElement];
|
|
@@ -718,8 +713,8 @@ interface TooltipProps extends HtmlProps<'div'> {
|
|
|
718
713
|
size?: string;
|
|
719
714
|
}
|
|
720
715
|
declare const Tooltip: {
|
|
721
|
-
({ children, variant, size }: TooltipProps):
|
|
722
|
-
Trigger: ({ disabled, open, delay, placement, children, ...rest }: TooltipTriggerProps) =>
|
|
716
|
+
({ children, variant, size }: TooltipProps): react.JSX.Element;
|
|
717
|
+
Trigger: ({ disabled, open, delay, placement, children, ...rest }: TooltipTriggerProps) => react.JSX.Element;
|
|
723
718
|
};
|
|
724
719
|
|
|
725
720
|
interface TagGroupProps extends Omit<AriaTagGroupProps<object>, 'isRequired' | 'validationState'>, LabelableProps, HelpTextProps {
|
|
@@ -728,7 +723,7 @@ interface TagGroupProps extends Omit<AriaTagGroupProps<object>, 'isRequired' | '
|
|
|
728
723
|
error?: boolean;
|
|
729
724
|
allowsRemoving?: boolean;
|
|
730
725
|
}
|
|
731
|
-
declare const TagGroup: ({ width, required, error, allowsRemoving, ...rest }: TagGroupProps) =>
|
|
726
|
+
declare const TagGroup: ({ width, required, error, allowsRemoving, ...rest }: TagGroupProps) => react.JSX.Element;
|
|
732
727
|
|
|
733
728
|
declare const Tag: TagComponent;
|
|
734
729
|
/**
|
|
@@ -740,7 +735,7 @@ interface TagComponent extends ItemComponent {
|
|
|
740
735
|
Group: typeof TagGroup;
|
|
741
736
|
}
|
|
742
737
|
|
|
743
|
-
declare const XLoader:
|
|
738
|
+
declare const XLoader: react.ForwardRefExoticComponent<SVGProps & react.RefAttributes<SVGElement>>;
|
|
744
739
|
|
|
745
740
|
interface TabsProps extends Omit<AriaTabListProps<object>, 'orientation' | 'isDisabled'>, GapSpaceProp {
|
|
746
741
|
size?: 'small' | 'medium' | 'large';
|
|
@@ -748,8 +743,8 @@ interface TabsProps extends Omit<AriaTabListProps<object>, 'orientation' | 'isDi
|
|
|
748
743
|
variant?: string;
|
|
749
744
|
}
|
|
750
745
|
declare const Tabs: {
|
|
751
|
-
({ space, size, disabled, variant, ...rest }: TabsProps):
|
|
746
|
+
({ space, size, disabled, variant, ...rest }: TabsProps): react.JSX.Element;
|
|
752
747
|
Item: <T>(props: _react_types_shared.ItemProps<T>) => JSX.Element;
|
|
753
748
|
};
|
|
754
749
|
|
|
755
|
-
export { Accordion, AccordionItem, AccordionItemProps, AccordionOwnItemProps, AccordionProps, ActionMenu, Aside, AsideProps, Aspect, AspectProps, Autocomplete, AutocompleteProps, Badge, BadgeProps, Body, BodyProps, Breakout, BreakoutProps, Button, ButtonOwnProps, ButtonProps, Calendar, CalendarCell, CalendarCellProps, CalendarGrid, CalendarGridProps, CalendarProps, Card, CardProps, Center, CenterProps, Checkbox, CheckboxGroup, CheckboxGroupContext, CheckboxGroupContextProps, CheckboxGroupProps, CheckboxProps, Columns, ColumnsProps, ComboBox, ComboBoxProps, Container, ContainerProps, CustomCheckboxProps, CustomRadioProps, CustomSwitchProps, CustomTextAreaEvents, CustomTextFieldEvents, DateField, DateFieldProps, DatePicker, DatePickerProps, Dialog, DialogChildProps, DialogProps, Divider, DividerProps, FieldBase, FieldBaseProps, FieldGroup, FieldGroupContext, FieldGroupContextProps, FieldGroupProps, Footer, FooterProps, Header, HeaderProps, Headline, HeadlineProps, Image, ImageProps, Inline, InlineProps, Input, InputOwnProps, InputProps, Inset, InsetProps, Label, LabelProps, Link, LinkOwnProps, LinkProps, List, ListProps, MarigoldProvider, MarigoldProviderProps, Menu, MenuProps, Message, MessageProps, Modal, ModalProps, NumberField, NumberFieldProps, Overlay, OverlayProps, Popover, PopoverProps, Radio, RadioComponent, RadioGroupProps, RadioProps, RowProps, Select, SelectComponent, SelectProps, Slider, SliderProps, Split, SplitProps, Stack, StackProps, Switch, SwitchProps, Table, TableProps, Tabs, Tag, TagComponent, Text, TextArea, TextAreaProps, TextField, TextFieldProps, TextProps, Tiles, TilesProps, Tooltip, TooltipProps, Tray, TrayProps, TrayWrapper, Underlay, UnderlayProps, XLoader, useCheckboxGroupContext, useFieldGroupContext };
|
|
750
|
+
export { Accordion, AccordionItem, AccordionItemProps, AccordionOwnItemProps, AccordionProps, ActionMenu, Aside, AsideProps, Aspect, AspectProps, Autocomplete, AutocompleteProps, Badge, BadgeProps, Body, BodyProps, Breakout, BreakoutProps, Button, ButtonOwnProps, ButtonProps, Calendar, CalendarCell, CalendarCellProps, CalendarGrid, CalendarGridProps, CalendarProps, Card, CardProps, Center, CenterProps, Checkbox, CheckboxGroup, CheckboxGroupContext, CheckboxGroupContextProps, CheckboxGroupProps, CheckboxProps, Columns, ColumnsProps, ComboBox, ComboBoxProps, Container, ContainerProps, CustomCheckboxProps, CustomRadioProps, CustomSwitchProps, CustomTextAreaEvents, CustomTextFieldEvents, DateField, DateFieldProps, DatePicker, DatePickerProps, Dialog, DialogChildProps, DialogProps, Divider, DividerProps, FieldBase, FieldBaseProps, FieldGroup, FieldGroupContext, FieldGroupContextProps, FieldGroupProps, Footer, FooterProps, Header, HeaderProps, Headline, HeadlineProps, Image, ImageProps, Inline, InlineProps, Input, InputOwnProps, InputProps, Inset, InsetProps, Label, LabelProps, Link, LinkOwnProps, LinkProps, List, ListProps, MarigoldProvider, MarigoldProviderProps, Menu, MenuProps, Message, MessageProps, Modal, ModalProps, NumberField, NumberFieldProps, Overlay, OverlayProps, Popover, PopoverProps, Radio, RadioComponent, RadioGroup, RadioGroupProps, RadioProps, RowProps, Select, SelectComponent, SelectProps, Slider, SliderProps, Split, SplitProps, Stack, StackProps, Switch, SwitchProps, Table, TableProps, Tabs, Tag, TagComponent, Text, TextArea, TextAreaProps, TextField, TextFieldProps, TextProps, Tiles, TilesProps, Tooltip, TooltipProps, Tray, TrayProps, TrayWrapper, Underlay, UnderlayProps, XLoader, useCheckboxGroupContext, useFieldGroupContext };
|