@patternfly/react-core 4.202.12 → 4.202.15

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 (53) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/esm/components/Drawer/DrawerContent.js +1 -1
  3. package/dist/esm/components/Drawer/DrawerContent.js.map +1 -1
  4. package/dist/esm/components/LoginPage/LoginFooterItem.d.ts.map +1 -1
  5. package/dist/esm/components/LoginPage/LoginFooterItem.js +1 -3
  6. package/dist/esm/components/LoginPage/LoginFooterItem.js.map +1 -1
  7. package/dist/esm/components/TextInput/TextInput.d.ts +1 -0
  8. package/dist/esm/components/TextInput/TextInput.d.ts.map +1 -1
  9. package/dist/esm/components/TextInput/TextInput.js +2 -1
  10. package/dist/esm/components/TextInput/TextInput.js.map +1 -1
  11. package/dist/js/components/Drawer/DrawerContent.js +1 -1
  12. package/dist/js/components/Drawer/DrawerContent.js.map +1 -1
  13. package/dist/js/components/LoginPage/LoginFooterItem.d.ts.map +1 -1
  14. package/dist/js/components/LoginPage/LoginFooterItem.js +1 -3
  15. package/dist/js/components/LoginPage/LoginFooterItem.js.map +1 -1
  16. package/dist/js/components/TextInput/TextInput.d.ts +1 -0
  17. package/dist/js/components/TextInput/TextInput.d.ts.map +1 -1
  18. package/dist/js/components/TextInput/TextInput.js +2 -1
  19. package/dist/js/components/TextInput/TextInput.js.map +1 -1
  20. package/dist/umd/react-core.js +4 -5
  21. package/dist/umd/react-core.min.js +2 -2
  22. package/package.json +6 -6
  23. package/src/components/Drawer/DrawerContent.tsx +1 -1
  24. package/src/components/EmptyState/__tests__/EmptyState.test.tsx +46 -42
  25. package/src/components/EmptyState/__tests__/__snapshots__/EmptyState.test.tsx.snap +5 -130
  26. package/src/components/Form/__tests__/FormGroup.test.tsx +82 -57
  27. package/src/components/Form/__tests__/FormHelperText.test.tsx +42 -28
  28. package/src/components/Form/__tests__/__snapshots__/FormGroup.test.tsx.snap +51 -250
  29. package/src/components/Form/__tests__/__snapshots__/FormHelperText.test.tsx.snap +4 -44
  30. package/src/components/FormSelect/__tests__/FormSelect.test.tsx +131 -122
  31. package/src/components/FormSelect/__tests__/__snapshots__/FormSelect.test.tsx.snap +9 -301
  32. package/src/components/InputGroup/__tests__/InputGroup.test.tsx +17 -41
  33. package/src/components/InputGroup/__tests__/InputGroupText.test.tsx +17 -0
  34. package/src/components/Label/__tests__/Label.test.tsx +127 -68
  35. package/src/components/Label/__tests__/__snapshots__/Label.test.tsx.snap +26 -828
  36. package/src/components/LabelGroup/__tests__/LabelGroup.test.tsx +24 -20
  37. package/src/components/LabelGroup/__tests__/__snapshots__/LabelGroup.test.tsx.snap +10 -12
  38. package/src/components/LoginPage/LoginFooterItem.tsx +0 -2
  39. package/src/components/LoginPage/__tests__/LoginFooterItem.test.tsx +23 -24
  40. package/src/components/LoginPage/__tests__/LoginForm.test.tsx +40 -33
  41. package/src/components/LoginPage/__tests__/LoginMainBody.test.tsx +10 -16
  42. package/src/components/LoginPage/__tests__/LoginMainFooter.test.tsx +11 -17
  43. package/src/components/LoginPage/__tests__/LoginMainFooterBandItem.test.tsx +23 -24
  44. package/src/components/LoginPage/__tests__/LoginMainFooterLinksItem.test.tsx +20 -24
  45. package/src/components/LoginPage/__tests__/LoginMainHeader.test.tsx +14 -20
  46. package/src/components/LoginPage/__tests__/__snapshots__/LoginFooterItem.test.tsx.snap +3 -13
  47. package/src/components/LoginPage/__tests__/__snapshots__/LoginForm.test.tsx.snap +3 -415
  48. package/src/components/LoginPage/__tests__/__snapshots__/LoginMainBody.test.tsx.snap +2 -8
  49. package/src/components/LoginPage/__tests__/__snapshots__/LoginMainFooter.test.tsx.snap +2 -8
  50. package/src/components/LoginPage/__tests__/__snapshots__/LoginMainFooterBandItem.test.tsx.snap +3 -17
  51. package/src/components/LoginPage/__tests__/__snapshots__/LoginMainFooterLinksItem.test.tsx.snap +3 -31
  52. package/src/components/LoginPage/__tests__/__snapshots__/LoginMainHeader.test.tsx.snap +3 -12
  53. package/src/components/TextInput/TextInput.tsx +4 -1
