envoc-form 2.0.1-9 → 2.0.1
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/README.md +7 -7
- package/dist/css/envoc-form-styles.css +7 -6
- package/dist/css/envoc-form-styles.css.map +1 -1
- package/es/AddressInput/AddressInput.js +7 -6
- package/es/ConfirmBaseForm/ConfirmBaseForm.js +3 -2
- package/es/ConfirmDeleteForm/ConfirmDeleteForm.js +2 -1
- package/es/DatePickerInput/DatePickerInput.js +22 -5
- package/es/FileInput/DefaultFileList.js +3 -2
- package/es/FileInput/DropzoneFileInput.js +15 -12
- package/es/FileInput/FileInput.js +31 -9
- package/es/Form/Form.js +2 -1
- package/es/FormGroupWrapper.js +2 -1
- package/es/FormInput/FormInput.js +12 -6
- package/es/FormInputArray/FormInputArray.js +39 -24
- package/es/IconInput.js +2 -1
- package/es/ReactSelectField/ReactSelectField.js +6 -3
- package/es/SubmitFormButton.js +2 -1
- package/es/__Tests__/FormTestBase.js +5 -2
- package/es/normalizers.js +10 -5
- package/es/useStandardFormInput.js +4 -2
- package/lib/AddressInput/AddressInput.js +14 -8
- package/lib/ConfirmBaseForm/ConfirmBaseForm.js +4 -2
- package/lib/ConfirmDeleteForm/ConfirmDeleteForm.js +3 -1
- package/lib/DatePickerInput/DatePickerInput.js +25 -5
- package/lib/FileInput/DefaultFileList.js +3 -2
- package/lib/FileInput/DropzoneFileInput.js +17 -12
- package/lib/FileInput/FileInput.js +39 -10
- package/lib/Form/Form.js +9 -3
- package/lib/Form/FormBasedPreventNavigation.js +5 -1
- package/lib/FormGroupWrapper.js +3 -1
- package/lib/FormInput/FormInput.js +13 -6
- package/lib/FormInputArray/FormInputArray.js +47 -26
- package/lib/FormSection.js +5 -1
- package/lib/IconInput.js +3 -1
- package/lib/ReactSelectField/ReactSelectField.js +13 -5
- package/lib/ReactSelectField/index.js +6 -2
- package/lib/SubmitFormButton.js +3 -1
- package/lib/__Tests__/FormTestBase.js +6 -2
- package/lib/index.js +7 -3
- package/lib/normalizers.js +10 -5
- package/lib/useStandardFormInput.js +5 -2
- package/lib/validators/index.js +5 -1
- package/package.json +99 -93
- package/src/AddressInput/AddesssInput.test.js +23 -23
- package/src/AddressInput/AddressInput.js +73 -73
- package/src/AddressInput/UsStates.js +53 -53
- package/src/AddressInput/__snapshots__/AddesssInput.test.js.snap +207 -207
- package/src/AddressInput/index.js +2 -2
- package/src/BoolInput/BoolInput.js +7 -7
- package/src/BoolInput/BoolInput.test.js +23 -23
- package/src/BoolInput/InlineBoolInput.js +7 -7
- package/src/BoolInput/__snapshots__/BoolInput.test.js.snap +89 -89
- package/src/BoolInput/boolOptions.js +6 -6
- package/src/BoolInput/index.js +4 -4
- package/src/ConfirmBaseForm/ConfirmBaseForm.js +37 -37
- package/src/ConfirmBaseForm/ConfirmBaseForm.test.js +14 -14
- package/src/ConfirmBaseForm/__snapshots__/ConfirmBaseForm.test.js.snap +23 -23
- package/src/ConfirmBaseForm/index.js +1 -1
- package/src/ConfirmDeleteForm/ConfirmDeleteForm.js +39 -39
- package/src/ConfirmDeleteForm/ConfirmDeleteForm.test.js +24 -24
- package/src/ConfirmDeleteForm/__snapshots__/ConfirmDeleteForm.test.js.snap +25 -25
- package/src/ConfirmDeleteForm/index.js +1 -1
- package/src/DatePickerInput/DatePickerInput.js +58 -46
- package/src/DatePickerInput/DatePickerInput.test.js +74 -74
- package/src/DatePickerInput/__snapshots__/DatePickerInput.test.js.snap +134 -134
- package/src/DatePickerInput/date-picker-input.scss +42 -42
- package/src/DatePickerInput/index.js +3 -3
- package/src/ErrorScrollTarget.js +6 -6
- package/src/FileInput/DefaultFileList.js +39 -39
- package/src/FileInput/DropzoneFileInput.js +56 -55
- package/src/FileInput/DropzoneFileInput.test.js +24 -15
- package/src/FileInput/FileInput.js +77 -49
- package/src/FileInput/FileInput.test.js +24 -15
- package/src/FileInput/__snapshots__/DropzoneFileInput.test.js.snap +57 -28
- package/src/FileInput/__snapshots__/FileInput.test.js.snap +58 -22
- package/src/FileInput/file-input.scss +57 -57
- package/src/FileInput/index.js +4 -4
- package/src/Form/FocusError.js +48 -48
- package/src/Form/Form.js +139 -139
- package/src/Form/Form.test.js +23 -23
- package/src/Form/FormBasedPreventNavigation.js +25 -25
- package/src/Form/ServerErrorContext.js +7 -7
- package/src/Form/__snapshots__/Form.test.js.snap +9 -9
- package/src/Form/index.js +3 -3
- package/src/FormGroup.js +30 -30
- package/src/FormGroupWrapper.js +28 -28
- package/src/FormInput/FormInput.js +144 -144
- package/src/FormInput/FormInput.test.js +66 -66
- package/src/FormInput/__snapshots__/FormInput.test.js.snap +323 -316
- package/src/FormInput/form-input.scss +9 -9
- package/src/FormInput/index.js +2 -2
- package/src/FormInputArray/FormInputArray.js +224 -210
- package/src/FormInputArray/FormInputArray.test.js +108 -59
- package/src/FormInputArray/__snapshots__/FormInputArray.test.js.snap +52 -40
- package/src/FormInputArray/form-input-array.scss +13 -8
- package/src/FormInputArray/index.js +2 -2
- package/src/FormSection.js +13 -13
- package/src/IconInput.js +31 -31
- package/src/InlineFormInput/InlineFormInput.js +6 -6
- package/src/InlineFormInput/InlineFormInput.test.js +23 -23
- package/src/InlineFormInput/__snapshots__/InlineFormInput.test.js.snap +26 -26
- package/src/InlineFormInput/index.js +3 -3
- package/src/InlineFormInput/inline-form-input.scss +3 -3
- package/src/MoneyInput/InlineMoneyInput.js +7 -7
- package/src/MoneyInput/MoneyInput.js +7 -7
- package/src/MoneyInput/MoneyInputs.test.js +43 -43
- package/src/MoneyInput/__snapshots__/MoneyInputs.test.js.snap +81 -81
- package/src/MoneyInput/index.js +4 -4
- package/src/MoneyInput/money-input.scss +3 -3
- package/src/MoneyInput/moneyInputProps.js +12 -12
- package/src/NestedFormFieldContext.js +6 -6
- package/src/ReactSelectField/ReactSelectField.js +122 -120
- package/src/ReactSelectField/index.js +6 -6
- package/src/ReactSelectField/react-select-field.scss +5 -5
- package/src/StandardFormActions.js +27 -27
- package/src/SubmitFormButton.js +28 -28
- package/src/__Tests__/FormTestBase.js +14 -11
- package/src/__Tests__/IconInput.test.js +23 -23
- package/src/__Tests__/StandardFormActions.test.js +23 -23
- package/src/__Tests__/SubmitFormButton.test.js +23 -23
- package/src/__Tests__/__snapshots__/IconInput.test.js.snap +38 -38
- package/src/__Tests__/__snapshots__/StandardFormActions.test.js.snap +25 -25
- package/src/__Tests__/__snapshots__/SubmitFormButton.test.js.snap +18 -18
- package/src/__Tests__/index.js +2 -2
- package/src/_variables.scss +11 -11
- package/src/index.js +33 -33
- package/src/normalizers.js +42 -32
- package/src/selectors.js +3 -3
- package/src/styles.scss +7 -7
- package/src/useStandardFormInput.js +118 -118
- package/src/utils/index.js +3 -3
- package/src/utils/objectContainsNonSerializableProperty.js +15 -15
- package/src/utils/objectContainsNonSerializableProperty.test.js +49 -49
- package/src/utils/objectToFormData.js +89 -89
- package/src/utils/objectToFormData.test.js +76 -76
- package/src/utils/typeChecks.js +18 -18
- package/src/validators/index.js +2 -2
- package/src/validators/validators.js +93 -93
- package/src/validators/validators.test.js +79 -79
- package/CHANGELOG.json +0 -95
- package/CHANGELOG.md +0 -58
@@ -1,316 +1,323 @@
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
-
|
3
|
-
exports[`FormInput has matching checkbox snapshot 1`] = `
|
4
|
-
<DocumentFragment>
|
5
|
-
<form
|
6
|
-
action="#"
|
7
|
-
>
|
8
|
-
<div
|
9
|
-
class="custom-checkbox custom-control"
|
10
|
-
>
|
11
|
-
<input
|
12
|
-
class="custom-control-input"
|
13
|
-
id="test"
|
14
|
-
name="test"
|
15
|
-
type="checkbox"
|
16
|
-
value=""
|
17
|
-
/>
|
18
|
-
<label
|
19
|
-
class="custom-control-label"
|
20
|
-
for="test"
|
21
|
-
/>
|
22
|
-
</div>
|
23
|
-
</form>
|
24
|
-
</DocumentFragment>
|
25
|
-
`;
|
26
|
-
|
27
|
-
exports[`FormInput has matching datepicker snapshot 1`] = `
|
28
|
-
<DocumentFragment>
|
29
|
-
<form
|
30
|
-
action="#"
|
31
|
-
>
|
32
|
-
<div
|
33
|
-
class="form-group"
|
34
|
-
>
|
35
|
-
<div
|
36
|
-
id="test-error-scroll-target"
|
37
|
-
style="display: none;"
|
38
|
-
/>
|
39
|
-
<div
|
40
|
-
class="react-date-picker react-date-picker--closed react-date-picker--enabled form-control"
|
41
|
-
>
|
42
|
-
<div
|
43
|
-
class="react-date-picker__wrapper"
|
44
|
-
>
|
45
|
-
<div
|
46
|
-
class="react-date-picker__inputGroup"
|
47
|
-
>
|
48
|
-
<input
|
49
|
-
max="2021-09-23"
|
50
|
-
min="2020-09-23"
|
51
|
-
name="test"
|
52
|
-
style="visibility: hidden; position: absolute; z-index: -999;"
|
53
|
-
type="date"
|
54
|
-
value=""
|
55
|
-
/>
|
56
|
-
<input
|
57
|
-
autocomplete="off"
|
58
|
-
class="react-date-picker__inputGroup__input react-date-picker__inputGroup__month"
|
59
|
-
data-input="true"
|
60
|
-
inputmode="numeric"
|
61
|
-
max="12"
|
62
|
-
min="1"
|
63
|
-
name="month"
|
64
|
-
placeholder="--"
|
65
|
-
type="number"
|
66
|
-
value=""
|
67
|
-
/>
|
68
|
-
<span
|
69
|
-
class="react-date-picker__inputGroup__divider"
|
70
|
-
>
|
71
|
-
/
|
72
|
-
</span>
|
73
|
-
<input
|
74
|
-
autocomplete="off"
|
75
|
-
class="react-date-picker__inputGroup__input react-date-picker__inputGroup__day"
|
76
|
-
data-input="true"
|
77
|
-
inputmode="numeric"
|
78
|
-
max="31"
|
79
|
-
min="1"
|
80
|
-
name="day"
|
81
|
-
placeholder="--"
|
82
|
-
type="number"
|
83
|
-
value=""
|
84
|
-
/>
|
85
|
-
<span
|
86
|
-
class="react-date-picker__inputGroup__divider"
|
87
|
-
>
|
88
|
-
/
|
89
|
-
</span>
|
90
|
-
<input
|
91
|
-
autocomplete="off"
|
92
|
-
class="react-date-picker__inputGroup__input react-date-picker__inputGroup__year"
|
93
|
-
data-input="true"
|
94
|
-
inputmode="numeric"
|
95
|
-
max="2021"
|
96
|
-
min="2020"
|
97
|
-
name="year"
|
98
|
-
placeholder="----"
|
99
|
-
step="1"
|
100
|
-
type="number"
|
101
|
-
value=""
|
102
|
-
/>
|
103
|
-
</div>
|
104
|
-
<button
|
105
|
-
class="react-date-picker__clear-button react-date-picker__button"
|
106
|
-
type="button"
|
107
|
-
>
|
108
|
-
<svg
|
109
|
-
class="react-date-picker__clear-button__icon react-date-picker__button__icon"
|
110
|
-
height="19"
|
111
|
-
stroke="black"
|
112
|
-
stroke-width="2"
|
113
|
-
viewBox="0 0 19 19"
|
114
|
-
width="19"
|
115
|
-
xmlns="http://www.w3.org/2000/svg"
|
116
|
-
>
|
117
|
-
<line
|
118
|
-
x1="4"
|
119
|
-
x2="15"
|
120
|
-
y1="4"
|
121
|
-
y2="15"
|
122
|
-
/>
|
123
|
-
<line
|
124
|
-
x1="15"
|
125
|
-
x2="4"
|
126
|
-
y1="4"
|
127
|
-
y2="15"
|
128
|
-
/>
|
129
|
-
</svg>
|
130
|
-
</button>
|
131
|
-
<button
|
132
|
-
class="react-date-picker__calendar-button react-date-picker__button"
|
133
|
-
type="button"
|
134
|
-
>
|
135
|
-
<svg
|
136
|
-
class="react-date-picker__calendar-button__icon react-date-picker__button__icon"
|
137
|
-
height="19"
|
138
|
-
stroke="black"
|
139
|
-
stroke-width="2"
|
140
|
-
viewBox="0 0 19 19"
|
141
|
-
width="19"
|
142
|
-
xmlns="http://www.w3.org/2000/svg"
|
143
|
-
>
|
144
|
-
<rect
|
145
|
-
fill="none"
|
146
|
-
height="15"
|
147
|
-
width="15"
|
148
|
-
x="2"
|
149
|
-
y="2"
|
150
|
-
/>
|
151
|
-
<line
|
152
|
-
x1="6"
|
153
|
-
x2="6"
|
154
|
-
y1="0"
|
155
|
-
y2="4"
|
156
|
-
/>
|
157
|
-
<line
|
158
|
-
x1="13"
|
159
|
-
x2="13"
|
160
|
-
y1="0"
|
161
|
-
y2="4"
|
162
|
-
/>
|
163
|
-
</svg>
|
164
|
-
</button>
|
165
|
-
</div>
|
166
|
-
</div>
|
167
|
-
</div>
|
168
|
-
</form>
|
169
|
-
</DocumentFragment>
|
170
|
-
`;
|
171
|
-
|
172
|
-
exports[`FormInput has matching file input snapshot 1`] = `
|
173
|
-
<DocumentFragment>
|
174
|
-
<form
|
175
|
-
action="#"
|
176
|
-
>
|
177
|
-
<div
|
178
|
-
class="form-group"
|
179
|
-
>
|
180
|
-
<div
|
181
|
-
id="test-error-scroll-target"
|
182
|
-
style="display: none;"
|
183
|
-
/>
|
184
|
-
<div
|
185
|
-
class="custom-file file-input "
|
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
|
-
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
+
|
3
|
+
exports[`FormInput has matching checkbox snapshot 1`] = `
|
4
|
+
<DocumentFragment>
|
5
|
+
<form
|
6
|
+
action="#"
|
7
|
+
>
|
8
|
+
<div
|
9
|
+
class="custom-checkbox custom-control"
|
10
|
+
>
|
11
|
+
<input
|
12
|
+
class="custom-control-input"
|
13
|
+
id="test"
|
14
|
+
name="test"
|
15
|
+
type="checkbox"
|
16
|
+
value=""
|
17
|
+
/>
|
18
|
+
<label
|
19
|
+
class="custom-control-label"
|
20
|
+
for="test"
|
21
|
+
/>
|
22
|
+
</div>
|
23
|
+
</form>
|
24
|
+
</DocumentFragment>
|
25
|
+
`;
|
26
|
+
|
27
|
+
exports[`FormInput has matching datepicker snapshot 1`] = `
|
28
|
+
<DocumentFragment>
|
29
|
+
<form
|
30
|
+
action="#"
|
31
|
+
>
|
32
|
+
<div
|
33
|
+
class="form-group"
|
34
|
+
>
|
35
|
+
<div
|
36
|
+
id="test-error-scroll-target"
|
37
|
+
style="display: none;"
|
38
|
+
/>
|
39
|
+
<div
|
40
|
+
class="react-date-picker react-date-picker--closed react-date-picker--enabled form-control"
|
41
|
+
>
|
42
|
+
<div
|
43
|
+
class="react-date-picker__wrapper"
|
44
|
+
>
|
45
|
+
<div
|
46
|
+
class="react-date-picker__inputGroup"
|
47
|
+
>
|
48
|
+
<input
|
49
|
+
max="2021-09-23"
|
50
|
+
min="2020-09-23"
|
51
|
+
name="test"
|
52
|
+
style="visibility: hidden; position: absolute; z-index: -999;"
|
53
|
+
type="date"
|
54
|
+
value=""
|
55
|
+
/>
|
56
|
+
<input
|
57
|
+
autocomplete="off"
|
58
|
+
class="react-date-picker__inputGroup__input react-date-picker__inputGroup__month"
|
59
|
+
data-input="true"
|
60
|
+
inputmode="numeric"
|
61
|
+
max="12"
|
62
|
+
min="1"
|
63
|
+
name="month"
|
64
|
+
placeholder="--"
|
65
|
+
type="number"
|
66
|
+
value=""
|
67
|
+
/>
|
68
|
+
<span
|
69
|
+
class="react-date-picker__inputGroup__divider"
|
70
|
+
>
|
71
|
+
/
|
72
|
+
</span>
|
73
|
+
<input
|
74
|
+
autocomplete="off"
|
75
|
+
class="react-date-picker__inputGroup__input react-date-picker__inputGroup__day"
|
76
|
+
data-input="true"
|
77
|
+
inputmode="numeric"
|
78
|
+
max="31"
|
79
|
+
min="1"
|
80
|
+
name="day"
|
81
|
+
placeholder="--"
|
82
|
+
type="number"
|
83
|
+
value=""
|
84
|
+
/>
|
85
|
+
<span
|
86
|
+
class="react-date-picker__inputGroup__divider"
|
87
|
+
>
|
88
|
+
/
|
89
|
+
</span>
|
90
|
+
<input
|
91
|
+
autocomplete="off"
|
92
|
+
class="react-date-picker__inputGroup__input react-date-picker__inputGroup__year"
|
93
|
+
data-input="true"
|
94
|
+
inputmode="numeric"
|
95
|
+
max="2021"
|
96
|
+
min="2020"
|
97
|
+
name="year"
|
98
|
+
placeholder="----"
|
99
|
+
step="1"
|
100
|
+
type="number"
|
101
|
+
value=""
|
102
|
+
/>
|
103
|
+
</div>
|
104
|
+
<button
|
105
|
+
class="react-date-picker__clear-button react-date-picker__button"
|
106
|
+
type="button"
|
107
|
+
>
|
108
|
+
<svg
|
109
|
+
class="react-date-picker__clear-button__icon react-date-picker__button__icon"
|
110
|
+
height="19"
|
111
|
+
stroke="black"
|
112
|
+
stroke-width="2"
|
113
|
+
viewBox="0 0 19 19"
|
114
|
+
width="19"
|
115
|
+
xmlns="http://www.w3.org/2000/svg"
|
116
|
+
>
|
117
|
+
<line
|
118
|
+
x1="4"
|
119
|
+
x2="15"
|
120
|
+
y1="4"
|
121
|
+
y2="15"
|
122
|
+
/>
|
123
|
+
<line
|
124
|
+
x1="15"
|
125
|
+
x2="4"
|
126
|
+
y1="4"
|
127
|
+
y2="15"
|
128
|
+
/>
|
129
|
+
</svg>
|
130
|
+
</button>
|
131
|
+
<button
|
132
|
+
class="react-date-picker__calendar-button react-date-picker__button"
|
133
|
+
type="button"
|
134
|
+
>
|
135
|
+
<svg
|
136
|
+
class="react-date-picker__calendar-button__icon react-date-picker__button__icon"
|
137
|
+
height="19"
|
138
|
+
stroke="black"
|
139
|
+
stroke-width="2"
|
140
|
+
viewBox="0 0 19 19"
|
141
|
+
width="19"
|
142
|
+
xmlns="http://www.w3.org/2000/svg"
|
143
|
+
>
|
144
|
+
<rect
|
145
|
+
fill="none"
|
146
|
+
height="15"
|
147
|
+
width="15"
|
148
|
+
x="2"
|
149
|
+
y="2"
|
150
|
+
/>
|
151
|
+
<line
|
152
|
+
x1="6"
|
153
|
+
x2="6"
|
154
|
+
y1="0"
|
155
|
+
y2="4"
|
156
|
+
/>
|
157
|
+
<line
|
158
|
+
x1="13"
|
159
|
+
x2="13"
|
160
|
+
y1="0"
|
161
|
+
y2="4"
|
162
|
+
/>
|
163
|
+
</svg>
|
164
|
+
</button>
|
165
|
+
</div>
|
166
|
+
</div>
|
167
|
+
</div>
|
168
|
+
</form>
|
169
|
+
</DocumentFragment>
|
170
|
+
`;
|
171
|
+
|
172
|
+
exports[`FormInput has matching file input snapshot 1`] = `
|
173
|
+
<DocumentFragment>
|
174
|
+
<form
|
175
|
+
action="#"
|
176
|
+
>
|
177
|
+
<div
|
178
|
+
class="form-group"
|
179
|
+
>
|
180
|
+
<div
|
181
|
+
id="test-error-scroll-target"
|
182
|
+
style="display: none;"
|
183
|
+
/>
|
184
|
+
<div
|
185
|
+
class="custom-file file-input "
|
186
|
+
>
|
187
|
+
<div>
|
188
|
+
<input
|
189
|
+
class="custom-file-input"
|
190
|
+
id="test"
|
191
|
+
meta="[object Object]"
|
192
|
+
name="test"
|
193
|
+
type="file"
|
194
|
+
/>
|
195
|
+
</div>
|
196
|
+
<label
|
197
|
+
class="custom-file-label"
|
198
|
+
>
|
199
|
+
<div>
|
200
|
+
<span>
|
201
|
+
Choose A File...
|
202
|
+
</span>
|
203
|
+
</div>
|
204
|
+
</label>
|
205
|
+
</div>
|
206
|
+
<ul
|
207
|
+
class="list-group"
|
208
|
+
/>
|
209
|
+
</div>
|
210
|
+
</form>
|
211
|
+
</DocumentFragment>
|
212
|
+
`;
|
213
|
+
|
214
|
+
exports[`FormInput has matching select snapshot 1`] = `
|
215
|
+
<DocumentFragment>
|
216
|
+
<form
|
217
|
+
action="#"
|
218
|
+
>
|
219
|
+
<div
|
220
|
+
class="form-group"
|
221
|
+
>
|
222
|
+
<div
|
223
|
+
id="test-error-scroll-target"
|
224
|
+
style="display: none;"
|
225
|
+
/>
|
226
|
+
<div
|
227
|
+
class="react-select-input css-2b097c-container"
|
228
|
+
id="test"
|
229
|
+
>
|
230
|
+
<div
|
231
|
+
class=" css-150ye8w-control"
|
232
|
+
>
|
233
|
+
<div
|
234
|
+
class=" css-lbak6p-Component"
|
235
|
+
>
|
236
|
+
<div
|
237
|
+
class=" css-1osw1h9-placeholder"
|
238
|
+
>
|
239
|
+
Select...
|
240
|
+
</div>
|
241
|
+
<div
|
242
|
+
class="css-lp83hw-Component"
|
243
|
+
>
|
244
|
+
<div
|
245
|
+
class=""
|
246
|
+
style="display: inline-block;"
|
247
|
+
>
|
248
|
+
<input
|
249
|
+
aria-autocomplete="list"
|
250
|
+
autocapitalize="none"
|
251
|
+
autocomplete="off"
|
252
|
+
autocorrect="off"
|
253
|
+
id="react-select-2-input"
|
254
|
+
spellcheck="false"
|
255
|
+
style="box-sizing: content-box; width: 2px; border: 0px; opacity: 1; outline: 0; padding: 0px;"
|
256
|
+
tabindex="0"
|
257
|
+
type="text"
|
258
|
+
value=""
|
259
|
+
/>
|
260
|
+
<div
|
261
|
+
style="position: absolute; top: 0px; left: 0px; visibility: hidden; height: 0px; overflow: scroll; white-space: pre; font-family: -webkit-small-control; letter-spacing: normal; text-transform: none;"
|
262
|
+
/>
|
263
|
+
</div>
|
264
|
+
</div>
|
265
|
+
</div>
|
266
|
+
<div
|
267
|
+
class=" css-ny0e4k-Component"
|
268
|
+
>
|
269
|
+
<span
|
270
|
+
class=" css-1sl80az-indicatorSeparator"
|
271
|
+
/>
|
272
|
+
<div
|
273
|
+
aria-hidden="true"
|
274
|
+
class=" css-augegj-indicatorContainer"
|
275
|
+
>
|
276
|
+
<svg
|
277
|
+
aria-hidden="true"
|
278
|
+
class="css-7ezgaa-Component"
|
279
|
+
focusable="false"
|
280
|
+
height="20"
|
281
|
+
viewBox="0 0 20 20"
|
282
|
+
width="20"
|
283
|
+
>
|
284
|
+
<path
|
285
|
+
d="M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"
|
286
|
+
/>
|
287
|
+
</svg>
|
288
|
+
</div>
|
289
|
+
</div>
|
290
|
+
</div>
|
291
|
+
<input
|
292
|
+
name="test"
|
293
|
+
type="hidden"
|
294
|
+
value=""
|
295
|
+
/>
|
296
|
+
</div>
|
297
|
+
</div>
|
298
|
+
</form>
|
299
|
+
</DocumentFragment>
|
300
|
+
`;
|
301
|
+
|
302
|
+
exports[`FormInput has matching textarea snapshot 1`] = `
|
303
|
+
<DocumentFragment>
|
304
|
+
<form
|
305
|
+
action="#"
|
306
|
+
>
|
307
|
+
<div
|
308
|
+
class="form-group"
|
309
|
+
>
|
310
|
+
<div
|
311
|
+
id="test-error-scroll-target"
|
312
|
+
style="display: none;"
|
313
|
+
/>
|
314
|
+
<textarea
|
315
|
+
class="form-control"
|
316
|
+
id="test"
|
317
|
+
name="test"
|
318
|
+
type="textarea"
|
319
|
+
/>
|
320
|
+
</div>
|
321
|
+
</form>
|
322
|
+
</DocumentFragment>
|
323
|
+
`;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
.invalid-feedback {
|
2
|
-
display: block;
|
3
|
-
}
|
4
|
-
|
5
|
-
.form-group {
|
6
|
-
input[disabled] {
|
7
|
-
cursor: not-allowed;
|
8
|
-
}
|
9
|
-
}
|
1
|
+
.invalid-feedback {
|
2
|
+
display: block;
|
3
|
+
}
|
4
|
+
|
5
|
+
.form-group {
|
6
|
+
input[disabled] {
|
7
|
+
cursor: not-allowed;
|
8
|
+
}
|
9
|
+
}
|
package/src/FormInput/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import FormInput from './FormInput';
|
2
|
-
export default FormInput;
|
1
|
+
import FormInput from './FormInput';
|
2
|
+
export default FormInput;
|