envoc-form 2.0.1-7 → 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.
Files changed (143) hide show
  1. package/README.md +7 -7
  2. package/dist/css/envoc-form-styles.css +43 -5
  3. package/dist/css/envoc-form-styles.css.map +1 -1
  4. package/es/AddressInput/AddressInput.js +7 -6
  5. package/es/ConfirmBaseForm/ConfirmBaseForm.js +3 -2
  6. package/es/ConfirmDeleteForm/ConfirmDeleteForm.js +2 -1
  7. package/es/DatePickerInput/DatePickerInput.js +22 -5
  8. package/es/FileInput/DefaultFileList.js +12 -8
  9. package/es/FileInput/DropzoneFileInput.js +24 -23
  10. package/es/FileInput/FileInput.js +31 -9
  11. package/es/Form/Form.js +4 -2
  12. package/es/FormGroupWrapper.js +2 -1
  13. package/es/FormInput/FormInput.js +12 -6
  14. package/es/FormInputArray/FormInputArray.js +39 -24
  15. package/es/IconInput.js +2 -1
  16. package/es/ReactSelectField/ReactSelectField.js +6 -3
  17. package/es/SubmitFormButton.js +2 -1
  18. package/es/__Tests__/FormTestBase.js +5 -2
  19. package/es/normalizers.js +10 -5
  20. package/es/useStandardFormInput.js +4 -2
  21. package/es/utils/objectToFormData.js +10 -2
  22. package/lib/AddressInput/AddressInput.js +14 -8
  23. package/lib/ConfirmBaseForm/ConfirmBaseForm.js +4 -2
  24. package/lib/ConfirmDeleteForm/ConfirmDeleteForm.js +3 -1
  25. package/lib/DatePickerInput/DatePickerInput.js +25 -5
  26. package/lib/FileInput/DefaultFileList.js +20 -13
  27. package/lib/FileInput/DropzoneFileInput.js +25 -25
  28. package/lib/FileInput/FileInput.js +39 -10
  29. package/lib/Form/Form.js +11 -4
  30. package/lib/Form/FormBasedPreventNavigation.js +5 -1
  31. package/lib/FormGroupWrapper.js +3 -1
  32. package/lib/FormInput/FormInput.js +13 -6
  33. package/lib/FormInputArray/FormInputArray.js +47 -26
  34. package/lib/FormSection.js +5 -1
  35. package/lib/IconInput.js +3 -1
  36. package/lib/ReactSelectField/ReactSelectField.js +13 -5
  37. package/lib/ReactSelectField/index.js +6 -2
  38. package/lib/SubmitFormButton.js +3 -1
  39. package/lib/__Tests__/FormTestBase.js +6 -2
  40. package/lib/index.js +7 -3
  41. package/lib/normalizers.js +10 -5
  42. package/lib/useStandardFormInput.js +5 -2
  43. package/lib/utils/objectToFormData.js +10 -2
  44. package/lib/validators/index.js +5 -1
  45. package/package.json +99 -93
  46. package/src/AddressInput/AddesssInput.test.js +23 -23
  47. package/src/AddressInput/AddressInput.js +73 -73
  48. package/src/AddressInput/UsStates.js +53 -53
  49. package/src/AddressInput/__snapshots__/AddesssInput.test.js.snap +207 -207
  50. package/src/AddressInput/index.js +2 -2
  51. package/src/BoolInput/BoolInput.js +7 -7
  52. package/src/BoolInput/BoolInput.test.js +23 -23
  53. package/src/BoolInput/InlineBoolInput.js +7 -7
  54. package/src/BoolInput/__snapshots__/BoolInput.test.js.snap +89 -89
  55. package/src/BoolInput/boolOptions.js +6 -6
  56. package/src/BoolInput/index.js +4 -4
  57. package/src/ConfirmBaseForm/ConfirmBaseForm.js +37 -37
  58. package/src/ConfirmBaseForm/ConfirmBaseForm.test.js +14 -14
  59. package/src/ConfirmBaseForm/__snapshots__/ConfirmBaseForm.test.js.snap +23 -23
  60. package/src/ConfirmBaseForm/index.js +1 -1
  61. package/src/ConfirmDeleteForm/ConfirmDeleteForm.js +39 -39
  62. package/src/ConfirmDeleteForm/ConfirmDeleteForm.test.js +24 -24
  63. package/src/ConfirmDeleteForm/__snapshots__/ConfirmDeleteForm.test.js.snap +25 -25
  64. package/src/ConfirmDeleteForm/index.js +1 -1
  65. package/src/DatePickerInput/DatePickerInput.js +58 -46
  66. package/src/DatePickerInput/DatePickerInput.test.js +74 -74
  67. package/src/DatePickerInput/__snapshots__/DatePickerInput.test.js.snap +134 -134
  68. package/src/DatePickerInput/date-picker-input.scss +42 -42
  69. package/src/DatePickerInput/index.js +3 -3
  70. package/src/ErrorScrollTarget.js +6 -6
  71. package/src/FileInput/DefaultFileList.js +39 -39
  72. package/src/FileInput/DropzoneFileInput.js +56 -59
  73. package/src/FileInput/DropzoneFileInput.test.js +24 -0
  74. package/src/FileInput/FileInput.js +77 -49
  75. package/src/FileInput/FileInput.test.js +24 -15
  76. package/src/FileInput/__snapshots__/DropzoneFileInput.test.js.snap +57 -0
  77. package/src/FileInput/__snapshots__/FileInput.test.js.snap +58 -22
  78. package/src/FileInput/file-input.scss +58 -17
  79. package/src/FileInput/index.js +4 -4
  80. package/src/Form/FocusError.js +48 -48
  81. package/src/Form/Form.js +139 -138
  82. package/src/Form/Form.test.js +23 -23
  83. package/src/Form/FormBasedPreventNavigation.js +25 -25
  84. package/src/Form/ServerErrorContext.js +7 -7
  85. package/src/Form/__snapshots__/Form.test.js.snap +9 -9
  86. package/src/Form/index.js +3 -3
  87. package/src/FormGroup.js +30 -30
  88. package/src/FormGroupWrapper.js +28 -28
  89. package/src/FormInput/FormInput.js +144 -144
  90. package/src/FormInput/FormInput.test.js +66 -66
  91. package/src/FormInput/__snapshots__/FormInput.test.js.snap +323 -316
  92. package/src/FormInput/form-input.scss +9 -9
  93. package/src/FormInput/index.js +2 -2
  94. package/src/FormInputArray/FormInputArray.js +224 -210
  95. package/src/FormInputArray/FormInputArray.test.js +108 -59
  96. package/src/FormInputArray/__snapshots__/FormInputArray.test.js.snap +52 -40
  97. package/src/FormInputArray/form-input-array.scss +13 -8
  98. package/src/FormInputArray/index.js +2 -2
  99. package/src/FormSection.js +13 -13
  100. package/src/IconInput.js +31 -31
  101. package/src/InlineFormInput/InlineFormInput.js +6 -6
  102. package/src/InlineFormInput/InlineFormInput.test.js +23 -23
  103. package/src/InlineFormInput/__snapshots__/InlineFormInput.test.js.snap +26 -26
  104. package/src/InlineFormInput/index.js +3 -3
  105. package/src/InlineFormInput/inline-form-input.scss +3 -3
  106. package/src/MoneyInput/InlineMoneyInput.js +7 -7
  107. package/src/MoneyInput/MoneyInput.js +7 -7
  108. package/src/MoneyInput/MoneyInputs.test.js +43 -43
  109. package/src/MoneyInput/__snapshots__/MoneyInputs.test.js.snap +81 -81
  110. package/src/MoneyInput/index.js +4 -4
  111. package/src/MoneyInput/money-input.scss +3 -3
  112. package/src/MoneyInput/moneyInputProps.js +12 -12
  113. package/src/NestedFormFieldContext.js +6 -6
  114. package/src/ReactSelectField/ReactSelectField.js +122 -120
  115. package/src/ReactSelectField/index.js +6 -6
  116. package/src/ReactSelectField/react-select-field.scss +5 -5
  117. package/src/StandardFormActions.js +27 -27
  118. package/src/SubmitFormButton.js +28 -28
  119. package/src/__Tests__/FormTestBase.js +14 -11
  120. package/src/__Tests__/IconInput.test.js +23 -23
  121. package/src/__Tests__/StandardFormActions.test.js +23 -23
  122. package/src/__Tests__/SubmitFormButton.test.js +23 -23
  123. package/src/__Tests__/__snapshots__/IconInput.test.js.snap +38 -38
  124. package/src/__Tests__/__snapshots__/StandardFormActions.test.js.snap +25 -25
  125. package/src/__Tests__/__snapshots__/SubmitFormButton.test.js.snap +18 -18
  126. package/src/__Tests__/index.js +2 -2
  127. package/src/_variables.scss +11 -11
  128. package/src/index.js +33 -33
  129. package/src/normalizers.js +42 -32
  130. package/src/selectors.js +3 -3
  131. package/src/styles.scss +7 -7
  132. package/src/useStandardFormInput.js +118 -118
  133. package/src/utils/index.js +3 -3
  134. package/src/utils/objectContainsNonSerializableProperty.js +15 -15
  135. package/src/utils/objectContainsNonSerializableProperty.test.js +49 -49
  136. package/src/utils/objectToFormData.js +89 -83
  137. package/src/utils/objectToFormData.test.js +76 -47
  138. package/src/utils/typeChecks.js +18 -18
  139. package/src/validators/index.js +2 -2
  140. package/src/validators/validators.js +93 -93
  141. package/src/validators/validators.test.js +79 -79
  142. package/CHANGELOG.json +0 -95
  143. package/CHANGELOG.md +0 -58