@@ -1,419 +1,7 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`LoginForm with rememberMeLabel 1`] = `
4
- <div>
5
- <form
6
- class="pf-c-form"
7
- novalidate=""
8
- >
9
- <p
10
- class="pf-c-form__helper-text pf-m-hidden"
11
- />
12
- <div
13
- class="pf-c-form__group"
14
- >
15
- <div
16
- class="pf-c-form__group-label"
17
- >
18
- <label
19
- class="pf-c-form__label"
20
- for="pf-login-username-id"
21
- >
22
- <span
23
- class="pf-c-form__label-text"
24
- >
25
- Username
26
- </span>
27
- <span
28
- aria-hidden="true"
29
- class="pf-c-form__label-required"
30
- >
31
-
32
- *
33
- </span>
34
- </label>
35
-
36
- </div>
37
- <div
38
- class="pf-c-form__group-control"
39
- >
40
- <input
41
- aria-invalid="false"
42
- class="pf-c-form-control"
43
- data-ouia-component-id="OUIA-Generated-TextInputBase-3"
44
- data-ouia-component-type="PF4/TextInput"
45
- data-ouia-safe="true"
46
- id="pf-login-username-id"
47
- name="pf-login-username-id"
48
- required=""
49
- type="text"
50
- value=""
51
- />
52
-
53
- </div>
54
- </div>
55
- <div
56
- class="pf-c-form__group"
57
- >
58
- <div
59
- class="pf-c-form__group-label"
60
- >
61
- <label
62
- class="pf-c-form__label"
63
- for="pf-login-password-id"
64
- >
65
- <span
66
- class="pf-c-form__label-text"
67
- >
68
- Password
69
- </span>
70
- <span
71
- aria-hidden="true"
72
- class="pf-c-form__label-required"
73
- >
74
-
75
- *
76
- </span>
77
- </label>
78
-
79
- </div>
80
- <div
81
- class="pf-c-form__group-control"
82
- >
83
- <input
84
- aria-invalid="false"
85
- class="pf-c-form-control"
86
- data-ouia-component-id="OUIA-Generated-TextInputBase-4"
87
- data-ouia-component-type="PF4/TextInput"
88
- data-ouia-safe="true"
89
- id="pf-login-password-id"
90
- name="pf-login-password-id"
91
- required=""
92
- type="password"
93
- value=""
94
- />
95
-
96
- </div>
97
- </div>
98
- <div
99
- class="pf-c-form__group"
100
- >
101
- <div
102
- class="pf-c-form__group-control"
103
- >
104
- <div
105
- class="pf-c-check"
106
- >
107
- <input
108
- aria-invalid="false"
109
- class="pf-c-check__input"
110
- data-ouia-component-id="OUIA-Generated-Checkbox-1"
111
- data-ouia-component-type="PF4/Checkbox"
112
- data-ouia-safe="true"
113
- id="pf-login-remember-me-id"
114
- type="checkbox"
115
- />
116
- <label
117
- class="pf-c-check__label"
118
- for="pf-login-remember-me-id"
119
- >
120
- remember me
121
- </label>
122
- </div>
123
-
124
- </div>
125
- </div>
126
- <div
127
- class="pf-c-form__group pf-m-action"
128
- >
129
- <div
130
- class="pf-c-form__group-control"
131
- >
132
- <div
133
- class="pf-c-form__actions"
134
- >
135
- <button
136
- aria-disabled="false"
137
- class="pf-c-button pf-m-primary pf-m-block"
138
- data-ouia-component-id="OUIA-Generated-Button-primary-2"
139
- data-ouia-component-type="PF4/Button"
140
- data-ouia-safe="true"
141
- type="submit"
142
- >
143
- Log In
144
- </button>
145
- </div>
146
- </div>
147
- </div>
148
- </form>
149
- </div>
150
- `;
3
+ exports[`LoginForm LoginForm with rememberMeLabel 1`] = `"<form novalidate=\\"\\" data-testid=\\"form-test-id\\" class=\\"pf-c-form\\"><p class=\\"pf-c-form__helper-text pf-m-hidden\\"></p><div class=\\"pf-c-form__group\\"><div class=\\"pf-c-form__group-label\\"><label class=\\"pf-c-form__label\\" for=\\"pf-login-username-id\\"><span class=\\"pf-c-form__label-text\\">Username</span><span class=\\"pf-c-form__label-required\\" aria-hidden=\\"true\\"> *</span></label> </div><div class=\\"pf-c-form__group-control\\"><input id=\\"pf-login-username-id\\" name=\\"pf-login-username-id\\" class=\\"pf-c-form-control\\" type=\\"text\\" aria-invalid=\\"false\\" required=\\"\\" data-ouia-component-type=\\"PF4/TextInput\\" data-ouia-safe=\\"true\\" data-ouia-component-id=\\"OUIA-Generated-TextInputBase-9\\" value=\\"\\"></div></div><div class=\\"pf-c-form__group\\"><div class=\\"pf-c-form__group-label\\"><label class=\\"pf-c-form__label\\" for=\\"pf-login-password-id\\"><span class=\\"pf-c-form__label-text\\">Password</span><span class=\\"pf-c-form__label-required\\" aria-hidden=\\"true\\"> *</span></label> </div><div class=\\"pf-c-form__group-control\\"><input id=\\"pf-login-password-id\\" name=\\"pf-login-password-id\\" class=\\"pf-c-form-control\\" type=\\"password\\" aria-invalid=\\"false\\" required=\\"\\" data-ouia-component-type=\\"PF4/TextInput\\" data-ouia-safe=\\"true\\" data-ouia-component-id=\\"OUIA-Generated-TextInputBase-10\\" value=\\"\\"></div></div><div class=\\"pf-c-form__group\\"><div class=\\"pf-c-form__group-control\\"><div class=\\"pf-c-check\\"><input id=\\"pf-login-remember-me-id\\" class=\\"pf-c-check__input\\" type=\\"checkbox\\" aria-invalid=\\"false\\" data-ouia-component-type=\\"PF4/Checkbox\\" data-ouia-safe=\\"true\\" data-ouia-component-id=\\"OUIA-Generated-Checkbox-4\\"><label class=\\"pf-c-check__label\\" for=\\"pf-login-remember-me-id\\">Remember me</label></div></div></div><div class=\\"pf-c-form__group pf-m-action\\"><div class=\\"pf-c-form__group-control\\"><div class=\\"pf-c-form__actions\\"><button aria-disabled=\\"false\\" class=\\"pf-c-button pf-m-primary pf-m-block\\" type=\\"submit\\" data-ouia-component-type=\\"PF4/Button\\" data-ouia-safe=\\"true\\" data-ouia-component-id=\\"OUIA-Generated-Button-primary-5\\">Log In</button></div></div></div></form>"`;
151
4
 
