forked from segmentio/evergreen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
2882 lines (2681 loc) · 81.6 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* tslint:disable:interface-name max-classes-per-file no-empty-interface */
import { IconName as BlueprintIconName } from '@blueprintjs/icons'
import * as React from 'react'
import Box, { extractStyles as boxExtractStyles } from 'ui-box'
import { BoxProps } from 'ui-box/dist/types/box-types'
import { StyleAttribute, CSSProperties } from 'glamor'
import { DownshiftProps } from 'downshift'
import {TransitionProps, TransitionStatus} from 'react-transition-group/Transition'
export { configureSafeHref, setClassNamePrefix } from 'ui-box'
type PositionTypes = 'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right' | 'left' | 'right'
type IntentTypes = 'none' | 'success' | 'warning' | 'danger'
type DefaultAppearance = 'default'
type AlertAppearance = DefaultAppearance | 'card'
type ButtonAppearance = DefaultAppearance | 'minimal' | 'primary'
type CheckboxAppearance = DefaultAppearance
type IconButtonAppearance = DefaultAppearance | 'minimal' | 'primary'
type TextInputAppearance = DefaultAppearance | 'primary'
type TooltipAppearance = DefaultAppearance | 'card'
type PositionState = 'exited' | 'entering' | 'entered' | 'exiting'
type FontFamily = 'ui' | 'display' | 'mono'
type Elevation = 0 | 1 | 2 | 3 | 4
type FontSizeSmall = 300 | 400
export type IconName = BlueprintIconName
export interface Colors {
background: {
blueTint: string
greenTint: string
orangeTint: string
overlay: string
purpleTint: string
redTint: string
tealTint: string
tint1: string
tint2: string
yellowTint: string
}
border: {
default: string
muted: string
}
icon: {
danger: string
default: string
disabled: string
info: string
muted: string
selected: string
success: string
warning: string
}
intent: {
danger: string
none: string
success: string
warning: string
}
text: {
danger: string
dark: string
default: string
info: string
muted: string
selected: string
success: string
warning: string
}
}
interface SolidFills {
blue: {
backgroundColor: string
color: string
}
green: {
backgroundColor: string
color: string
}
neutral: {
backgroundColor: string
color: string
}
orange: {
backgroundColor: string
color: string
}
purple: {
backgroundColor: string
color: string
}
red: {
backgroundColor: string
color: string
}
teal: {
backgroundColor: string
color: string
}
yellow: {
backgroundColor: string
color: string
}
}
interface SubtleFills {
blue: {
backgroundColor: string
color: string
}
green: {
backgroundColor: string
color: string
}
neutral: {
backgroundColor: string
color: string
}
orange: {
backgroundColor: string
color: string
}
purple: {
backgroundColor: string
color: string
}
red: {
backgroundColor: string
color: string
}
teal: {
backgroundColor: string
color: string
}
yellow: {
backgroundColor: string
color: string
}
}
interface Fills {
options: string[]
solid: SolidFills
subtle: SubtleFills
}
interface Palette {
blue: {
base: string
dark: string
light: string
lightest: string
}
green: {
base: string
dark: string
light: string
lightest: string
}
neutral: {
base: string
dark: string
light: string
lightest: string
}
orange: {
base: string
dark: string
light: string
lightest: string
}
purple: {
base: string
dark: string
light: string
lightest: string
}
red: {
base: string
dark: string
light: string
lightest: string
}
teal: {
base: string
dark: string
light: string
lightest: string
}
yellow: {
base: string
dark: string
light: string
lightest: string
}
}
interface ColorScales {
blue: {
B1: string
B10: string
B1A: string
B2: string
B2A: string
B3: string
B3A: string
B4: string
B4A: string
B5: string
B5A: string
B6: string
B6A: string
B7: string
B7A: string
B8: string
B8A: string
B9: string
}
neutral: {
N1: string
N10: string
N1A: string
N2: string
N2A: string
N3: string
N3A: string
N4: string
N4A: string
N5: string
N5A: string
N6: string
N6A: string
N7: string
N7A: string
N8: string
N8A: string
N9: string
}
}
interface Typography {
fontFamilies: {
display: string
mono: string
ui: string
}
headings: {
100: {
color: string
fontFamily: string
fontSize: string
fontWeight: number
letterSpacing: string
lineHeight: string
marginTop: number
textTransform: string
}
200: {
color: string
fontFamily: string
fontSize: string
fontWeight: number
lineHeight: string
marginTop: number
}
300: {
color: string
fontFamily: string
fontSize: string
fontWeight: number
letterSpacing: string
lineHeight: string
marginTop: number
}
400: {
color: string
fontFamily: string
fontSize: string
fontWeight: number
letterSpacing: string
lineHeight: string
marginTop: number
}
500: {
color: string
fontFamily: string
fontSize: string
fontWeight: number
letterSpacing: string
lineHeight: string
marginTop: number
}
600: {
color: string
fontFamily: string
fontSize: string
fontWeight: number
letterSpacing: string
lineHeight: string
marginTop: number
}
700: {
color: string
fontFamily: string
fontSize: string
fontWeight: number
letterSpacing: string
lineHeight: string
marginTop: number
}
800: {
color: string
fontFamily: string
fontSize: string
fontWeight: number
letterSpacing: string
lineHeight: string
marginTop: number
}
900: {
color: string
fontFamily: string
fontSize: string
fontWeight: number
letterSpacing: string
lineHeight: string
marginTop: number
}
}
paragraph: {
300: {
fontSize: string
fontWeight: number
letterSpacing: string
lineHeight: string
marginTop: number
}
400: {
fontSize: string
fontWeight: number
letterSpacing: string
lineHeight: string
marginTop: number
}
500: {
fontSize: string
fontWeight: number
letterSpacing: string
lineHeight: string
marginTop: number
}
}
text: {
300: {
fontSize: string
fontWeight: number
letterSpacing: string
lineHeight: string
marginTop: number
}
400: {
fontSize: string
fontWeight: number
letterSpacing: string
lineHeight: string
marginTop: number
}
500: {
fontSize: string
fontWeight: number
letterSpacing: string
lineHeight: string
marginTop: number
}
600: {
fontFamily: string
fontSize: string
fontWeight: number
letterSpacing: string
lineHeight: string
marginTop: number
}
}
}
export interface Theme {
avatarColors: string[]
badgeColors: string[]
colors: Colors
elevations: Elevation[]
fills: Fills
overlayBackgroundColor: string
palette: Palette
scales: ColorScales
spinnerColor: string
typography: Typography
getIconColor(color: string): string
getAvatarProps(args: {
isSolid?: boolean
color: string
hashValue?: string
}): { color: string; backgroundColor: string }
}
export const defaultTheme: Theme
export enum Position {
TOP = 'top',
TOP_LEFT = 'top-left',
TOP_RIGHT = 'top-right',
BOTTOM = 'bottom',
BOTTOM_LEFT = 'bottom-left',
BOTTOM_RIGHT = 'bottom-right',
LEFT = 'left',
RIGHT = 'right'
}
export interface AlertProps extends Omit<PaneProps, 'title'> {
intent?: IntentTypes
title?: React.ReactNode
hasTrim?: boolean
/**
* When true, show a icon on the left matching the type,
*/
hasIcon?: boolean
/**
* When true, show a remove icon button.
*/
isRemoveable?: boolean
/**
* Function called when the remove button is clicked.
*/
onRemove?: (event: React.MouseEvent<HTMLButtonElement> | React.TouchEvent<HTMLButtonElement>) => void
/**
* The appearance of the alert.
*/
appearance?: AlertAppearance
}
export class Alert extends React.PureComponent<AlertProps> {
}
interface OptionProps extends TableRowProps {
height?: number | string
label: string
icon?: IconName
disabled?: boolean
}
export interface AutocompleteItemProps extends OptionProps {
children?: JSX.Element | null
}
export class AutocompleteItem extends React.PureComponent<AutocompleteItemProps> {
}
// https://github.com/downshift-js/downshift
export interface AutocompleteProps extends Omit<DownshiftProps<any>, 'children'> {
// @deprecated
defaultSelectedItem?: string
title?: React.ReactNode
items: any[]
renderItem?: (i: AutocompleteItemProps) => JSX.Element | null
itemsFilter?: (items: string[], input: string) => string[]
children: (props: {
toggle: () => void,
getRef: (ref: React.RefObject<HTMLElement>) => void,
isShown: NonNullable<PopoverProps['isShown']>,
getInputProps: <T>(options?: T) => T & {
onChange: (event: React.ChangeEvent) => void,
onKeyDown: (event: React.KeyboardEvent) => void,
onBlur: (event: React.FocusEvent) => void,
id: string,
value: string,
'aria-autocomplete': 'list',
'aria-activedescendant': number | null,
'aria-controls': string | null,
'aria-labelledby': string,
autoComplete: 'off'
},
openMenu: () => any,
inputValue: string,
}
) => React.ReactNode
itemSize?: number
position?: PositionTypes
isFilterDisabled?: boolean
popoverMinWidth?: number
popoverMaxHeight?: number
selectedItem?: any
buttonProps?: ButtonProps
onChange: (selectedItem: any) => void
}
export class Autocomplete extends React.PureComponent<AutocompleteProps> {
}
export interface AvatarProps extends React.ComponentPropsWithoutRef<typeof Box> {
src?: string
size?: number
/**
* When provided, the first and last initial of the name will be used.
* For example: Foo Bar -> FB
*/
name?: string | null
hashValue?: string
isSolid?: boolean
color?: string
getInitials?: (name: string) => string
forceShowInitials?: boolean
sizeLimitOneCharacter?: number
}
export class Avatar extends React.PureComponent<AvatarProps> {
}
export type BackButtonProps = ButtonProps
export class BackButton extends React.PureComponent<BackButtonProps> {
}
export interface BadgeProps extends StrongProps {
/**
* The color used for the badge. When the value is `automatic`, use the hash function to determine the color.
*/
color?: 'automatic' | 'neutral' | 'blue' | 'red' | 'orange' | 'yellow' | 'green' | 'teal' | 'purple'
/**
* Whether or not to apply hover/focus/active styles.
*/
isInteractive?: boolean
isSolid?: boolean
}
export class Badge extends React.PureComponent<BadgeProps> {
}
export interface ButtonProps extends React.ComponentPropsWithoutRef<typeof Text> {
intent?: IntentTypes
appearance?: ButtonAppearance
/**
* When true, show a loading spinner before the children.
* This also disables the button.
*/
isLoading?: boolean
/**
* Forcefully set the active state of a button.
* Useful in conjuction with a Popover.
*/
isActive?: boolean
/**
* Sets an icon before the text. Can be any icon from Evergreen.
*/
iconBefore?: IconName | null | false
/**
* Sets an icon after the text. Can be any icon from Evergreen.
*/
iconAfter?: IconName | null | false
/**
* When true, the button is disabled.
* isLoading also sets the button to disabled.
*/
disabled?: boolean
/**
* Class name passed to the button.
*/
className?: string
}
export class Button extends React.PureComponent<ButtonProps> {
}
export type CardProps = React.ComponentProps<typeof Pane>
export class Card extends React.PureComponent<CardProps> {
}
export interface CheckboxProps extends Omit<BoxProps<'input'>, 'innerRef'> {
/**
* The id attribute of the checkbox.
*/
id?: string
/**
* The id attribute of the radio.
*/
name?: string
/**
* Label of the checkbox.
*/
label?: React.ReactNode
/**
* The value attribute of the radio.
*/
value?: string
/**
* The checked attribute of the radio.
*/
checked?: boolean
/**
* State in addition to "checked" and "unchecked".
* When true, the radio displays a "minus" icon.
*/
indeterminate?: boolean
/**
* Function that returns the ref of the checkbox.
*/
innerRef?: (ref: React.RefObject<HTMLElement>) => void,
/**
* When true, the radio is disabled.
*/
disabled?: boolean
/**
* When true, the aria-invalid attribute is true.
* Used for accessibility.
*/
isInvalid?: boolean
/**
* The appearance of the checkbox.
* The default theme only comes with a default style.
*/
appearance?: CheckboxAppearance
/**
* Function called when state changes.
*/
onChange?(event: React.ChangeEvent<HTMLInputElement>): void
}
export class Checkbox extends React.PureComponent<CheckboxProps> {
}
export type CodeProps = TextProps
export class Code extends React.PureComponent<CodeProps> {
}
export interface ComboboxProps extends React.ComponentPropsWithoutRef<typeof Box> {
/**
* The options to show in the menu.
*/
items: AutocompleteProps['items']
/**
* The selected item when controlled.
*/
selectedItem?: AutocompleteProps['selectedItem']
/**
* Function called when value changes.
*/
onChange?: AutocompleteProps['onChange']
/**
* Properties forwarded to the autocomplete component. Use with caution.
*/
autocompleteProps?: AutocompleteProps
/**
* Default selected item when uncontrolled.
*/
defaultSelectedItem?: string
/**
* When true, open the autocomplete on focus.
*/
openOnFocus?: boolean
/**
* Default selected item when uncontrolled.
*/
initialSelectedItem?: any
/**
* The placeholder text when there is no value present.
*/
placeholder?: string
/**
* In case the array of items is not an array of strings,
* this function is used on each item to return the string that will be shown on the filter
*/
itemToString?: AutocompleteProps['itemToString']
/**
* Properties forwarded to the input. Use with caution.
*/
inputProps?: TextInputProps
/**
* Properties forwarded to the button. Use with caution.
*/
buttonProps?: IconButtonProps
/**
* Makes the input element disabled.
*/
disabled?: boolean
/**
* When true, show a loading spinner. This also disables the button.
*/
isLoading?: boolean
}
export class Combobox extends React.PureComponent<ComboboxProps> {
}
export interface CornerDialogProps {
/**
* Children can be a string, node or a function accepting `({ close })`.
* When passing a string, <Paragraph /> is used to wrap the string.
*/
children?: React.ReactNode | (({ close }: { close: () => void }) => void)
/**
* The intent of the Dialog. Used for the button. Defaults to none.
*/
intent?: IntentTypes
/**
* When true, the dialog is shown. Defaults to false.
*/
isShown?: boolean
/**
* Title of the Dialog. The text for the title should use Title Case.
*/
title?: string | React.ReactNode
/**
* Function that will be called when the exit transition is complete.
*/
onCloseComplete?: () => void
/**
* Function that will be called when the enter transition is complete.
*/
onOpenComplete?: () => void
/**
* When true, the footer with the cancel and confirm button is shown.
* Defaults to true.
*/
hasFooter?: boolean
/**
* Function that will be called when the confirm button is clicked.
* This does not close the Dialog. A close function will be passed
* as a paramater you can use to close the dialog.
* If unspecified, this defaults to closing the Dialog.
*/
onConfirm?: (close: () => void) => void
/**
* Label of the confirm button. Default to 'Confirm'.
*/
confirmLabel?: string
/**
* When true, the cancel button is shown. Defaults to true.
*/
hasCancel?: boolean
/**
* When true, the close button is shown. Defaults to true.
*/
hasClose?: boolean
/**
* Function that will be called when the cancel button is clicked.
* This closes the Dialog by default.
*/
onCancel?: (close: () => void) => void
/**
* Label of the cancel button. Defaults to 'Cancel'.
*/
cancelLabel?: string
/**
* Width of the Dialog.
*/
width?: string | number
/**
* Props that are passed to the dialog container.
*/
containerProps?: CardProps
}
export class CornerDialog extends React.PureComponent<CornerDialogProps> {
}
export interface DialogProps {
/**
* Children can be a string, node or a function accepting `({ close })`.
* When passing a string, <Paragraph /> is used to wrap the string.
*/
children?: React.ReactNode | (({ close }: { close: () => void }) => void)
/**
* The intent of the Dialog. Used for the button. Defaults to none.
*/
intent?: IntentTypes
/**
* When true, the dialog is shown. Defaults to false.
*/
isShown?: boolean
/**
* Title of the Dialog. Titles should use Title Case.
*/
title?: string
/**
* When true, the header with the title and close icon button is shown.
* Defaults to true.
*/
hasHeader?: boolean
/**
* You can override the default header with your own custom component.
*
* This is useful if you want to provide a custom header and footer, while
* also enabling your Dialog's content to scroll.
*
* Header can either be a React node or a function accepting `({ close })`.
*/
header?: React.ReactNode | (({ close }: { close: () => void }) => void)
/**
* When true, the footer with the cancel and confirm button is shown.
* Defaults to true.
*/
hasFooter?: boolean
/**
* You can override the default footer with your own custom component.
*
* This is useful if you want to provide a custom header and footer, while
* also enabling your Dialog's content to scroll.
*
* Footer can either be a React node or a function accepting `({ close })`.
*/
footer?: React.ReactNode | (({ close }: { close: () => void }) => void)
/**
* When true, the cancel button is shown. Defaults to true.
*/
hasCancel?: boolean
/**
* When true, the close button is shown. Defaults to true.
*/
hasClose?: boolean
/**
* Function that will be called when the exit transition is complete.
*/
onCloseComplete?: () => void
/**
* Function that will be called when the enter transition is complete.
*/
onOpenComplete?: () => void
/**
* Function that will be called when the confirm button is clicked.
* This does not close the Dialog. A close function will be passed
* as a paramater you can use to close the dialog.
* If unspecified, this defaults to closing the Dialog.
*/
onConfirm?: (close: () => void) => void
/**
* Label of the confirm button. Default to 'Confirm'.
*/
confirmLabel?: string
/**
* When true, the confirm button is set to loading. Defaults to false.
*/
isConfirmLoading?: boolean
/**
* When true, the confirm button is set to disabled. Defaults to false.
*/
isConfirmDisabled?: boolean
/**
* Function that will be called when the cancel button is clicked.
* This closes the Dialog by default.
*/
onCancel?: (close: () => void) => void
/**
* Label of the cancel button. Defaults to 'Cancel'.
*/
cancelLabel?: string
/**
* Boolean indicating if clicking the overlay should close the overlay.
* Defaults to true.
*/
shouldCloseOnOverlayClick?: boolean
/**
* Boolean indicating if pressing the esc key should close the overlay.
* Defaults to true.
*/
shouldCloseOnEscapePress?: boolean
/**
* Width of the Dialog.
*/
width?: string | number
/**
* The space above the dialog.
* This offset is also used at the bottom when there is not enough vertical
* space available on screen — and the dialog scrolls internally.
*/
topOffset?: string | number
/**
* The space on the left/right sides of the dialog when there isn't enough
* horizontal space available on screen.
*/
sideOffset?: string | number
/**
* The min height of the body content.
* Makes it less weird when only showing little content.
*/
minHeightContent?: string | number
/**
* Props that are passed to the dialog container.
*/
containerProps?: object
/**
* Props that are passed to the content container.
*/
contentContainerProps?: object
/**
* Whether or not to prevent scrolling in the outer body. Defaults to false.
*/
preventBodyScrolling?: boolean
}
export class Dialog extends React.PureComponent<DialogProps> {
}
export interface IconProps extends BoxProps<'svg'> {
icon: IconName | JSX.Element
/**
* Color of icon. Equivalent to setting CSS `fill` property.
*/
color?: string
/**
* Size of the icon, in pixels.
* Blueprint contains 16px and 20px SVG icon images,
* and chooses the appropriate resolution based on this prop.
*/
size?: number
/**
* Description string.
* Browsers usually render this as a tooltip on hover, whereas screen
* readers will use it for aural feedback.
* By default, this is set to the icon's name for accessibility.
*/
title?: string
/**
* CSS style properties.
*/
style?: React.CSSProperties
className?: string
}
export class Icon extends React.PureComponent<IconProps> {
}
export interface FormFieldProps extends React.ComponentPropsWithoutRef<typeof Box> {
/**
* The label used above the input element.
*/
label?: React.ReactNode
/**
* Passed on the label as a htmlFor prop.
*/
labelFor?: string
/**
* Wether or not show a asterix after the label.
*/
isRequired?: boolean
/**
* A optional description of the field under the label, above the input element.
*/
description?: React.ReactNode
/**
* A optional hint under the input element.
*/
hint?: React.ReactNode
/**
* If a validation message is passed it is shown under the input element
* and above the hint.
*/
validationMessage?: React.ReactNode
/**
* The height of the input element.
*/
inputHeight?: number
/**
* The width of the input width.
*/
inputWidth?: number | string
}
export class FormField extends React.PureComponent<FormFieldProps> {
}
export interface FormFieldDescriptionProps extends ParagraphProps {
}
export class FormFieldDescription extends React.PureComponent<FormFieldDescriptionProps> {
}
export interface FormFieldHintProps extends ParagraphProps {
}
export class FormFieldHint extends React.PureComponent<ParagraphProps> {
}
export interface FormFieldLabelProps extends LabelProps {
/**
* Whether or not to show an asterix after the label.
*/
isAstrixShown?: boolean
}
export class FormFieldLabel extends React.PureComponent<FormFieldLabelProps> {
}
export interface FormFieldValidationMessageProps extends PaneProps {
}
export class FormFieldValidationMessage extends React.PureComponent<FormFieldValidationMessageProps> {