@marigold/components 0.9.0 → 1.0.0-beta.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 +211 -177
- package/dist/index.js +1270 -965
- package/dist/index.mjs +1282 -959
- package/package.json +19 -9
package/dist/index.d.ts
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { Theme as Theme$1, ThemeProviderProps, ThemeExtension, ThemeComponentProps, ThemeExtensionsWithParts, BoxOwnProps,
|
|
1
|
+
import { Theme as Theme$1, ThemeProviderProps, ThemeExtension, ThemeComponentProps, ThemeExtensionsWithParts, BoxOwnProps, StateAttrProps, CSSObject, ResponsiveStyleValue } from '@marigold/system';
|
|
2
2
|
export { Box, BoxOwnProps, BoxProps, StyleProps, ThemeProvider, useTheme } from '@marigold/system';
|
|
3
|
-
import React, { ReactNode, Key, LabelHTMLAttributes,
|
|
3
|
+
import React, { ReactNode, HTMLAttributes, Key, LabelHTMLAttributes, ReactChild } from 'react';
|
|
4
4
|
import { ComponentProps, PolymorphicPropsWithRef, PolymorphicComponentWithRef, PolymorphicProps, PolymorphicComponent, NonZeroPercentage } from '@marigold/types';
|
|
5
5
|
import * as _react_types_shared from '@react-types/shared';
|
|
6
|
-
import { PressEvents, CollectionElement
|
|
7
|
-
import { AriaCheckboxProps, AriaCheckboxGroupProps
|
|
6
|
+
import { PressEvents, CollectionElement } from '@react-types/shared';
|
|
7
|
+
import { AriaCheckboxProps, AriaCheckboxGroupProps } from '@react-types/checkbox';
|
|
8
8
|
import { CheckboxGroupState } from '@react-stately/checkbox';
|
|
9
|
+
import { AriaDialogProps } from '@react-types/dialog';
|
|
9
10
|
import { SeparatorProps } from '@react-aria/separator';
|
|
10
|
-
import {
|
|
11
|
+
import { AriaNumberFieldProps } from '@react-types/numberfield';
|
|
12
|
+
import { AriaRadioGroupProps, AriaRadioProps } from '@react-types/radio';
|
|
11
13
|
import { AriaSelectProps } from '@react-types/select';
|
|
14
|
+
import { AriaSliderProps } from '@react-types/slider';
|
|
12
15
|
import { AriaSwitchProps } from '@react-types/switch';
|
|
13
16
|
import { TableProps as TableProps$1 } from '@react-aria/table';
|
|
14
|
-
import {
|
|
17
|
+
import { TableStateProps, TableBody, Cell, Column, TableHeader, Row } from '@react-stately/table';
|
|
18
|
+
import { AriaTextFieldProps } from '@react-types/textfield';
|
|
15
19
|
import { TooltipTriggerProps } from '@react-types/tooltip';
|
|
16
20
|
import { aspect, size } from '@marigold/tokens';
|
|
17
|
-
import * as _react_stately_overlays from '@react-stately/overlays';
|
|
18
21
|
import { OverlayProps as OverlayProps$1 } from '@react-aria/overlays';
|
|
19
|
-
import { AriaDialogProps } from '@react-types/dialog';
|
|
20
|
-
export { VisuallyHidden } from '@react-aria/visually-hidden';
|
|
21
22
|
export { SSRProvider } from '@react-aria/ssr';
|
|
22
23
|
import { TooltipTriggerState } from '@react-stately/tooltip';
|
|
23
|
-
export {
|
|
24
|
+
export { VisuallyHidden } from '@react-aria/visually-hidden';
|
|
24
25
|
|
|
25
26
|
interface RootThemeExtension<Value> {
|
|
26
27
|
root?: {
|
|
@@ -82,12 +83,16 @@ interface CheckboxGroupContextProps extends CheckboxGroupState {
|
|
|
82
83
|
variant?: string;
|
|
83
84
|
size?: string;
|
|
84
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* Needs to be falsy so we can check if a checkbox is used as standalone
|
|
88
|
+
* or in a group.
|
|
89
|
+
*/
|
|
85
90
|
declare const CheckboxGroupContext: React.Context<CheckboxGroupContextProps>;
|
|
86
91
|
declare const useCheckboxGroupContext: () => CheckboxGroupContextProps;
|
|
87
92
|
interface CheckboxGroupThemeExtension extends ThemeExtensionsWithParts<'CheckboxGroup', ['container', 'group']> {
|
|
88
93
|
}
|
|
89
94
|
interface CheckboxGroupProps extends Omit<ComponentProps<'div'>, 'onChange'>, AriaCheckboxGroupProps {
|
|
90
|
-
children
|
|
95
|
+
children: ReactNode;
|
|
91
96
|
variant?: string;
|
|
92
97
|
size?: string;
|
|
93
98
|
label?: ReactNode;
|
|
@@ -108,6 +113,34 @@ interface ContentProps extends ThemeComponentProps, ComponentProps<'section'> {
|
|
|
108
113
|
}
|
|
109
114
|
declare const Content: ({ children, variant, size, ...props }: ContentProps) => JSX.Element;
|
|
110
115
|
|
|
116
|
+
interface DialogTriggerProps {
|
|
117
|
+
children: [trigger: ReactNode, menu: ReactNode];
|
|
118
|
+
dismissable?: boolean;
|
|
119
|
+
keyboardDismissable?: boolean;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
interface DialogContextProps {
|
|
123
|
+
open?: boolean;
|
|
124
|
+
close?: () => void;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
interface DialogThemeExtension extends ThemeExtensionsWithParts<'Dialog', ['container', 'closeButton']> {
|
|
128
|
+
}
|
|
129
|
+
interface DialogChildProps {
|
|
130
|
+
close: DialogContextProps['close'];
|
|
131
|
+
titleProps: HTMLAttributes<HTMLElement>;
|
|
132
|
+
}
|
|
133
|
+
interface DialogProps extends AriaDialogProps {
|
|
134
|
+
children?: ReactNode | ((props: DialogChildProps) => ReactNode);
|
|
135
|
+
variant?: string;
|
|
136
|
+
size?: string;
|
|
137
|
+
closeButton?: boolean;
|
|
138
|
+
}
|
|
139
|
+
declare const Dialog: {
|
|
140
|
+
({ children, variant, size, closeButton, ...props }: DialogProps): JSX.Element;
|
|
141
|
+
Trigger: ({ children, dismissable, keyboardDismissable, }: DialogTriggerProps) => JSX.Element;
|
|
142
|
+
};
|
|
143
|
+
|
|
111
144
|
interface DividerThemeExtension extends ThemeExtension<'Divider'> {
|
|
112
145
|
}
|
|
113
146
|
interface DividerProps extends SeparatorProps {
|
|
@@ -158,8 +191,15 @@ interface InputProps extends Omit<React.ComponentPropsWithRef<'input'>, 'size'>,
|
|
|
158
191
|
}
|
|
159
192
|
declare const Input: React.ForwardRefExoticComponent<InputOwnProps & React.RefAttributes<HTMLInputElement>>;
|
|
160
193
|
|
|
161
|
-
interface LabelThemeExtension
|
|
194
|
+
interface LabelThemeExtension extends ThemeExtension<'Label'> {
|
|
162
195
|
}
|
|
196
|
+
interface LabelProps extends ComponentProps<'label'> {
|
|
197
|
+
as?: 'label' | 'span';
|
|
198
|
+
variant?: string;
|
|
199
|
+
size?: string;
|
|
200
|
+
required?: boolean;
|
|
201
|
+
}
|
|
202
|
+
declare const Label: ({ as, required, children, variant, size, ...props }: LabelProps) => JSX.Element;
|
|
163
203
|
|
|
164
204
|
interface LinkThemeExtension extends ThemeExtension<'Link'> {
|
|
165
205
|
}
|
|
@@ -172,6 +212,15 @@ interface LinkProps extends PolymorphicProps<LinkOwnProps, 'a'> {
|
|
|
172
212
|
}
|
|
173
213
|
declare const Link: PolymorphicComponent<LinkOwnProps, "a">;
|
|
174
214
|
|
|
215
|
+
interface ListBoxThemeExtension extends ThemeExtensionsWithParts<'ListBox', [
|
|
216
|
+
'container',
|
|
217
|
+
'list',
|
|
218
|
+
'option',
|
|
219
|
+
'section',
|
|
220
|
+
'sectionTitle'
|
|
221
|
+
]> {
|
|
222
|
+
}
|
|
223
|
+
|
|
175
224
|
interface MenuTriggerProps {
|
|
176
225
|
children: [trigger: ReactNode, menu: ReactNode];
|
|
177
226
|
disabled?: boolean;
|
|
@@ -191,17 +240,19 @@ declare const Menu: {
|
|
|
191
240
|
Item: <T>(props: _react_types_shared.ItemProps<T>) => JSX.Element;
|
|
192
241
|
};
|
|
193
242
|
|
|
194
|
-
interface
|
|
243
|
+
interface MessageThemeExtension extends ThemeExtensionsWithParts<'Message', [
|
|
244
|
+
'container',
|
|
245
|
+
'icon',
|
|
246
|
+
'title',
|
|
247
|
+
'content'
|
|
248
|
+
]> {
|
|
195
249
|
}
|
|
196
|
-
interface
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
fontSize?: string;
|
|
201
|
-
outline?: string;
|
|
202
|
-
children?: React.ReactNode;
|
|
250
|
+
interface MessageProps extends ComponentProps<'div'> {
|
|
251
|
+
messageTitle: ReactNode;
|
|
252
|
+
variant?: string;
|
|
253
|
+
size?: string;
|
|
203
254
|
}
|
|
204
|
-
declare const
|
|
255
|
+
declare const Message: ({ messageTitle, variant, size, children, ...props }: MessageProps) => JSX.Element;
|
|
205
256
|
|
|
206
257
|
interface FieldBaseProps {
|
|
207
258
|
children?: ReactNode;
|
|
@@ -210,7 +261,7 @@ interface FieldBaseProps {
|
|
|
210
261
|
disabled?: boolean;
|
|
211
262
|
required?: boolean;
|
|
212
263
|
label?: ReactNode;
|
|
213
|
-
labelProps?: LabelHTMLAttributes<HTMLLabelElement>;
|
|
264
|
+
labelProps?: LabelHTMLAttributes<HTMLLabelElement> & Pick<LabelProps, 'as'>;
|
|
214
265
|
description?: ReactNode;
|
|
215
266
|
descriptionProps?: HTMLAttributes<HTMLElement>;
|
|
216
267
|
error?: boolean;
|
|
@@ -219,133 +270,132 @@ interface FieldBaseProps {
|
|
|
219
270
|
stateProps?: StateAttrProps;
|
|
220
271
|
}
|
|
221
272
|
|
|
222
|
-
interface
|
|
273
|
+
interface NumberFieldThemeExtension extends ThemeExtensionsWithParts<'NumberField', ['group', 'stepper']> {
|
|
223
274
|
}
|
|
224
275
|
/**
|
|
225
|
-
* `react-aria` has a slightly different API for
|
|
276
|
+
* `react-aria` has a slightly different API for some DOM props.
|
|
226
277
|
* Thus, we adjust our regular props to match them.
|
|
227
278
|
*/
|
|
228
|
-
declare type
|
|
229
|
-
interface
|
|
230
|
-
|
|
231
|
-
|
|
279
|
+
declare type CustomProps = 'size' | 'type' | 'value' | 'defaultValue' | 'step' | 'onChange' | 'onFocus' | 'onBlur' | 'onKeyDown' | 'onKeyUp' | 'min' | 'max';
|
|
280
|
+
interface NumberFieldProps extends Omit<ComponentProps<'input'>, CustomProps>, Omit<AriaNumberFieldProps, 'isDisabled' | 'isRequired' | 'isReadOnly'>, Pick<FieldBaseProps, 'label' | 'description' | 'error' | 'errorMessage'> {
|
|
281
|
+
variant?: string;
|
|
282
|
+
size?: string;
|
|
283
|
+
hideStepper?: boolean;
|
|
232
284
|
}
|
|
233
|
-
declare const
|
|
285
|
+
declare const NumberField: React.ForwardRefExoticComponent<NumberFieldProps & React.RefAttributes<HTMLInputElement>>;
|
|
234
286
|
|
|
235
|
-
interface
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
287
|
+
interface OverlayProps extends ComponentProps<'div'> {
|
|
288
|
+
children: ReactNode;
|
|
289
|
+
open?: boolean;
|
|
290
|
+
container?: HTMLElement;
|
|
239
291
|
}
|
|
240
|
-
declare
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
292
|
+
declare const Overlay: ({ children, open, container, ...props }: OverlayProps) => JSX.Element | null;
|
|
293
|
+
|
|
294
|
+
interface PopoverProps extends Omit<OverlayProps$1, 'isOpen' | 'isDismissable' | 'isKeyboardDismissDisabled'> {
|
|
295
|
+
children?: ReactNode;
|
|
296
|
+
open?: boolean;
|
|
297
|
+
dismissable?: boolean;
|
|
298
|
+
keyboardDismissDisabled?: boolean;
|
|
299
|
+
/**
|
|
300
|
+
* Adjust size of the popover. This is used to make the popover
|
|
301
|
+
* at least the same width as its anchor element.
|
|
302
|
+
*/
|
|
303
|
+
minWidth?: number | string;
|
|
249
304
|
}
|
|
250
|
-
declare const
|
|
305
|
+
declare const Popover: React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<unknown>>;
|
|
251
306
|
|
|
252
|
-
interface
|
|
253
|
-
message?: {
|
|
254
|
-
[key: string]: Value;
|
|
255
|
-
};
|
|
307
|
+
interface UnderlayThemeExtension extends ThemeExtension<'Underlay'> {
|
|
256
308
|
}
|
|
257
|
-
interface
|
|
258
|
-
messageTitle: string;
|
|
309
|
+
interface UnderlayProps extends HTMLAttributes<HTMLElement> {
|
|
259
310
|
variant?: string;
|
|
311
|
+
size?: string;
|
|
260
312
|
}
|
|
261
|
-
declare const
|
|
313
|
+
declare const Underlay: ({ size, variant, ...props }: UnderlayProps) => JSX.Element;
|
|
262
314
|
|
|
263
|
-
interface
|
|
315
|
+
interface RadioGroupThemeExtension extends ThemeExtensionsWithParts<'RadioGroup', ['container', 'group']> {
|
|
316
|
+
}
|
|
317
|
+
interface RadioGroupProps extends Omit<AriaRadioGroupProps, 'isDisabled' | 'isRquired' | 'isReadOnly ' | 'validationState'> {
|
|
318
|
+
children: ReactNode[];
|
|
264
319
|
variant?: string;
|
|
265
|
-
|
|
320
|
+
size?: string;
|
|
321
|
+
required?: boolean;
|
|
266
322
|
disabled?: boolean;
|
|
323
|
+
readOnly?: boolean;
|
|
267
324
|
error?: boolean;
|
|
268
325
|
}
|
|
269
326
|
|
|
270
|
-
interface RadioThemeExtension<
|
|
271
|
-
radio?: {
|
|
272
|
-
[key: string]: Value;
|
|
273
|
-
};
|
|
327
|
+
interface RadioThemeExtension extends ThemeExtensionsWithParts<'Radio', ['container', 'label', 'radio']> {
|
|
274
328
|
}
|
|
275
|
-
|
|
329
|
+
declare type CustomRadioProps = 'value' | 'onFocus' | 'onBlur' | 'onKeyUp' | 'onKeyDown';
|
|
330
|
+
interface RadioProps extends ThemeComponentProps, Omit<ComponentProps<'input'>, 'size' | 'type' | 'defaultChecked' | CustomRadioProps>, AriaRadioProps {
|
|
331
|
+
disabled?: boolean;
|
|
276
332
|
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
required
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
declare const Radio: React.FC<RadioProps>;
|
|
284
|
-
|
|
285
|
-
interface SelectThemeExtension<Value> {
|
|
286
|
-
select?: {
|
|
287
|
-
__default: Value;
|
|
288
|
-
disabled?: Value;
|
|
289
|
-
listbox?: {
|
|
290
|
-
__default: Value;
|
|
291
|
-
error?: Value;
|
|
292
|
-
};
|
|
293
|
-
section?: Value;
|
|
294
|
-
option?: Value;
|
|
295
|
-
};
|
|
333
|
+
declare const Radio: {
|
|
334
|
+
({ disabled, ...props }: RadioProps): JSX.Element;
|
|
335
|
+
Group: ({ children, orientation, size, variant, required, disabled, readOnly, error, ...rest }: RadioGroupProps) => JSX.Element;
|
|
336
|
+
};
|
|
337
|
+
|
|
338
|
+
interface SelectThemeExtension extends ThemeExtensionsWithParts<'Select', ['container', 'button', 'icon']> {
|
|
296
339
|
}
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
placeholder?: string;
|
|
340
|
+
interface SelectProps extends Omit<AriaSelectProps<object>, 'autoComplete' | 'isOpen' | 'isLoading' | 'onLoadMore' | 'isDisabled' | 'isRequired' | 'validationState'>, Omit<ComponentProps<'select'>, 'onKeyUp' | 'onKeyDown' | 'onFocus' | 'onBlur' | 'children' | 'size'> {
|
|
341
|
+
open?: boolean;
|
|
300
342
|
disabled?: boolean;
|
|
301
343
|
required?: boolean;
|
|
302
|
-
width?: ResponsiveStyleValue<number | string>;
|
|
303
344
|
error?: boolean;
|
|
304
|
-
errorMessage?: string;
|
|
305
|
-
} & ComponentProps<'select'> & AriaSelectProps<object> & SingleSelection;
|
|
306
|
-
declare const Select: ({ labelVariant, placeholder, disabled, required, error, errorMessage, width, className, ...props }: SelectProps) => JSX.Element;
|
|
307
|
-
|
|
308
|
-
interface SliderThemeExtension<Value> {
|
|
309
|
-
slider?: {
|
|
310
|
-
[key: string]: Value;
|
|
311
|
-
};
|
|
312
|
-
}
|
|
313
|
-
interface SliderProps extends ComponentProps<'input'> {
|
|
314
345
|
variant?: string;
|
|
346
|
+
size?: string;
|
|
347
|
+
css?: CSSObject;
|
|
315
348
|
}
|
|
316
|
-
declare const
|
|
349
|
+
declare const Select: {
|
|
350
|
+
({ open, disabled, required, error, variant, size, css, ...rest }: SelectProps): JSX.Element;
|
|
351
|
+
Option: <T>(props: _react_types_shared.ItemProps<T>) => JSX.Element;
|
|
352
|
+
Section: <T_1>(props: _react_types_shared.SectionProps<T_1>) => JSX.Element;
|
|
353
|
+
};
|
|
317
354
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
355
|
+
/**
|
|
356
|
+
* Thanks to react-aria: https://react-spectrum.adobe.com/react-aria/useSlider.html
|
|
357
|
+
*/
|
|
358
|
+
|
|
359
|
+
interface SliderThemeExtension extends ThemeExtensionsWithParts<'Slider', [
|
|
360
|
+
'track',
|
|
361
|
+
'thumb',
|
|
362
|
+
'label',
|
|
363
|
+
'output'
|
|
364
|
+
]> {
|
|
322
365
|
}
|
|
323
|
-
|
|
366
|
+
interface SliderProps extends Omit<ComponentProps<'input'>, 'step' | 'value' | 'defaultValue' | 'onChange' | 'onFocus' | 'onBlur' | 'size'>,
|
|
367
|
+
/**
|
|
368
|
+
* `react-aria` has a slightly different API for some events e.g `onChange`, `onFocus`
|
|
369
|
+
* `onBlur`. Thus, we adjust our regular props to match them.
|
|
370
|
+
*/
|
|
371
|
+
Pick<AriaSliderProps, 'maxValue' | 'step' | 'value' | 'defaultValue' | 'onChange'> {
|
|
324
372
|
variant?: string;
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
declare const Switch: React.FC<SwitchProps>;
|
|
329
|
-
|
|
330
|
-
interface TableCellProps {
|
|
331
|
-
item: Node<object>;
|
|
332
|
-
state: TableState<object>;
|
|
333
|
-
/**
|
|
334
|
-
* Wheter it is a cell with a checkbox or a regular data cell
|
|
335
|
-
*/
|
|
336
|
-
isSelectionCell?: boolean;
|
|
337
|
-
align?: 'left' | 'center' | 'right';
|
|
338
|
-
css?: CSSObject;
|
|
373
|
+
size?: string;
|
|
374
|
+
formatOptions?: Intl.NumberFormatOptions;
|
|
375
|
+
children?: ReactNode;
|
|
339
376
|
}
|
|
377
|
+
/**
|
|
378
|
+
* Component Slider
|
|
379
|
+
* The slider consists of two parts.
|
|
380
|
+
* A label + the output value and the slider functionality itself.
|
|
381
|
+
* The slider itself consists of a track line and a thumb.
|
|
382
|
+
*/
|
|
383
|
+
declare const Slider: ({ variant, size, ...props }: SliderProps) => JSX.Element;
|
|
340
384
|
|
|
341
|
-
interface
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
css?: CSSObject;
|
|
385
|
+
interface SwitchThemeExtension extends ThemeExtensionsWithParts<'Switch', [
|
|
386
|
+
'container',
|
|
387
|
+
'label',
|
|
388
|
+
'track',
|
|
389
|
+
'thumb'
|
|
390
|
+
]> {
|
|
348
391
|
}
|
|
392
|
+
declare type CustomSwitchProps = 'size' | 'value' | 'onBlur' | 'onChange' | 'onFocus' | 'onKeyDown' | 'onKeyUp';
|
|
393
|
+
interface SwitchProps extends Omit<AriaSwitchProps, 'isSelected'>, Omit<ComponentProps<'input'>, CustomSwitchProps> {
|
|
394
|
+
checked?: boolean;
|
|
395
|
+
variant?: string;
|
|
396
|
+
size?: string;
|
|
397
|
+
}
|
|
398
|
+
declare const Switch: ({ variant, size, checked, disabled, readOnly, defaultChecked, ...rest }: SwitchProps) => JSX.Element;
|
|
349
399
|
|
|
350
400
|
interface TableThemeExtension extends ThemeExtensionsWithParts<'Table', [
|
|
351
401
|
'table',
|
|
@@ -355,8 +405,6 @@ interface TableThemeExtension extends ThemeExtensionsWithParts<'Table', [
|
|
|
355
405
|
]> {
|
|
356
406
|
}
|
|
357
407
|
interface TableProps extends Pick<TableProps$1<object>, 'onRowAction' | 'onCellAction'>, TableStateProps<object> {
|
|
358
|
-
align?: TableCellProps['align'];
|
|
359
|
-
alignHeader?: TableColumnHeaderProps['align'];
|
|
360
408
|
variant?: string;
|
|
361
409
|
size?: string;
|
|
362
410
|
}
|
|
@@ -374,6 +422,33 @@ interface Table {
|
|
|
374
422
|
Row: typeof Row;
|
|
375
423
|
}
|
|
376
424
|
|
|
425
|
+
interface TextThemeExtension extends ThemeExtension<'Text'> {
|
|
426
|
+
}
|
|
427
|
+
interface TextProps extends ThemeComponentProps, ComponentProps<'p'>, Omit<BoxOwnProps, 'variant'> {
|
|
428
|
+
align?: CSSObject['textAlign'];
|
|
429
|
+
color?: string;
|
|
430
|
+
cursor?: string;
|
|
431
|
+
fontSize?: string;
|
|
432
|
+
outline?: string;
|
|
433
|
+
children?: React.ReactNode;
|
|
434
|
+
}
|
|
435
|
+
declare const Text: ({ variant, size, align, color, fontSize, cursor, outline, children, ...props }: TextProps) => JSX.Element;
|
|
436
|
+
|
|
437
|
+
interface TextAreaThemeExtension extends ThemeExtension<'TextArea'> {
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* `react-aria` has a slightly different API for the above events.
|
|
441
|
+
* Thus, we adjust our regular props to match them.
|
|
442
|
+
*/
|
|
443
|
+
declare type CustomTextAreEvents = 'onChange' | 'onFocus' | 'onBlur' | 'onCopy' | 'onSelect' | 'onPaste' | 'onCut' | 'onCompositionStart' | 'onCompositionUpdate' | 'onCompositionEnd' | 'onBeforeInput' | 'onInput';
|
|
444
|
+
interface TextAreaProps extends Omit<ComponentProps<'textarea'>, 'value' | 'defaultValue' | CustomTextAreEvents | 'size'>, Pick<AriaTextFieldProps, CustomTextAreEvents>, Pick<FieldBaseProps, 'label' | 'description' | 'error' | 'errorMessage'> {
|
|
445
|
+
variant?: string;
|
|
446
|
+
size?: string;
|
|
447
|
+
value?: string;
|
|
448
|
+
defaultValue?: string;
|
|
449
|
+
}
|
|
450
|
+
declare const TextArea: ({ disabled, required, readOnly, error, variant, size, ...props }: TextAreaProps) => JSX.Element;
|
|
451
|
+
|
|
377
452
|
interface TooltipThemeExtension<Value> {
|
|
378
453
|
tooltip?: {
|
|
379
454
|
[key: string]: Value;
|
|
@@ -389,19 +464,9 @@ declare const TooltipContext: React.Context<{
|
|
|
389
464
|
}>;
|
|
390
465
|
declare const TooltipTrigger: React.FC;
|
|
391
466
|
|
|
392
|
-
interface
|
|
393
|
-
validation?: {
|
|
394
|
-
[key: string]: Value;
|
|
395
|
-
};
|
|
396
|
-
}
|
|
397
|
-
interface ValidationMessageProps extends ComponentProps<'span'> {
|
|
398
|
-
variant?: string;
|
|
399
|
-
}
|
|
400
|
-
declare const ValidationMessage: React.FC<ValidationMessageProps>;
|
|
401
|
-
|
|
402
|
-
interface ComponentStyles extends BadgeThemeExtension, ButtonThemeExtension, CardThemeExtension, CheckboxThemeExtension, CheckboxGroupThemeExtension, ContentThemeExtension, DividerThemeExtension, FooterThemeExtension, HeaderThemeExtension, HeadlineThemeExtension, HelpTextThemeExtension, ImageThemeExtension, InputThemeExtension, LabelThemeExtension$1, LabelThemeExtension$1, LinkThemeExtension, MenuThemeExtension, TableThemeExtension, TextThemeExtension, TextAreaThemeExtension {
|
|
467
|
+
interface ComponentStyles extends BadgeThemeExtension, ButtonThemeExtension, CardThemeExtension, CheckboxThemeExtension, CheckboxGroupThemeExtension, ContentThemeExtension, DialogThemeExtension, DividerThemeExtension, FooterThemeExtension, HeaderThemeExtension, HeadlineThemeExtension, HelpTextThemeExtension, ImageThemeExtension, InputThemeExtension, LabelThemeExtension, LinkThemeExtension, ListBoxThemeExtension, MenuThemeExtension, MessageThemeExtension, NumberFieldThemeExtension, RadioThemeExtension, RadioGroupThemeExtension, SelectThemeExtension, SliderThemeExtension, SwitchThemeExtension, TableThemeExtension, TextThemeExtension, TextAreaThemeExtension, UnderlayThemeExtension {
|
|
403
468
|
}
|
|
404
|
-
interface Theme extends Theme$1, RootThemeExtension<CSSObject>,
|
|
469
|
+
interface Theme extends Theme$1, RootThemeExtension<CSSObject>, TooltipThemeExtension<CSSObject> {
|
|
405
470
|
components: ComponentStyles;
|
|
406
471
|
}
|
|
407
472
|
|
|
@@ -439,32 +504,21 @@ interface CenterProps extends ComponentProps<'div'> {
|
|
|
439
504
|
declare const Center: React.FC<CenterProps>;
|
|
440
505
|
|
|
441
506
|
interface ColumnsProps {
|
|
507
|
+
children?: ReactNode;
|
|
442
508
|
columns: Array<number>;
|
|
443
509
|
space?: ResponsiveStyleValue<string>;
|
|
444
510
|
columnLimit?: number;
|
|
445
511
|
collapseAt?: string;
|
|
446
512
|
}
|
|
447
|
-
declare const Columns:
|
|
448
|
-
|
|
449
|
-
interface ModalDialogProps extends OverlayProps$1, AriaDialogProps {
|
|
450
|
-
variant?: string;
|
|
451
|
-
backdropVariant?: string;
|
|
452
|
-
}
|
|
513
|
+
declare const Columns: ({ space, columns, collapseAt, children, ...props }: ColumnsProps) => JSX.Element;
|
|
453
514
|
|
|
454
|
-
interface
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
variant?: string;
|
|
460
|
-
role?: 'dialog' | 'alertdialog';
|
|
515
|
+
interface ContainerProps extends ComponentProps<'div'> {
|
|
516
|
+
contentType?: 'content' | 'header';
|
|
517
|
+
size?: keyof typeof size.content | keyof typeof size.header;
|
|
518
|
+
align?: 'left' | 'right' | 'center';
|
|
519
|
+
alignContainer?: 'left' | 'right' | 'center';
|
|
461
520
|
}
|
|
462
|
-
declare const
|
|
463
|
-
declare const useDialogButtonProps: () => {
|
|
464
|
-
state: _react_stately_overlays.OverlayTriggerState;
|
|
465
|
-
openButtonProps: React.HTMLAttributes<HTMLSpanElement>;
|
|
466
|
-
openButtonRef: React.RefObject<HTMLElement>;
|
|
467
|
-
};
|
|
521
|
+
declare const Container: React.FC<ContainerProps>;
|
|
468
522
|
|
|
469
523
|
interface InlineProps {
|
|
470
524
|
space?: ResponsiveStyleValue<string>;
|
|
@@ -472,38 +526,26 @@ interface InlineProps {
|
|
|
472
526
|
}
|
|
473
527
|
declare const Inline: React.FC<InlineProps>;
|
|
474
528
|
|
|
475
|
-
interface OverlayProps extends ComponentProps<'div'> {
|
|
476
|
-
children: ReactNode;
|
|
477
|
-
open?: boolean;
|
|
478
|
-
container?: Element;
|
|
479
|
-
}
|
|
480
|
-
declare const Overlay: ({ children, open, container, ...props }: OverlayProps) => JSX.Element | null;
|
|
481
|
-
|
|
482
|
-
interface PopoverProps extends Omit<OverlayProps$1, 'isOpen' | 'isDismissable' | 'isKeyboardDismissDisabled'> {
|
|
483
|
-
children?: ReactNode;
|
|
484
|
-
open?: boolean;
|
|
485
|
-
dismissable?: boolean;
|
|
486
|
-
keyboardDismissDisabled?: boolean;
|
|
487
|
-
}
|
|
488
|
-
declare const Popover: React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<unknown>>;
|
|
489
|
-
|
|
490
529
|
interface StackProps {
|
|
491
530
|
as?: 'div' | 'ul' | 'ol';
|
|
492
531
|
space?: ResponsiveStyleValue<string>;
|
|
493
532
|
align?: 'left' | 'right' | 'center';
|
|
533
|
+
children?: ReactNode;
|
|
494
534
|
}
|
|
495
|
-
declare const Stack:
|
|
535
|
+
declare const Stack: ({ space, align, children, ...props }: StackProps) => JSX.Element;
|
|
496
536
|
|
|
497
|
-
interface TextFieldProps extends Omit<ComponentProps<'input'>, 'value' | 'defaultValue' | 'onChange' | 'onFocus' | 'onBlur'>,
|
|
537
|
+
interface TextFieldProps extends Omit<ComponentProps<'input'>, 'value' | 'defaultValue' | 'onChange' | 'onFocus' | 'onBlur' | 'size'>,
|
|
498
538
|
/**
|
|
499
539
|
* `react-aria` has a slightly different API for `onChange`, `onFocus`
|
|
500
540
|
* and `onBlur` events. Thus, we adjust our regular props to match them.
|
|
501
541
|
*/
|
|
502
542
|
Pick<AriaTextFieldProps, 'onChange' | 'onFocus' | 'onBlur'>, Pick<FieldBaseProps, 'label' | 'description' | 'error' | 'errorMessage'> {
|
|
543
|
+
variant?: string;
|
|
544
|
+
size?: string;
|
|
503
545
|
value?: string;
|
|
504
546
|
defaultValue?: string;
|
|
505
547
|
}
|
|
506
|
-
declare const TextField: ({ disabled, required, readOnly, error, ...props }: TextFieldProps) => JSX.Element;
|
|
548
|
+
declare const TextField: ({ disabled, required, readOnly, error, variant, size, ...props }: TextFieldProps) => JSX.Element;
|
|
507
549
|
|
|
508
550
|
interface TilesProps {
|
|
509
551
|
space?: ResponsiveStyleValue<string>;
|
|
@@ -511,12 +553,4 @@ interface TilesProps {
|
|
|
511
553
|
}
|
|
512
554
|
declare const Tiles: React.FC<TilesProps>;
|
|
513
555
|
|
|
514
|
-
|
|
515
|
-
contentType?: 'content' | 'header';
|
|
516
|
-
size?: keyof typeof size.content | keyof typeof size.header;
|
|
517
|
-
align?: 'left' | 'right' | 'center';
|
|
518
|
-
alignContainer?: 'left' | 'right' | 'center';
|
|
519
|
-
}
|
|
520
|
-
declare const Container: React.FC<ContainerProps>;
|
|
521
|
-
|
|
522
|
-
export { Aside, AsideProps, Aspect, AspectProps, Badge, BadgeProps, BadgeThemeExtension, Breakout, BreakoutProps, Button, ButtonOwnProps, ButtonProps, ButtonThemeExtension, Card, CardProps, CardThemeExtension, Center, CenterProps, Checkbox, CheckboxGroup, CheckboxGroupContext, CheckboxGroupContextProps, CheckboxGroupThemeExtension, CheckboxProps, CheckboxThemeExtension, Columns, ColumnsProps, Container, ContainerProps, Content, ContentProps, ContentThemeExtension, CustomCheckboxProps, CustomTextAreEvents, Dialog, DialogProps, Divider, DividerProps, DividerThemeExtension, Footer, FooterProps, FooterThemeExtension, Header, HeaderProps, HeaderThemeExtension, Headline, HeadlineProps, HeadlineThemeExtension, Image, ImageProps, ImageThemeExtension, Inline, InlineProps, Input, InputOwnProps, InputProps, InputThemeExtension, Label, LabelBase, LabelBaseProps, LabelProps, LabelThemeExtension, Link, LinkOwnProps, LinkProps, LinkThemeExtension, MarigoldProvider, MarigoldProviderProps, Menu, MenuProps, MenuThemeExtension, Message, MessageProps, MessageThemeExtension, Overlay, OverlayProps, Popover, PopoverProps, Radio, RadioProps, RadioThemeExtension, RootThemeExtension, Select, SelectProps, SelectThemeExtension, Slider, SliderProps, SliderThemeExtension, Stack, StackProps, Switch, SwitchProps, SwitchThemeExtension, Table, TableProps, TableThemeExtension, Text, TextArea, TextAreaProps, TextAreaThemeExtension, TextField, TextFieldProps, TextProps, TextThemeExtension, Theme, Tiles, TilesProps, Tooltip, TooltipContext, TooltipProps, TooltipThemeExtension, TooltipTrigger, ValidationMessage, ValidationMessageProps, ValidationMessageThemeExtension, useCheckboxGroupContext, useDialogButtonProps };
|
|
556
|
+
export { Aside, AsideProps, Aspect, AspectProps, Badge, BadgeProps, BadgeThemeExtension, Breakout, BreakoutProps, Button, ButtonOwnProps, ButtonProps, ButtonThemeExtension, Card, CardProps, CardThemeExtension, Center, CenterProps, Checkbox, CheckboxGroup, CheckboxGroupContext, CheckboxGroupContextProps, CheckboxGroupThemeExtension, CheckboxProps, CheckboxThemeExtension, Columns, ColumnsProps, Container, ContainerProps, Content, ContentProps, ContentThemeExtension, CustomCheckboxProps, CustomRadioProps, CustomSwitchProps, CustomTextAreEvents, Dialog, DialogChildProps, DialogProps, DialogThemeExtension, Divider, DividerProps, DividerThemeExtension, Footer, FooterProps, FooterThemeExtension, Header, HeaderProps, HeaderThemeExtension, Headline, HeadlineProps, HeadlineThemeExtension, Image, ImageProps, ImageThemeExtension, Inline, InlineProps, Input, InputOwnProps, InputProps, InputThemeExtension, Label, LabelProps, LabelThemeExtension, Link, LinkOwnProps, LinkProps, LinkThemeExtension, MarigoldProvider, MarigoldProviderProps, Menu, MenuProps, MenuThemeExtension, Message, MessageProps, MessageThemeExtension, NumberField, NumberFieldProps, NumberFieldThemeExtension, Overlay, OverlayProps, Popover, PopoverProps, Radio, RadioGroupProps, RadioGroupThemeExtension, RadioProps, RadioThemeExtension, RootThemeExtension, Select, SelectProps, SelectThemeExtension, Slider, SliderProps, SliderThemeExtension, Stack, StackProps, Switch, SwitchProps, SwitchThemeExtension, Table, TableProps, TableThemeExtension, Text, TextArea, TextAreaProps, TextAreaThemeExtension, TextField, TextFieldProps, TextProps, TextThemeExtension, Theme, Tiles, TilesProps, Tooltip, TooltipContext, TooltipProps, TooltipThemeExtension, TooltipTrigger, Underlay, UnderlayProps, UnderlayThemeExtension, useCheckboxGroupContext };
|