152
- exports[`LoginForm with show password 1`] = `
153
- <div>
154
- <form
155
- class="pf-c-form"
156
- novalidate=""
157
- >
158
- <p
159
- class="pf-c-form__helper-text pf-m-hidden"
160
- />
161
- <div
162
- class="pf-c-form__group"
163
- >
164
- <div
165
- class="pf-c-form__group-label"
166
- >
167
- <label
168
- class="pf-c-form__label"
169
- for="pf-login-username-id"
170
- >
171
- <span
172
- class="pf-c-form__label-text"
173
- >
174
- Username
175
- </span>
176
- <span
177
- aria-hidden="true"
178
- class="pf-c-form__label-required"
179
- >
180
-
181
- *
182
- </span>
183
- </label>
184
-
185
- </div>
186
- <div
187
- class="pf-c-form__group-control"
188
- >
189
- <input
190
- aria-invalid="false"
191
- class="pf-c-form-control"
192
- data-ouia-component-id="OUIA-Generated-TextInputBase-5"
193
- data-ouia-component-type="PF4/TextInput"
194
- data-ouia-safe="true"
195
- id="pf-login-username-id"
196
- name="pf-login-username-id"
197
- required=""
198
- type="text"
199
- value=""
200
- />
201
-
202
- </div>
203
- </div>
204
- <div
205
- class="pf-c-form__group"
206
- >
207
- <div
208
- class="pf-c-form__group-label"
209
- >
210
- <label
211
- class="pf-c-form__label"
212
- for="pf-login-password-id"
213
- >
214
- <span
215
- class="pf-c-form__label-text"
216
- >
217
- Password
218
- </span>
219
- <span
220
- aria-hidden="true"
221
- class="pf-c-form__label-required"
222
- >
223
-
224
- *
225
- </span>
226
- </label>
227
-
228
- </div>
229
- <div
230
- class="pf-c-form__group-control"
231
- >
232
- <div
233
- class="pf-c-input-group"
234
- >
235
- <input
236
- aria-invalid="false"
237
- class="pf-c-form-control"
238
- data-ouia-component-id="OUIA-Generated-TextInputBase-6"
239
- data-ouia-component-type="PF4/TextInput"
240
- data-ouia-safe="true"
241
- id="pf-login-password-id"
242
- name="pf-login-password-id"
243
- required=""
244
- type="password"
245
- value=""
246
- />
247
- <button
248
- aria-disabled="false"
249
- aria-label="Show password"
250
- class="pf-c-button pf-m-control"
251
- data-ouia-component-id="OUIA-Generated-Button-control-1"
252
- data-ouia-component-type="PF4/Button"
253
- data-ouia-safe="true"
254
- type="button"
255
- >
256
- <svg
257
- aria-hidden="true"
258
- fill="currentColor"
259
- height="1em"
260
- role="img"
261
- style="vertical-align: -0.125em;"
262
- viewBox="0 0 576 512"
263
- width="1em"
264
- >
265
- <path
266
- d="M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"
267
- />
268
- </svg>
269
- </button>
270
- </div>
271
-
272
- </div>
273
- </div>
274
- <div
275
- class="pf-c-form__group pf-m-action"
276
- >
277
- <div
278
- class="pf-c-form__group-control"
279
- >
280
- <div
281
- class="pf-c-form__actions"
282
- >
283
- <button
284
- aria-disabled="false"
285
- class="pf-c-button pf-m-primary pf-m-block"
286
- data-ouia-component-id="OUIA-Generated-Button-primary-3"
287
- data-ouia-component-type="PF4/Button"
288
- data-ouia-safe="true"
289
- type="submit"
290
- >
291
- Log In
292
- </button>
293
- </div>
294
- </div>
295
- </div>
296
- </form>
297
- </div>
298
- `;
5
+ exports[`LoginForm LoginForm with show password 1`] = `"<form novalidate=\\"\\" data-testid=\\"form-test-id\\" class=\\"pf-c-form\\"><p class=\\"pf-c-form__helper-text pf-m-hidden\\"></p><div class=\\"pf-c-form__group\\"><div class=\\"pf-c-form__group-label\\"><label class=\\"pf-c-form__label\\" for=\\"pf-login-username-id\\"><span class=\\"pf-c-form__label-text\\">Username</span><span class=\\"pf-c-form__label-required\\" aria-hidden=\\"true\\"> *</span></label> </div><div class=\\"pf-c-form__group-control\\"><input id=\\"pf-login-username-id\\" name=\\"pf-login-username-id\\" class=\\"pf-c-form-control\\" type=\\"text\\" aria-invalid=\\"false\\" required=\\"\\" data-ouia-component-type=\\"PF4/TextInput\\" data-ouia-safe=\\"true\\" data-ouia-component-id=\\"OUIA-Generated-TextInputBase-11\\" value=\\"\\"></div></div><div class=\\"pf-c-form__group\\"><div class=\\"pf-c-form__group-label\\"><label class=\\"pf-c-form__label\\" for=\\"pf-login-password-id\\"><span class=\\"pf-c-form__label-text\\">Password</span><span class=\\"pf-c-form__label-required\\" aria-hidden=\\"true\\"> *</span></label> </div><div class=\\"pf-c-form__group-control\\"><div class=\\"pf-c-input-group\\"><input id=\\"pf-login-password-id\\" name=\\"pf-login-password-id\\" class=\\"pf-c-form-control\\" type=\\"password\\" aria-invalid=\\"false\\" required=\\"\\" data-ouia-component-type=\\"PF4/TextInput\\" data-ouia-safe=\\"true\\" data-ouia-component-id=\\"OUIA-Generated-TextInputBase-12\\" value=\\"\\"><button aria-disabled=\\"false\\" aria-label=\\"Show password\\" class=\\"pf-c-button pf-m-control\\" type=\\"button\\" data-ouia-component-type=\\"PF4/Button\\" data-ouia-safe=\\"true\\" data-ouia-component-id=\\"OUIA-Generated-Button-control-1\\"><svg style=\\"vertical-align: -0.125em;\\" fill=\\"currentColor\\" height=\\"1em\\" width=\\"1em\\" viewBox=\\"0 0 576 512\\" aria-hidden=\\"true\\" role=\\"img\\"><path d=\\"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z\\"></path></svg></button></div></div></div><div class=\\"pf-c-form__group pf-m-action\\"><div class=\\"pf-c-form__group-control\\"><div class=\\"pf-c-form__actions\\"><button aria-disabled=\\"false\\" class=\\"pf-c-button pf-m-primary pf-m-block\\" type=\\"submit\\" data-ouia-component-type=\\"PF4/Button\\" data-ouia-safe=\\"true\\" data-ouia-component-id=\\"OUIA-Generated-Button-primary-6\\">Log In</button></div></div></div></form>"`;
299
6
 