@@ -1,53 +1,53 @@
1
- const states = [
2
- { label: 'Alabama', value: 'AL' },
3
- { label: 'Alaska', value: 'AK' },
4
- { label: 'Arizona', value: 'AZ' },
5
- { label: 'Arkansas', value: 'AR' },
6
- { label: 'California', value: 'CA' },
7
- { label: 'Colorado', value: 'CO' },
8
- { label: 'Connecticut', value: 'CT' },
9
- { label: 'Delaware', value: 'DE' },
10
- { label: 'Florida', value: 'FL' },
11
- { label: 'Georgia', value: 'GA' },
12
- { label: 'Hawaii', value: 'HI' },
13
- { label: 'Idaho', value: 'ID' },
14
- { label: 'Illinois', value: 'IL' },
15
- { label: 'Indiana', value: 'IN' },
16
- { label: 'Iowa', value: 'IA' },
17
- { label: 'Kansas', value: 'KS' },
18
- { label: 'Kentucky', value: 'KY' },
19
- { label: 'Louisiana', value: 'LA' },
20
- { label: 'Maine', value: 'ME' },
21
- { label: 'Maryland', value: 'MD' },
22
- { label: 'Massachusetts', value: 'MA' },
23
- { label: 'Michigan', value: 'MI' },
24
- { label: 'Minnesota', value: 'MN' },
25
- { label: 'Mississippi', value: 'MS' },
26
- { label: 'Missouri', value: 'MO' },
27
- { label: 'Montana', value: 'MT' },
28
- { label: 'Nebraska', value: 'NE' },
29
- { label: 'Nevada', value: 'NV' },
30
- { label: 'New Hampshire', value: 'NH' },
31
- { label: 'New Jersey', value: 'NJ' },
32
- { label: 'New Mexico', value: 'NM' },
33
- { label: 'New York', value: 'NY' },
34
- { label: 'North Carolina', value: 'NC' },
35
- { label: 'North Dakota', value: 'ND' },
36
- { label: 'Ohio', value: 'OH' },
37
- { label: 'Oklahoma', value: 'OK' },
38
- { label: 'Oregon', value: 'OR' },
39
- { label: 'Pennsylvania', value: 'PA' },
40
- { label: 'Rhode Island', value: 'RI' },
41
- { label: 'South Carolina', value: 'SC' },
42
- { label: 'South Dakota', value: 'SD' },
43
- { label: 'Tennessee', value: 'TN' },
44
- { label: 'Texas', value: 'TX' },
45
- { label: 'Utah', value: 'UT' },
46
- { label: 'Vermont', value: 'VT' },
47
- { label: 'Virginia', value: 'VA' },
48
- { label: 'Washington', value: 'WA' },
49
- { label: 'West Virginia', value: 'WV' },
50
- { label: 'Wisconsin', value: 'WI' },
51
- { label: 'Wyoming', value: 'WY' },
52
- ];
53
- export default states;
1
+ const states = [
2
+ { label: 'Alabama', value: 'AL' },
3
+ { label: 'Alaska', value: 'AK' },
4
+ { label: 'Arizona', value: 'AZ' },
5
+ { label: 'Arkansas', value: 'AR' },
6
+ { label: 'California', value: 'CA' },
7
+ { label: 'Colorado', value: 'CO' },
8
+ { label: 'Connecticut', value: 'CT' },
9
+ { label: 'Delaware', value: 'DE' },
10
+ { label: 'Florida', value: 'FL' },
11
+ { label: 'Georgia', value: 'GA' },
12
+ { label: 'Hawaii', value: 'HI' },
13
+ { label: 'Idaho', value: 'ID' },
14
+ { label: 'Illinois', value: 'IL' },
15
+ { label: 'Indiana', value: 'IN' },
16
+ { label: 'Iowa', value: 'IA' },
17
+ { label: 'Kansas', value: 'KS' },
18
+ { label: 'Kentucky', value: 'KY' },
19
+ { label: 'Louisiana', value: 'LA' },
20
+ { label: 'Maine', value: 'ME' },
21
+ { label: 'Maryland', value: 'MD' },
22
+ { label: 'Massachusetts', value: 'MA' },
23
+ { label: 'Michigan', value: 'MI' },
24
+ { label: 'Minnesota', value: 'MN' },
25
+ { label: 'Mississippi', value: 'MS' },
26
+ { label: 'Missouri', value: 'MO' },
27
+ { label: 'Montana', value: 'MT' },
28
+ { label: 'Nebraska', value: 'NE' },
29
+ { label: 'Nevada', value: 'NV' },
30
+ { label: 'New Hampshire', value: 'NH' },
31
+ { label: 'New Jersey', value: 'NJ' },
32
+ { label: 'New Mexico', value: 'NM' },
33
+ { label: 'New York', value: 'NY' },
34
+ { label: 'North Carolina', value: 'NC' },
35
+ { label: 'North Dakota', value: 'ND' },
36
+ { label: 'Ohio', value: 'OH' },
37
+ { label: 'Oklahoma', value: 'OK' },
38
+ { label: 'Oregon', value: 'OR' },
39
+ { label: 'Pennsylvania', value: 'PA' },
40
+ { label: 'Rhode Island', value: 'RI' },
41
+ { label: 'South Carolina', value: 'SC' },
42
+ { label: 'South Dakota', value: 'SD' },
43
+ { label: 'Tennessee', value: 'TN' },
44
+ { label: 'Texas', value: 'TX' },
45
+ { label: 'Utah', value: 'UT' },
46
+ { label: 'Vermont', value: 'VT' },
47
+ { label: 'Virginia', value: 'VA' },
48
+ { label: 'Washington', value: 'WA' },
49
+ { label: 'West Virginia', value: 'WV' },
50
+ { label: 'Wisconsin', value: 'WI' },
51
+ { label: 'Wyoming', value: 'WY' },
52
+ ];
53
+ export default states;
@@ -1,207 +1,207 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`AddressInput has matching snapshot 1`] = `
4
- <DocumentFragment>
5
- <form
6
- action="#"
7
- >
8
- <div
9
- class="form-group"
10
- >
11
- <label
12
- class=""
13
- for="address.address1"
14
- >
15
- Address 1
16
- </label>
17
- <div
18
- id="address.address1-error-scroll-target"
19
- style="display: none;"
20
- />
21
- <input
22
- aria-invalid="false"
23
- autocomplete="address-line1"
24
- class="form-control"
25
- id="address.address1"
26
- label="Address 1"
27
- name="address.address1"
28
- placeholder="Address, Line 1"
29
- type="text"
30
- value=""
31
- />
32
- </div>
33
- <div
34
- class="form-group"
35
- >
36
- <label
37
- class=""
38
- for="address.address2"
39
- >
40
- Address 2
41
- </label>
42
- <div
43
- id="address.address2-error-scroll-target"
44
- style="display: none;"
45
- />
46
- <input
47
- aria-invalid="false"
48
- autocomplete="address-line2"
49
- class="form-control"
50
- id="address.address2"
51
- label="Address 2"
52
- name="address.address2"
53
- placeholder="Address, Line 2"
54
- type="text"
55
- value=""
56
- />
57
- </div>
58
- <div
59
- class="form-group"
60
- >
61
- <label
62
- class=""
63
- for="address.city"
64
- >
65
- City
66
- </label>
67
- <div
68
- id="address.city-error-scroll-target"
69
- style="display: none;"
70
- />
71
- <input
72
- aria-invalid="false"
73
- autocomplete="address-level2"
74
- class="form-control"
75
- id="address.city"
76
- label="City"
77
- name="address.city"
78
- placeholder="City"
79
- type="text"
80
- value=""
81
- />
82
- </div>
83
- <div
84
- class="row"
85
- >
86
- <div
87
- class="col-8"
88
- >
89
- <div
90
- class="form-group"
91
- >
92
- <label
93
- class=""
94
- for="address.state"
95
- >
96
- State
97
- </label>
98
- <div
99
- id="address.state-error-scroll-target"
100
- style="display: none;"
101
- />
102
- <div
103
- class="react-select-input css-2b097c-container"
104
- id="address.state"
105
- >
106
- <div
107
- class=" css-150ye8w-control"
108
- >
109
- <div
110
- class=" css-lbak6p-Component"
111
- >
112
- <div
113
- class=" css-1osw1h9-placeholder"
114
- >
115
- State
116
- </div>
117
- <div
118
- class="css-lp83hw-Component"
119
- >
120
- <div
121
- class=""
122
- style="display: inline-block;"
123
- >
124
- <input
125
- aria-autocomplete="list"
126
- autocapitalize="none"
127
- autocomplete="off"
128
- autocorrect="off"
129
- id="react-select-3-input"
130
- spellcheck="false"
131
- style="box-sizing: content-box; width: 2px; border: 0px; opacity: 1; outline: 0; padding: 0px;"
132
- tabindex="0"
133
- type="text"
134
- value=""
135
- />
136
- <div
137
- 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;"
138
- />
139
- </div>
140
- </div>
141
- </div>
142
- <div
143
- class=" css-ny0e4k-Component"
144
- >
145
- <span
146
- class=" css-1sl80az-indicatorSeparator"
147
- />
148
- <div
149
- aria-hidden="true"
150
- class=" css-augegj-indicatorContainer"
151
- >
152
- <svg
153
- aria-hidden="true"
154
- class="css-7ezgaa-Component"
155
- focusable="false"
156
- height="20"
157
- viewBox="0 0 20 20"
158
- width="20"
159
- >
160
- <path
161
- 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"
162
- />
163
- </svg>
164
- </div>
165
- </div>
166
- </div>
167
- <input
168
- name="address.state"
169
- type="hidden"
170
- value=""
171
- />
172
- </div>
173
- </div>
174
- </div>
175
- <div
176
- class="col-4"
177
- >
178
- <div
179
- class="form-group"
180
- >
181
- <label
182
- class=""
183
- for="address.zipCode"
184
- >
185
- Zip
186
- </label>
187
- <div
188
- id="address.zipcode-error-scroll-target"
189
- style="display: none;"
190
- />
191
- <input
192
- aria-invalid="false"
193
- autocomplete="postal-code"
194
- class="form-control"
195
- id="address.zipCode"
196
- label="Zip"
197
- name="address.zipCode"
198
- placeholder="Zip"
199
- type="text"
200
- value=""
201
- />
202
- </div>
203
- </div>
204
- </div>
205
- </form>
206
- </DocumentFragment>
207
- `;
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`AddressInput has matching snapshot 1`] = `
4
+ <DocumentFragment>
5
+ <form
6
+ action="#"
7
+ >
8
+ <div
9
+ class="form-group"
10
+ >
11
+ <label
12
+ class=""
13
+ for="address.address1"
14
+ >
15
+ Address 1
16
+ </label>
17
+ <div
18
+ id="address.address1-error-scroll-target"
19
+ style="display: none;"
20
+ />
21
+ <input
22
+ aria-invalid="false"
23
+ autocomplete="address-line1"
24
+ class="form-control"
25
+ id="address.address1"
26
+ label="Address 1"
27
+ name="address.address1"
28
+ placeholder="Address, Line 1"
29
+ type="text"
30
+ value=""
31
+ />
32
+ </div>
33
+ <div
34
+ class="form-group"
35
+ >
36
+ <label
37
+ class=""
38
+ for="address.address2"
39
+ >
40
+ Address 2
41
+ </label>
42
+ <div
43
+ id="address.address2-error-scroll-target"
44
+ style="display: none;"
45
+ />
46
+ <input
47
+ aria-invalid="false"
48
+ autocomplete="address-line2"
49
+ class="form-control"
50
+ id="address.address2"
51
+ label="Address 2"
52
+ name="address.address2"
53
+ placeholder="Address, Line 2"
54
+ type="text"
55
+ value=""
56
+ />
57
+ </div>
58
+ <div
59
+ class="form-group"
60
+ >
61
+ <label
62
+ class=""
63
+ for="address.city"
64
+ >
65
+ City
66
+ </label>
67
+ <div
68
+ id="address.city-error-scroll-target"
69
+ style="display: none;"
70
+ />
71
+ <input
72
+ aria-invalid="false"
73
+ autocomplete="address-level2"
74
+ class="form-control"
75
+ id="address.city"
76
+ label="City"
77
+ name="address.city"
78
+ placeholder="City"
79
+ type="text"
80
+ value=""
81
+ />
82
+ </div>
83
+ <div
84
+ class="row"
85
+ >
86
+ <div
87
+ class="col-8"
88
+ >
89
+ <div
90
+ class="form-group"
91
+ >
92
+ <label
93
+ class=""
94
+ for="address.state"
95
+ >
96
+ State
97
+ </label>
98
+ <div
99
+ id="address.state-error-scroll-target"
100
+ style="display: none;"
101
+ />
102
+ <div
103
+ class="react-select-input css-2b097c-container"
104
+ id="address.state"
105
+ >
106
+ <div
107
+ class=" css-150ye8w-control"
108
+ >
109
+ <div
110
+ class=" css-lbak6p-Component"
111
+ >
112
+ <div
113
+ class=" css-1osw1h9-placeholder"
114
+ >
115
+ State
116
+ </div>
117
+ <div
118
+ class="css-lp83hw-Component"
119
+ >
120
+ <div
121
+ class=""
122
+ style="display: inline-block;"
123
+ >
124
+ <input
125
+ aria-autocomplete="list"
126
+ autocapitalize="none"
127
+ autocomplete="off"
128
+ autocorrect="off"
129
+ id="react-select-3-input"
130
+ spellcheck="false"
131
+ style="box-sizing: content-box; width: 2px; border: 0px; opacity: 1; outline: 0; padding: 0px;"
132
+ tabindex="0"
133
+ type="text"
134
+ value=""
135
+ />
136
+ <div
137
+ 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;"
138
+ />
139
+ </div>
140
+ </div>
141
+ </div>
142
+ <div
143
+ class=" css-ny0e4k-Component"
144
+ >
145
+ <span
146
+ class=" css-1sl80az-indicatorSeparator"
147
+ />
148
+ <div
149
+ aria-hidden="true"
150
+ class=" css-augegj-indicatorContainer"
151
+ >
152
+ <svg
153
+ aria-hidden="true"
154
+ class="css-7ezgaa-Component"
155
+ focusable="false"
156
+ height="20"
157
+ viewBox="0 0 20 20"
158
+ width="20"
159
+ >
160
+ <path
161
+ 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"
162
+ />
163
+ </svg>
164
+ </div>
165
+ </div>
166
+ </div>
167
+ <input
168
+ name="address.state"
169
+ type="hidden"
170
+ value=""
171
+ />
172
+ </div>
173
+ </div>
174
+ </div>
175
+ <div
176
+ class="col-4"
177
+ >
178
+ <div
179
+ class="form-group"
180
+ >
181
+ <label
182
+ class=""
183
+ for="address.zipCode"
184
+ >
185
+ Zip
186
+ </label>
187
+ <div
188
+ id="address.zipcode-error-scroll-target"
189
+ style="display: none;"
190
+ />
191
+ <input
192
+ aria-invalid="false"
193
+ autocomplete="postal-code"
194
+ class="form-control"
195
+ id="address.zipCode"
196
+ label="Zip"
197
+ name="address.zipCode"
198
+ placeholder="Zip"
199
+ type="text"
200
+ value=""
201
+ />
202
+ </div>
203
+ </div>
204
+ </div>
205
+ </form>
206
+ </DocumentFragment>
207
+ `;
@@ -1,2 +1,2 @@
1
- import AddressInput from './AddressInput';
2
- export default AddressInput;
1
+ import AddressInput from './AddressInput';
2
+ export default AddressInput;
@@ -1,7 +1,7 @@
1
- import React from 'react';
2
- import boolOptions from './boolOptions';
3
- import FormInput from '../FormInput';
4
-
5
- export default function BoolInput(props) {
6
- return <FormInput options={boolOptions} type="select" {...props} />;
7
- }
1
+ import React from 'react';
2
+ import boolOptions from './boolOptions';
3
+ import FormInput from '../FormInput';
4
+
5
+ export default function BoolInput(props) {
6
+ return <FormInput options={boolOptions} type="select" {...props} />;
7
+ }
@@ -1,23 +1,23 @@
1
- import React from 'react';
2
- import { render } from '@testing-library/react';
3
- import { FormTestBase } from '../__Tests__';
4
- import BoolInput from './BoolInput';
5
-
6
- describe('BoolInput', () => {
7
- it('renders without crashing', () => {
8
- render(
9
- <FormTestBase>
10
- <BoolInput name="yesNo" />
11
- </FormTestBase>
12
- );
13
- });
14
-
15
- it('has matching snapshot', () => {
16
- const renderResult = render(
17
- <FormTestBase>
18
- <BoolInput name="yesNo" />
19
- </FormTestBase>
20
- );
21
- expect(renderResult.asFragment()).toMatchSnapshot();
22
- });
23
- });
1
+ import React from 'react';
2
+ import { render } from '@testing-library/react';
3
+ import { FormTestBase } from '../__Tests__';
4
+ import BoolInput from './BoolInput';
5
+
6
+ describe('BoolInput', () => {
7
+ it('renders without crashing', () => {
8
+ render(
9
+ <FormTestBase>
10
+ <BoolInput name="yesNo" />
11
+ </FormTestBase>
12
+ );
13
+ });
14
+
15
+ it('has matching snapshot', () => {
16
+ const renderResult = render(
17
+ <FormTestBase>
18
+ <BoolInput name="yesNo" />
19
+ </FormTestBase>
20
+ );
21
+ expect(renderResult.asFragment()).toMatchSnapshot();
22
+ });
23
+ });
@@ -1,7 +1,7 @@
1
- import React from 'react';
2
- import boolOptions from './boolOptions';
3
- import InlineFormInput from '../InlineFormInput';
4
-
5
- export default function InlineBoolInput(props) {
6
- return <InlineFormInput options={boolOptions} type="select" {...props} />;
7
- }
1
+ import React from 'react';
2
+ import boolOptions from './boolOptions';
3
+ import InlineFormInput from '../InlineFormInput';
4
+
5
+ export default function InlineBoolInput(props) {
6
+ return <InlineFormInput options={boolOptions} type="select" {...props} />;
7
+ }