@@ -10,7 +10,7 @@ import { FormSwitch } from './FormSwitch';
10
10
import { FormTextarea } from './FormTextarea' ;
11
11
import { FormValidationFeedback } from './FormValidationFeedback' ;
12
12
13
- function FormGroup ( { children, name, feedback, mockInvalidSibling, ...props } ) {
13
+ export function FormGroup ( { children, name, feedback, mockInvalidSibling, ...props } ) {
14
14
return (
15
15
< div className = "form-group" >
16
16
< FormLabel { ...props } />
@@ -40,6 +40,23 @@ export function FormGroupAutocomplete(props) {
40
40
) ;
41
41
}
42
42
43
+ FormGroupAutocomplete . propTypes = {
44
+ disabled : PropTypes . oneOfType ( [ PropTypes . bool , PropTypes . func ] ) ,
45
+ filter : PropTypes . func ,
46
+ id : PropTypes . string ,
47
+ name : PropTypes . string . isRequired ,
48
+ onSearch : PropTypes . func ,
49
+ openOnFocus : PropTypes . bool ,
50
+ options : PropTypes . oneOfType ( [
51
+ PropTypes . func ,
52
+ PropTypes . arrayOf ( PropTypes . oneOfType ( [ PropTypes . string , PropTypes . object ] ) ) ,
53
+ ] ) ,
54
+ placeholder : PropTypes . string ,
55
+ required : PropTypes . oneOfType ( [ PropTypes . bool , PropTypes . func ] ) ,
56
+ template : PropTypes . func ,
57
+ type : PropTypes . string ,
58
+ } ;
59
+
43
60
export function FormGroupCheckbox ( props ) {
44
61
return (
45
62
< FormGroup mockInvalidSibling = { true } { ...props } >
@@ -48,6 +65,15 @@ export function FormGroupCheckbox(props) {
48
65
) ;
49
66
}
50
67
68
+ FormGroupCheckbox . propTypes = {
69
+ disabled : PropTypes . oneOfType ( [ PropTypes . bool , PropTypes . func ] ) ,
70
+ falseLabel : PropTypes . string ,
71
+ id : PropTypes . string . isRequired ,
72
+ name : PropTypes . string . isRequired ,
73
+ required : PropTypes . oneOfType ( [ PropTypes . bool , PropTypes . func ] ) ,
74
+ trueLabel : PropTypes . string ,
75
+ } ;
76
+
51
77
export function FormGroupInput ( props ) {
52
78
return (
53
79
< FormGroup { ...props } >
@@ -56,6 +82,22 @@ export function FormGroupInput(props) {
56
82
) ;
57
83
}
58
84
85
+ FormGroupInput . propTypes = {
86
+ disabled : PropTypes . oneOfType ( [ PropTypes . bool , PropTypes . func ] ) ,
87
+ id : PropTypes . string ,
88
+ max : PropTypes . string ,
89
+ maxLength : PropTypes . string ,
90
+ min : PropTypes . string ,
91
+ minLength : PropTypes . string ,
92
+ name : PropTypes . string . isRequired ,
93
+ pattern : PropTypes . string ,
94
+ placeholder : PropTypes . string ,
95
+ readOnly : PropTypes . bool ,
96
+ required : PropTypes . oneOfType ( [ PropTypes . bool , PropTypes . func ] ) ,
97
+ step : PropTypes . string ,
98
+ type : PropTypes . string ,
99
+ } ;
100
+
59
101
export function FormGroupRadio ( { options, id, ...props } ) {
60
102
return (
61
103
< FormGroup mockInvalidSibling = { true } { ...props } >
@@ -79,9 +121,12 @@ FormGroupRadio.defaultProps = {
79
121
} ;
80
122
81
123
FormGroupRadio . propTypes = {
124
+ disabled : PropTypes . oneOfType ( [ PropTypes . bool , PropTypes . func ] ) ,
82
125
id : PropTypes . string ,
83
- options : PropTypes . arrayOf ( PropTypes . object ) ,
84
126
inline : PropTypes . bool ,
127
+ name : PropTypes . string . isRequired ,
128
+ options : PropTypes . arrayOf ( PropTypes . shape ( { value : PropTypes . any . isRequired , label : PropTypes . string . isRequired } ) ) ,
129
+ required : PropTypes . oneOfType ( [ PropTypes . bool , PropTypes . func ] ) ,
85
130
} ;
86
131
87
132
export function FormGroupSelect ( props ) {
@@ -92,6 +137,24 @@ export function FormGroupSelect(props) {
92
137
) ;
93
138
}
94
139
140
+ FormGroupSelect . propTypes = {
141
+ disabled : PropTypes . oneOfType ( [ PropTypes . bool , PropTypes . func ] ) ,
142
+ id : PropTypes . string ,
143
+ name : PropTypes . string . isRequired ,
144
+ options : PropTypes . oneOfType ( [
145
+ PropTypes . func ,
146
+ PropTypes . arrayOf (
147
+ PropTypes . oneOfType ( [
148
+ PropTypes . string ,
149
+ PropTypes . shape ( { value : PropTypes . any . isRequired , label : PropTypes . string . isRequired } ) ,
150
+ ] )
151
+ ) ,
152
+ ] ) ,
153
+ placeholder : PropTypes . string ,
154
+ required : PropTypes . oneOfType ( [ PropTypes . bool , PropTypes . func ] ) ,
155
+ trackBy : PropTypes . string ,
156
+ } ;
157
+
95
158
export function FormGroupSwitch ( props ) {
96
159
return (
97
160
< FormGroup mockInvalidSibling = { true } { ...props } >
@@ -100,10 +163,29 @@ export function FormGroupSwitch(props) {
100
163
) ;
101
164
}
102
165
166
+ FormGroupSwitch . propTypes = {
167
+ disabled : PropTypes . oneOfType ( [ PropTypes . bool , PropTypes . func ] ) ,
168
+ falseLabel : PropTypes . string ,
169
+ id : PropTypes . string . isRequired ,
170
+ name : PropTypes . string . isRequired ,
171
+ required : PropTypes . oneOfType ( [ PropTypes . bool , PropTypes . func ] ) ,
172
+ trueLabel : PropTypes . string ,
173
+ } ;
174
+
103
175
export function FormGroupTextarea ( props ) {
104
176
return (
105
177
< FormGroup { ...props } >
106
178
< FormTextarea { ...props } />
107
179
</ FormGroup >
108
180
) ;
109
181
}
182
+
183
+ FormGroupTextarea . propTypes = {
184
+ disabled : PropTypes . oneOfType ( [ PropTypes . bool , PropTypes . func ] ) ,
185
+ id : PropTypes . string ,
186
+ name : PropTypes . string . isRequired ,
187
+ placeholder : PropTypes . string ,
188
+ readOnly : PropTypes . bool ,
189
+ required : PropTypes . oneOfType ( [ PropTypes . bool , PropTypes . func ] ) ,
190
+ rows : PropTypes . oneOfType ( [ PropTypes . number , PropTypes . string ] ) ,
191
+ } ;
0 commit comments