300
- exports[`should render Login form 1`] = `
301
- <div>
302
- <form
303
- class="pf-c-form"
304
- novalidate=""
305
- >
306
- <p
307
- class="pf-c-form__helper-text pf-m-hidden"
308
- />
309
- <div
310
- class="pf-c-form__group"
311
- >
312
- <div
313
- class="pf-c-form__group-label"
314
- >
315
- <label
316
- class="pf-c-form__label"
317
- for="pf-login-username-id"
318
- >
319
- <span
320
- class="pf-c-form__label-text"
321
- >
322
- Username
323
- </span>
324
- <span
325
- aria-hidden="true"
326
- class="pf-c-form__label-required"
327
- >
328
-
329
- *
330
- </span>
331
- </label>
332
-
333
- </div>
334
- <div
335
- class="pf-c-form__group-control"
336
- >
337
- <input
338
- aria-invalid="false"
339
- class="pf-c-form-control"
340
- data-ouia-component-id="OUIA-Generated-TextInputBase-1"
341
- data-ouia-component-type="PF4/TextInput"
342
- data-ouia-safe="true"
343
- id="pf-login-username-id"
344
- name="pf-login-username-id"
345
- required=""
346
- type="text"
347
- value=""
348
- />
349
-
350
- </div>
351
- </div>
352
- <div
353
- class="pf-c-form__group"
354
- >
355
- <div
356
- class="pf-c-form__group-label"
357
- >
358
- <label
359
- class="pf-c-form__label"
360
- for="pf-login-password-id"
361
- >
362
- <span
363
- class="pf-c-form__label-text"
364
- >
365
- Password
366
- </span>
367
- <span
368
- aria-hidden="true"
369
- class="pf-c-form__label-required"
370
- >
371
-
372
- *
373
- </span>
374
- </label>
375
-
376
- </div>
377
- <div
378
- class="pf-c-form__group-control"
379
- >
380
- <input
381
- aria-invalid="false"
382
- class="pf-c-form-control"
383
- data-ouia-component-id="OUIA-Generated-TextInputBase-2"
384
- data-ouia-component-type="PF4/TextInput"
385
- data-ouia-safe="true"
386
- id="pf-login-password-id"
387
- name="pf-login-password-id"
388
- required=""
389
- type="password"
390
- value=""
391
- />
392
-
393
- </div>
394
- </div>
395
- <div
396
- class="pf-c-form__group pf-m-action"
397
- >
398
- <div
399
- class="pf-c-form__group-control"
400
- >
401
- <div
402
- class="pf-c-form__actions"
403
- >
404
- <button
405
- aria-disabled="false"
406
- class="pf-c-button pf-m-primary pf-m-block"
407
- data-ouia-component-id="OUIA-Generated-Button-primary-1"
408
- data-ouia-component-type="PF4/Button"
409
- data-ouia-safe="true"
410
- type="submit"
411
- >
412
- Log In
413
- </button>
414
- </div>
415
- </div>
416
- </div>
417
- </form>
418
- </div>
419
- `;
7
+ exports[`LoginForm should render Login form 1`] = `"<form novalidate=\\"\\" data-testid=\\"form-test-id\\" class=\\"pf-c-form\\"><p class=\\"pf-c-form__helper-text pf-m-hidden\\"></p><div class=\\"pf-c-form__group\\"><div class=\\"pf-c-form__group-label\\"><label class=\\"pf-c-form__label\\" for=\\"pf-login-username-id\\"><span class=\\"pf-c-form__label-text\\">Username</span><span class=\\"pf-c-form__label-required\\" aria-hidden=\\"true\\"> *</span></label> </div><div class=\\"pf-c-form__group-control\\"><input id=\\"pf-login-username-id\\" name=\\"pf-login-username-id\\" class=\\"pf-c-form-control\\" type=\\"text\\" aria-invalid=\\"false\\" required=\\"\\" data-ouia-component-type=\\"PF4/TextInput\\" data-ouia-safe=\\"true\\" data-ouia-component-id=\\"OUIA-Generated-TextInputBase-1\\" value=\\"\\"></div></div><div class=\\"pf-c-form__group\\"><div class=\\"pf-c-form__group-label\\"><label class=\\"pf-c-form__label\\" for=\\"pf-login-password-id\\"><span class=\\"pf-c-form__label-text\\">Password</span><span class=\\"pf-c-form__label-required\\" aria-hidden=\\"true\\"> *</span></label> </div><div class=\\"pf-c-form__group-control\\"><input id=\\"pf-login-password-id\\" name=\\"pf-login-password-id\\" class=\\"pf-c-form-control\\" type=\\"password\\" aria-invalid=\\"false\\" required=\\"\\" data-ouia-component-type=\\"PF4/TextInput\\" data-ouia-safe=\\"true\\" data-ouia-component-id=\\"OUIA-Generated-TextInputBase-2\\" value=\\"\\"></div></div><div class=\\"pf-c-form__group pf-m-action\\"><div class=\\"pf-c-form__group-control\\"><div class=\\"pf-c-form__actions\\"><button aria-disabled=\\"false\\" class=\\"pf-c-button pf-m-primary pf-m-block\\" type=\\"submit\\" data-ouia-component-type=\\"PF4/Button\\" data-ouia-safe=\\"true\\" data-ouia-component-id=\\"OUIA-Generated-Button-primary-1\\">Log In</button></div></div></div></form>"`;
@@ -1,11 +1,5 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`className is added to the root element 1`] = `"pf-c-login__main-body extra-class"`;
3
+ exports[`LoginMainBody className is added to the root element 1`] = `"<div class=\\"pf-c-login__main-body extra-class\\" data-testid=\\"test-id\\"></div>"`;
4
4
 
5
- exports[`renders with PatternFly Core styles 1`] = `
6
- <div>
7
- <div
8
- class="pf-c-login__main-body"
9
- />
10
- </div>
11
- `;
5
+ exports[`LoginMainBody renders with PatternFly Core styles 1`] = `"<div class=\\"pf-c-login__main-body\\" data-testid=\\"test-id\\"></div>"`;
@@ -1,11 +1,5 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`className is added to the root element 1`] = `"pf-c-login__main-footer extra-class"`;
3
+ exports[`LoginMainFooter className is added to the root element 1`] = `"<div class=\\"pf-c-login__main-footer extra-class\\" data-testid=\\"test-id\\"></div>"`;
4
4
 
5
- exports[`renders with PatternFly Core styles 1`] = `
6
- <div>
7
- <div
8
- class="pf-c-login__main-footer"
9
- />
10
- </div>
11
- `;
5
+ exports[`LoginMainFooter renders with PatternFly Core styles 1`] = `"<div class=\\"pf-c-login__main-footer\\" data-testid=\\"test-id\\"></div>"`;
@@ -1,23 +1,9 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`LoginFooterItem with custom node 1`] = `
4
- <div>
5
- <p
6
- class="pf-c-login__main-footer-band-item"
7
- >
8
- <div>
9
- My custom node
10
- </div>
11
- </p>
12
- </div>
13
- `;
14
-
15
- exports[`className is added to the root element 1`] = `"pf-c-login__main-footer-band-item extra-class"`;
16
-
17
- exports[`renders with PatternFly Core styles 1`] = `
18
- <div>
3
+ exports[`LoginMainFooterBandItem renders with PatternFly Core styles 1`] = `
4
+ <DocumentFragment>
19
5
  <p
20
6
  class="pf-c-login__main-footer-band-item"
21
7
  />
22
- </div>
8
+ </DocumentFragment>
23
9
  `;
@@ -1,35 +1,7 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`LoginFooterItem with custom node 1`] = `
4
- <div>
5
- <li
6
- class="pf-c-login__main-footer-links-item"
7
- >
8
- <a
9
- class="pf-c-login__main-footer-links-item-link"
10
- href=""
11
- target=""
12
- >
13
- <div>
14
- My custom node
15
- </div>
16
- </a>
17
- </li>
18
- </div>
19
- `;
3
+ exports[`LoginMainFooterLinksItem className is added to the root element 1`] = `"<li class=\\"pf-c-login__main-footer-links-item extra-class\\"><a class=\\"pf-c-login__main-footer-links-item-link\\" href=\\"\\" target=\\"\\"></a></li>"`;
20
4
 
21
- exports[`className is added to the root element 1`] = `"pf-c-login__main-footer-links-item extra-class"`;
5
+ exports[`LoginMainFooterLinksItem renders with PatternFly Core styles 1`] = `"<li class=\\"pf-c-login__main-footer-links-item\\"><a class=\\"pf-c-login__main-footer-links-item-link\\" href=\\"#\\" target=\\"\\"></a></li>"`;
22
6
 
23
- exports[`renders with PatternFly Core styles 1`] = `
24
- <div>
25
- <li
26
- class="pf-c-login__main-footer-links-item"
27
- >
28
- <a
29
- class="pf-c-login__main-footer-links-item-link"
30
- href="#"
31
- target=""
32
- />
33
- </li>
34
- </div>
35
- `;
7
+ exports[`LoginMainFooterLinksItem with custom node 1`] = `"<li class=\\"pf-c-login__main-footer-links-item\\"><a class=\\"pf-c-login__main-footer-links-item-link\\" href=\\"\\" target=\\"\\"><div>My custom node</div></a></li>"`;
@@ -1,16 +1,7 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`className is added to the root element 1`] = `"pf-c-login__main-header extra-class"`;
3
+ exports[`LoginMainHeader className is added to the root element 1`] = `"<header class=\\"pf-c-login__main-header extra-class\\" data-testid=\\"test-id\\"></header>"`;
4
4
 
5
- exports[`renders with PatternFly Core styles 1`] = `
6
- <div>
7
- <header
8
- class="pf-c-login__main-header"
9
- >
10
-
11
-
12
- </header>
13
- </div>
14
- `;
5
+ exports[`LoginMainHeader renders with PatternFly Core styles 1`] = `"<header class=\\"pf-c-login__main-header\\" data-testid=\\"test-id\\"></header>"`;
15
6
 
16
- exports[`title and subtitle are rendered correctly 1`] = `"pf-c-login__main-header"`;
7
+ exports[`LoginMainHeader title and subtitle are rendered correctly 1`] = `"<header class=\\"pf-c-login__main-header\\" data-testid=\\"test-id\\"><h2 data-ouia-component-type=\\"PF4/Title\\" data-ouia-safe=\\"true\\" data-ouia-component-id=\\"OUIA-Generated-Title-1\\" class=\\"pf-c-title pf-m-3xl\\">Log in to your account</h2><p class=\\"pf-c-login__main-header-desc\\">Use LDAP credentials</p></header>"`;
@@ -206,7 +206,7 @@ export class TextInputBase extends React.Component<TextInputProps, TextInputStat
206
206
  )}
207
207
  onChange={this.handleChange}
208
208
  type={type}
209
- value={value}
209
+ value={this.sanitizeInputValue(value)}
210
210
  aria-invalid={props['aria-invalid'] ? props['aria-invalid'] : validated === ValidatedOptions.error}
211
211
  required={isRequired}
212
212
  disabled={isDisabled}
@@ -217,6 +217,9 @@ export class TextInputBase extends React.Component<TextInputProps, TextInputStat
217
217
  />
218
218
  );
219
219
  }
220
+
221
+ private sanitizeInputValue = (value: string | number) =>
222
+ typeof value === 'string' ? value.replace(/\n/g, ' ') : value;
220
223
  }
221
224
 
222
225
  export const TextInput = React.forwardRef((props: TextInputProps, ref: React.Ref<HTMLInputElement>) => (