@patternfly/react-core 4.169.1 → 4.170.0

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 (83) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/esm/components/FileUpload/FileUpload.d.ts +11 -3
  3. package/dist/esm/components/FileUpload/FileUpload.d.ts.map +1 -1
  4. package/dist/esm/components/FileUpload/FileUpload.js +28 -5
  5. package/dist/esm/components/FileUpload/FileUpload.js.map +1 -1
  6. package/dist/esm/components/FileUpload/FileUploadField.d.ts +2 -0
  7. package/dist/esm/components/FileUpload/FileUploadField.d.ts.map +1 -1
  8. package/dist/esm/components/FileUpload/FileUploadField.js +2 -1
  9. package/dist/esm/components/FileUpload/FileUploadField.js.map +1 -1
  10. package/dist/esm/components/Pagination/OptionsToggle.d.ts +2 -0
  11. package/dist/esm/components/Pagination/OptionsToggle.d.ts.map +1 -1
  12. package/dist/esm/components/Pagination/OptionsToggle.js +2 -2
  13. package/dist/esm/components/Pagination/OptionsToggle.js.map +1 -1
  14. package/dist/esm/components/Pagination/Pagination.d.ts.map +1 -1
  15. package/dist/esm/components/Pagination/Pagination.js +1 -1
  16. package/dist/esm/components/Pagination/Pagination.js.map +1 -1
  17. package/dist/esm/components/Pagination/PaginationOptionsMenu.d.ts +2 -0
  18. package/dist/esm/components/Pagination/PaginationOptionsMenu.d.ts.map +1 -1
  19. package/dist/esm/components/Pagination/PaginationOptionsMenu.js +15 -12
  20. package/dist/esm/components/Pagination/PaginationOptionsMenu.js.map +1 -1
  21. package/dist/esm/components/Popover/Popover.d.ts +2 -0
  22. package/dist/esm/components/Popover/Popover.d.ts.map +1 -1
  23. package/dist/esm/components/Popover/Popover.js +5 -3
  24. package/dist/esm/components/Popover/Popover.js.map +1 -1
  25. package/dist/esm/components/Popover/PopoverContext.d.ts +7 -0
  26. package/dist/esm/components/Popover/PopoverContext.d.ts.map +1 -0
  27. package/dist/esm/components/Popover/PopoverContext.js +3 -0
  28. package/dist/esm/components/Popover/PopoverContext.js.map +1 -0
  29. package/dist/esm/components/Popover/PopoverHeader.d.ts.map +1 -1
  30. package/dist/esm/components/Popover/PopoverHeader.js +2 -1
  31. package/dist/esm/components/Popover/PopoverHeader.js.map +1 -1
  32. package/dist/js/components/FileUpload/FileUpload.d.ts +11 -3
  33. package/dist/js/components/FileUpload/FileUpload.d.ts.map +1 -1
  34. package/dist/js/components/FileUpload/FileUpload.js +27 -4
  35. package/dist/js/components/FileUpload/FileUpload.js.map +1 -1
  36. package/dist/js/components/FileUpload/FileUploadField.d.ts +2 -0
  37. package/dist/js/components/FileUpload/FileUploadField.d.ts.map +1 -1
  38. package/dist/js/components/FileUpload/FileUploadField.js +2 -1
  39. package/dist/js/components/FileUpload/FileUploadField.js.map +1 -1
  40. package/dist/js/components/Pagination/OptionsToggle.d.ts +2 -0
  41. package/dist/js/components/Pagination/OptionsToggle.d.ts.map +1 -1
  42. package/dist/js/components/Pagination/OptionsToggle.js +2 -2
  43. package/dist/js/components/Pagination/OptionsToggle.js.map +1 -1
  44. package/dist/js/components/Pagination/Pagination.d.ts.map +1 -1
  45. package/dist/js/components/Pagination/Pagination.js +1 -1
  46. package/dist/js/components/Pagination/Pagination.js.map +1 -1
  47. package/dist/js/components/Pagination/PaginationOptionsMenu.d.ts +2 -0
  48. package/dist/js/components/Pagination/PaginationOptionsMenu.d.ts.map +1 -1
  49. package/dist/js/components/Pagination/PaginationOptionsMenu.js +15 -12
  50. package/dist/js/components/Pagination/PaginationOptionsMenu.js.map +1 -1
  51. package/dist/js/components/Popover/Popover.d.ts +2 -0
  52. package/dist/js/components/Popover/Popover.d.ts.map +1 -1
  53. package/dist/js/components/Popover/Popover.js +5 -3
  54. package/dist/js/components/Popover/Popover.js.map +1 -1
  55. package/dist/js/components/Popover/PopoverContext.d.ts +7 -0
  56. package/dist/js/components/Popover/PopoverContext.d.ts.map +1 -0
  57. package/dist/js/components/Popover/PopoverContext.js +7 -0
  58. package/dist/js/components/Popover/PopoverContext.js.map +1 -0
  59. package/dist/js/components/Popover/PopoverHeader.d.ts.map +1 -1
  60. package/dist/js/components/Popover/PopoverHeader.js +2 -1
  61. package/dist/js/components/Popover/PopoverHeader.js.map +1 -1
  62. package/dist/umd/react-core.css +59 -39
  63. package/dist/umd/react-core.js +1599 -1309
  64. package/dist/umd/react-core.min.css +47 -27
  65. package/dist/umd/react-core.min.js +5 -6
  66. package/package.json +7 -7
  67. package/src/components/FileUpload/FileUpload.tsx +77 -30
  68. package/src/components/FileUpload/FileUploadField.tsx +5 -0
  69. package/src/components/FileUpload/__tests__/__snapshots__/FileUpload.test.tsx.snap +3 -7
  70. package/src/components/FileUpload/examples/FileUpload.md +54 -17
  71. package/src/components/Modal/examples/Modal.md +203 -0
  72. package/src/components/Pagination/OptionsToggle.tsx +5 -1
  73. package/src/components/Pagination/Pagination.tsx +1 -0
  74. package/src/components/Pagination/PaginationOptionsMenu.tsx +18 -10
  75. package/src/components/Pagination/__tests__/Generated/__snapshots__/Pagination.test.tsx.snap +1 -0
  76. package/src/components/Pagination/__tests__/Generated/__snapshots__/PaginationOptionsMenu.test.tsx.snap +1 -0
  77. package/src/components/Pagination/__tests__/__snapshots__/Pagination.test.tsx.snap +62 -0
  78. package/src/components/Popover/Popover.tsx +24 -18
  79. package/src/components/Popover/PopoverContext.tsx +7 -0
  80. package/src/components/Popover/PopoverHeader.tsx +8 -3
  81. package/src/components/Popover/__tests__/Generated/__snapshots__/Popover.test.tsx.snap +91 -83
  82. package/src/components/Popover/__tests__/Generated/__snapshots__/PopoverHeader.test.tsx.snap +3 -9
  83. package/src/components/Popover/__tests__/__snapshots__/Popover.test.tsx.snap +406 -374
@@ -1,410 +1,442 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`popover can close from content (uncontrolled) 1`] = `
4
- <Popper
5
- appendTo={[Function]}
6
- distance={25}
7
- enableFlip={true}
8
- flipBehavior={
9
- Array [
10
- "top",
11
- "right",
12
- "bottom",
13
- "left",
14
- "top",
15
- "right",
16
- "bottom",
17
- ]
4
+ <ContextProvider
5
+ value={
6
+ Object {
7
+ "headerComponent": "h6",
8
+ }
18
9
  }
19
- isVisible={false}
20
- onDocumentClick={[Function]}
21
- onDocumentKeyDown={[Function]}
22
- onTriggerClick={[Function]}
23
- onTriggerEnter={[Function]}
24
- placement="top"
25
- popper={
26
- <FocusTrap
27
- active={false}
28
- aria-describedby="popover-test-body"
29
- aria-labelledby="popover-test-header"
30
- aria-modal="true"
31
- className="pf-c-popover"
32
- focusTrapOptions={
33
- Object {
34
- "clickOutsideDeactivates": true,
35
- "fallbackFocus": [Function],
36
- "returnFocusOnDeactivate": true,
10
+ >
11
+ <Popper
12
+ appendTo={[Function]}
13
+ distance={25}
14
+ enableFlip={true}
15
+ flipBehavior={
16
+ Array [
17
+ "top",
18
+ "right",
19
+ "bottom",
20
+ "left",
21
+ "top",
22
+ "right",
23
+ "bottom",
24
+ ]
25
+ }
26
+ isVisible={false}
27
+ onDocumentClick={[Function]}
28
+ onDocumentKeyDown={[Function]}
29
+ onTriggerClick={[Function]}
30
+ onTriggerEnter={[Function]}
31
+ placement="top"
32
+ popper={
33
+ <FocusTrap
34
+ active={false}
35
+ aria-describedby="popover-test-body"
36
+ aria-labelledby="popover-test-header"
37
+ aria-modal="true"
38
+ className="pf-c-popover"
39
+ focusTrapOptions={
40
+ Object {
41
+ "clickOutsideDeactivates": true,
42
+ "fallbackFocus": [Function],
43
+ "returnFocusOnDeactivate": true,
44
+ }
37
45
  }
38
- }
39
- onMouseDown={[Function]}
40
- paused={false}
41
- preventScrollOnDeactivate={true}
42
- role="dialog"
43
- style={
44
- Object {
45
- "maxWidth": null,
46
- "minWidth": null,
47
- "opacity": 0,
48
- "transition": "opacity 300ms cubic-bezier(.54, 1.5, .38, 1.11)",
46
+ onMouseDown={[Function]}
47
+ paused={false}
48
+ preventScrollOnDeactivate={true}
49
+ role="dialog"
50
+ style={
51
+ Object {
52
+ "maxWidth": null,
53
+ "minWidth": null,
54
+ "opacity": 0,
55
+ "transition": "opacity 300ms cubic-bezier(.54, 1.5, .38, 1.11)",
56
+ }
49
57
  }
50
- }
51
- >
52
- <PopoverArrow />
53
- <PopoverContent>
54
- <PopoverCloseButton
55
- aria-label="Close"
56
- onClose={[Function]}
57
- />
58
- <PopoverHeader
59
- id="popover-test-header"
60
- >
61
- <div>
62
- Popover header
63
- </div>
64
- </PopoverHeader>
65
- <PopoverBody
66
- id="popover-test-body"
67
- >
68
- <div>
58
+ >
59
+ <PopoverArrow />
60
+ <PopoverContent>
61
+ <PopoverCloseButton
62
+ aria-label="Close"
63
+ onClose={[Function]}
64
+ />
65
+ <PopoverHeader
66
+ id="popover-test-header"
67
+ >
69
68
  <div>
70
- All the content props (headerContent, bodyContent, footerContent) can take a function which the Popover component passes the hide function to which can be used to close the Popover after some user interaction.
69
+ Popover header
71
70
  </div>
71
+ </PopoverHeader>
72
+ <PopoverBody
73
+ id="popover-test-body"
74
+ >
72
75
  <div>
73
- <button
74
- id="uncontrolled-close"
75
- onClick={[Function]}
76
- >
77
- Close popover
78
- </button>
76
+ <div>
77
+ All the content props (headerContent, bodyContent, footerContent) can take a function which the Popover component passes the hide function to which can be used to close the Popover after some user interaction.
78
+ </div>
79
+ <div>
80
+ <button
81
+ id="uncontrolled-close"
82
+ onClick={[Function]}
83
+ >
84
+ Close popover
85
+ </button>
86
+ </div>
79
87
  </div>
80
- </div>
81
- </PopoverBody>
82
- <PopoverFooter
83
- id="popover-test-footer"
84
- >
85
- Popover footer
86
- </PopoverFooter>
87
- </PopoverContent>
88
- </FocusTrap>
89
- }
90
- popperMatchesTriggerWidth={false}
91
- positionModifiers={
92
- Object {
93
- "bottom": "pf-m-bottom",
94
- "bottom-end": "pf-m-bottom-right",
95
- "bottom-start": "pf-m-bottom-left",
96
- "left": "pf-m-left",
97
- "left-end": "pf-m-left-bottom",
98
- "left-start": "pf-m-left-top",
99
- "right": "pf-m-right",
100
- "right-end": "pf-m-right-bottom",
101
- "right-start": "pf-m-right-top",
102
- "top": "pf-m-top",
103
- "top-end": "pf-m-top-right",
104
- "top-start": "pf-m-top-left",
88
+ </PopoverBody>
89
+ <PopoverFooter
90
+ id="popover-test-footer"
91
+ >
92
+ Popover footer
93
+ </PopoverFooter>
94
+ </PopoverContent>
95
+ </FocusTrap>
105
96
  }
106
- }
107
- trigger={
108
- <button
109
- id="uncontrolled-toggle"
110
- >
111
- Toggle Popover
112
- </button>
113
- }
114
- zIndex={9999}
115
- />
97
+ popperMatchesTriggerWidth={false}
98
+ positionModifiers={
99
+ Object {
100
+ "bottom": "pf-m-bottom",
101
+ "bottom-end": "pf-m-bottom-right",
102
+ "bottom-start": "pf-m-bottom-left",
103
+ "left": "pf-m-left",
104
+ "left-end": "pf-m-left-bottom",
105
+ "left-start": "pf-m-left-top",
106
+ "right": "pf-m-right",
107
+ "right-end": "pf-m-right-bottom",
108
+ "right-start": "pf-m-right-top",
109
+ "top": "pf-m-top",
110
+ "top-end": "pf-m-top-right",
111
+ "top-start": "pf-m-top-left",
112
+ }
113
+ }
114
+ trigger={
115
+ <button
116
+ id="uncontrolled-toggle"
117
+ >
118
+ Toggle Popover
119
+ </button>
120
+ }
121
+ zIndex={9999}
122
+ />
123
+ </ContextProvider>
116
124
  `;
117
125
 
118
126
  exports[`popover can have a custom minimum width 1`] = `
119
- <Popper
120
- appendTo={[Function]}
121
- distance={25}
122
- enableFlip={true}
123
- flipBehavior={
124
- Array [
125
- "top",
126
- "right",
127
- "bottom",
128
- "left",
129
- "top",
130
- "right",
131
- "bottom",
132
- ]
127
+ <ContextProvider
128
+ value={
129
+ Object {
130
+ "headerComponent": "h6",
131
+ }
133
132
  }
134
- isVisible={false}
135
- onDocumentClick={[Function]}
136
- onDocumentKeyDown={[Function]}
137
- onTriggerClick={[Function]}
138
- onTriggerEnter={[Function]}
139
- placement="top"
140
- popper={
141
- <FocusTrap
142
- active={false}
143
- aria-describedby="popover-test-body"
144
- aria-labelledby="popover-test-header"
145
- aria-modal="true"
146
- className="pf-c-popover"
147
- focusTrapOptions={
148
- Object {
149
- "clickOutsideDeactivates": true,
150
- "fallbackFocus": [Function],
151
- "returnFocusOnDeactivate": true,
133
+ >
134
+ <Popper
135
+ appendTo={[Function]}
136
+ distance={25}
137
+ enableFlip={true}
138
+ flipBehavior={
139
+ Array [
140
+ "top",
141
+ "right",
142
+ "bottom",
143
+ "left",
144
+ "top",
145
+ "right",
146
+ "bottom",
147
+ ]
148
+ }
149
+ isVisible={false}
150
+ onDocumentClick={[Function]}
151
+ onDocumentKeyDown={[Function]}
152
+ onTriggerClick={[Function]}
153
+ onTriggerEnter={[Function]}
154
+ placement="top"
155
+ popper={
156
+ <FocusTrap
157
+ active={false}
158
+ aria-describedby="popover-test-body"
159
+ aria-labelledby="popover-test-header"
160
+ aria-modal="true"
161
+ className="pf-c-popover"
162
+ focusTrapOptions={
163
+ Object {
164
+ "clickOutsideDeactivates": true,
165
+ "fallbackFocus": [Function],
166
+ "returnFocusOnDeactivate": true,
167
+ }
152
168
  }
153
- }
154
- onMouseDown={[Function]}
155
- paused={false}
156
- preventScrollOnDeactivate={true}
157
- role="dialog"
158
- style={
159
- Object {
160
- "maxWidth": null,
161
- "minWidth": "600px",
162
- "opacity": 0,
163
- "transition": "opacity 300ms cubic-bezier(.54, 1.5, .38, 1.11)",
169
+ onMouseDown={[Function]}
170
+ paused={false}
171
+ preventScrollOnDeactivate={true}
172
+ role="dialog"
173
+ style={
174
+ Object {
175
+ "maxWidth": null,
176
+ "minWidth": "600px",
177
+ "opacity": 0,
178
+ "transition": "opacity 300ms cubic-bezier(.54, 1.5, .38, 1.11)",
179
+ }
164
180
  }
181
+ >
182
+ <PopoverArrow />
183
+ <PopoverContent>
184
+ <PopoverCloseButton
185
+ aria-label="Close"
186
+ onClose={[Function]}
187
+ />
188
+ <PopoverHeader
189
+ id="popover-test-header"
190
+ >
191
+ <div>
192
+ Popover Header
193
+ </div>
194
+ </PopoverHeader>
195
+ <PopoverBody
196
+ id="popover-test-body"
197
+ >
198
+ <div>
199
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam id feugiat augue, nec fringilla turpis.
200
+ </div>
201
+ </PopoverBody>
202
+ </PopoverContent>
203
+ </FocusTrap>
204
+ }
205
+ popperMatchesTriggerWidth={false}
206
+ positionModifiers={
207
+ Object {
208
+ "bottom": "pf-m-bottom",
209
+ "bottom-end": "pf-m-bottom-right",
210
+ "bottom-start": "pf-m-bottom-left",
211
+ "left": "pf-m-left",
212
+ "left-end": "pf-m-left-bottom",
213
+ "left-start": "pf-m-left-top",
214
+ "right": "pf-m-right",
215
+ "right-end": "pf-m-right-bottom",
216
+ "right-start": "pf-m-right-top",
217
+ "top": "pf-m-top",
218
+ "top-end": "pf-m-top-right",
219
+ "top-start": "pf-m-top-left",
165
220
  }
166
- >
167
- <PopoverArrow />
168
- <PopoverContent>
169
- <PopoverCloseButton
170
- aria-label="Close"
171
- onClose={[Function]}
172
- />
173
- <PopoverHeader
174
- id="popover-test-header"
175
- >
176
- <div>
177
- Popover Header
178
- </div>
179
- </PopoverHeader>
180
- <PopoverBody
181
- id="popover-test-body"
182
- >
183
- <div>
184
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam id feugiat augue, nec fringilla turpis.
185
- </div>
186
- </PopoverBody>
187
- </PopoverContent>
188
- </FocusTrap>
189
- }
190
- popperMatchesTriggerWidth={false}
191
- positionModifiers={
192
- Object {
193
- "bottom": "pf-m-bottom",
194
- "bottom-end": "pf-m-bottom-right",
195
- "bottom-start": "pf-m-bottom-left",
196
- "left": "pf-m-left",
197
- "left-end": "pf-m-left-bottom",
198
- "left-start": "pf-m-left-top",
199
- "right": "pf-m-right",
200
- "right-end": "pf-m-right-bottom",
201
- "right-start": "pf-m-right-top",
202
- "top": "pf-m-top",
203
- "top-end": "pf-m-top-right",
204
- "top-start": "pf-m-top-left",
205
221
  }
206
- }
207
- trigger={
208
- <div>
209
- Toggle Popover
210
- </div>
211
- }
212
- zIndex={9999}
213
- />
222
+ trigger={
223
+ <div>
224
+ Toggle Popover
225
+ </div>
226
+ }
227
+ zIndex={9999}
228
+ />
229
+ </ContextProvider>
214
230
  `;
215
231
 
216
232
  exports[`popover can specify position as object value 1`] = `
217
- <Popper
218
- appendTo={[Function]}
219
- distance={25}
220
- enableFlip={true}
221
- flipBehavior={
222
- Array [
223
- "top",
224
- "right",
225
- "bottom",
226
- "left",
227
- "top",
228
- "right",
229
- "bottom",
230
- ]
233
+ <ContextProvider
234
+ value={
235
+ Object {
236
+ "headerComponent": "h6",
237
+ }
231
238
  }
232
- isVisible={false}
233
- onDocumentClick={[Function]}
234
- onDocumentKeyDown={[Function]}
235
- onTriggerClick={[Function]}
236
- onTriggerEnter={[Function]}
237
- placement="right"
238
- popper={
239
- <FocusTrap
240
- active={false}
241
- aria-describedby="popover-test-body"
242
- aria-labelledby="popover-test-header"
243
- aria-modal="true"
244
- className="pf-c-popover"
245
- focusTrapOptions={
246
- Object {
247
- "clickOutsideDeactivates": true,
248
- "fallbackFocus": [Function],
249
- "returnFocusOnDeactivate": true,
239
+ >
240
+ <Popper
241
+ appendTo={[Function]}
242
+ distance={25}
243
+ enableFlip={true}
244
+ flipBehavior={
245
+ Array [
246
+ "top",
247
+ "right",
248
+ "bottom",
249
+ "left",
250
+ "top",
251
+ "right",
252
+ "bottom",
253
+ ]
254
+ }
255
+ isVisible={false}
256
+ onDocumentClick={[Function]}
257
+ onDocumentKeyDown={[Function]}
258
+ onTriggerClick={[Function]}
259
+ onTriggerEnter={[Function]}
260
+ placement="right"
261
+ popper={
262
+ <FocusTrap
263
+ active={false}
264
+ aria-describedby="popover-test-body"
265
+ aria-labelledby="popover-test-header"
266
+ aria-modal="true"
267
+ className="pf-c-popover"
268
+ focusTrapOptions={
269
+ Object {
270
+ "clickOutsideDeactivates": true,
271
+ "fallbackFocus": [Function],
272
+ "returnFocusOnDeactivate": true,
273
+ }
250
274
  }
251
- }
252
- onMouseDown={[Function]}
253
- paused={false}
254
- preventScrollOnDeactivate={true}
255
- role="dialog"
256
- style={
257
- Object {
258
- "maxWidth": null,
259
- "minWidth": null,
260
- "opacity": 0,
261
- "transition": "opacity 300ms cubic-bezier(.54, 1.5, .38, 1.11)",
275
+ onMouseDown={[Function]}
276
+ paused={false}
277
+ preventScrollOnDeactivate={true}
278
+ role="dialog"
279
+ style={
280
+ Object {
281
+ "maxWidth": null,
282
+ "minWidth": null,
283
+ "opacity": 0,
284
+ "transition": "opacity 300ms cubic-bezier(.54, 1.5, .38, 1.11)",
285
+ }
262
286
  }
287
+ >
288
+ <PopoverArrow />
289
+ <PopoverContent>
290
+ <PopoverCloseButton
291
+ aria-label="Close"
292
+ onClose={[Function]}
293
+ />
294
+ <PopoverHeader
295
+ id="popover-test-header"
296
+ >
297
+ <div>
298
+ Popover Header
299
+ </div>
300
+ </PopoverHeader>
301
+ <PopoverBody
302
+ id="popover-test-body"
303
+ >
304
+ <div>
305
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam id feugiat augue, nec fringilla turpis.
306
+ </div>
307
+ </PopoverBody>
308
+ </PopoverContent>
309
+ </FocusTrap>
310
+ }
311
+ popperMatchesTriggerWidth={false}
312
+ positionModifiers={
313
+ Object {
314
+ "bottom": "pf-m-bottom",
315
+ "bottom-end": "pf-m-bottom-right",
316
+ "bottom-start": "pf-m-bottom-left",
317
+ "left": "pf-m-left",
318
+ "left-end": "pf-m-left-bottom",
319
+ "left-start": "pf-m-left-top",
320
+ "right": "pf-m-right",
321
+ "right-end": "pf-m-right-bottom",
322
+ "right-start": "pf-m-right-top",
323
+ "top": "pf-m-top",
324
+ "top-end": "pf-m-top-right",
325
+ "top-start": "pf-m-top-left",
263
326
  }
264
- >
265
- <PopoverArrow />
266
- <PopoverContent>
267
- <PopoverCloseButton
268
- aria-label="Close"
269
- onClose={[Function]}
270
- />
271
- <PopoverHeader
272
- id="popover-test-header"
273
- >
274
- <div>
275
- Popover Header
276
- </div>
277
- </PopoverHeader>
278
- <PopoverBody
279
- id="popover-test-body"
280
- >
281
- <div>
282
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam id feugiat augue, nec fringilla turpis.
283
- </div>
284
- </PopoverBody>
285
- </PopoverContent>
286
- </FocusTrap>
287
- }
288
- popperMatchesTriggerWidth={false}
289
- positionModifiers={
290
- Object {
291
- "bottom": "pf-m-bottom",
292
- "bottom-end": "pf-m-bottom-right",
293
- "bottom-start": "pf-m-bottom-left",
294
- "left": "pf-m-left",
295
- "left-end": "pf-m-left-bottom",
296
- "left-start": "pf-m-left-top",
297
- "right": "pf-m-right",
298
- "right-end": "pf-m-right-bottom",
299
- "right-start": "pf-m-right-top",
300
- "top": "pf-m-top",
301
- "top-end": "pf-m-top-right",
302
- "top-start": "pf-m-top-left",
303
327
  }
304
- }
305
- trigger={
306
- <div>
307
- Toggle Popover
308
- </div>
309
- }
310
- zIndex={9999}
311
- />
328
+ trigger={
329
+ <div>
330
+ Toggle Popover
331
+ </div>
332
+ }
333
+ zIndex={9999}
334
+ />
335
+ </ContextProvider>
312
336
  `;
313
337
 
314
338
  exports[`popover renders close-button, header and body 1`] = `
315
- <Popper
316
- appendTo={[Function]}
317
- distance={25}
318
- enableFlip={true}
319
- flipBehavior={
320
- Array [
321
- "top",
322
- "right",
323
- "bottom",
324
- "left",
325
- "top",
326
- "right",
327
- "bottom",
328
- ]
339
+ <ContextProvider
340
+ value={
341
+ Object {
342
+ "headerComponent": "h6",
343
+ }
329
344
  }
330
- isVisible={false}
331
- onDocumentClick={[Function]}
332
- onDocumentKeyDown={[Function]}
333
- onTriggerClick={[Function]}
334
- onTriggerEnter={[Function]}
335
- placement="top"
336
- popper={
337
- <FocusTrap
338
- active={false}
339
- aria-describedby="popover-test-body"
340
- aria-labelledby="popover-test-header"
341
- aria-modal="true"
342
- className="pf-c-popover"
343
- focusTrapOptions={
344
- Object {
345
- "clickOutsideDeactivates": true,
346
- "fallbackFocus": [Function],
347
- "returnFocusOnDeactivate": true,
345
+ >
346
+ <Popper
347
+ appendTo={[Function]}
348
+ distance={25}
349
+ enableFlip={true}
350
+ flipBehavior={
351
+ Array [
352
+ "top",
353
+ "right",
354
+ "bottom",
355
+ "left",
356
+ "top",
357
+ "right",
358
+ "bottom",
359
+ ]
360
+ }
361
+ isVisible={false}
362
+ onDocumentClick={[Function]}
363
+ onDocumentKeyDown={[Function]}
364
+ onTriggerClick={[Function]}
365
+ onTriggerEnter={[Function]}
366
+ placement="top"
367
+ popper={
368
+ <FocusTrap
369
+ active={false}
370
+ aria-describedby="popover-test-body"
371
+ aria-labelledby="popover-test-header"
372
+ aria-modal="true"
373
+ className="pf-c-popover"
374
+ focusTrapOptions={
375
+ Object {
376
+ "clickOutsideDeactivates": true,
377
+ "fallbackFocus": [Function],
378
+ "returnFocusOnDeactivate": true,
379
+ }
348
380
  }
349
- }
350
- onMouseDown={[Function]}
351
- paused={false}
352
- preventScrollOnDeactivate={true}
353
- role="dialog"
354
- style={
355
- Object {
356
- "maxWidth": null,
357
- "minWidth": null,
358
- "opacity": 0,
359
- "transition": "opacity 300ms cubic-bezier(.54, 1.5, .38, 1.11)",
381
+ onMouseDown={[Function]}
382
+ paused={false}
383
+ preventScrollOnDeactivate={true}
384
+ role="dialog"
385
+ style={
386
+ Object {
387
+ "maxWidth": null,
388
+ "minWidth": null,
389
+ "opacity": 0,
390
+ "transition": "opacity 300ms cubic-bezier(.54, 1.5, .38, 1.11)",
391
+ }
360
392
  }
393
+ >
394
+ <PopoverArrow />
395
+ <PopoverContent>
396
+ <PopoverCloseButton
397
+ aria-label="Close"
398
+ onClose={[Function]}
399
+ />
400
+ <PopoverHeader
401
+ id="popover-test-header"
402
+ >
403
+ <div>
404
+ Popover Header
405
+ </div>
406
+ </PopoverHeader>
407
+ <PopoverBody
408
+ id="popover-test-body"
409
+ >
410
+ <div>
411
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam id feugiat augue, nec fringilla turpis.
412
+ </div>
413
+ </PopoverBody>
414
+ </PopoverContent>
415
+ </FocusTrap>
416
+ }
417
+ popperMatchesTriggerWidth={false}
418
+ positionModifiers={
419
+ Object {
420
+ "bottom": "pf-m-bottom",
421
+ "bottom-end": "pf-m-bottom-right",
422
+ "bottom-start": "pf-m-bottom-left",
423
+ "left": "pf-m-left",
424
+ "left-end": "pf-m-left-bottom",
425
+ "left-start": "pf-m-left-top",
426
+ "right": "pf-m-right",
427
+ "right-end": "pf-m-right-bottom",
428
+ "right-start": "pf-m-right-top",
429
+ "top": "pf-m-top",
430
+ "top-end": "pf-m-top-right",
431
+ "top-start": "pf-m-top-left",
361
432
  }
362
- >
363
- <PopoverArrow />
364
- <PopoverContent>
365
- <PopoverCloseButton
366
- aria-label="Close"
367
- onClose={[Function]}
368
- />
369
- <PopoverHeader
370
- id="popover-test-header"
371
- >
372
- <div>
373
- Popover Header
374
- </div>
375
- </PopoverHeader>
376
- <PopoverBody
377
- id="popover-test-body"
378
- >
379
- <div>
380
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam id feugiat augue, nec fringilla turpis.
381
- </div>
382
- </PopoverBody>
383
- </PopoverContent>
384
- </FocusTrap>
385
- }
386
- popperMatchesTriggerWidth={false}
387
- positionModifiers={
388
- Object {
389
- "bottom": "pf-m-bottom",
390
- "bottom-end": "pf-m-bottom-right",
391
- "bottom-start": "pf-m-bottom-left",
392
- "left": "pf-m-left",
393
- "left-end": "pf-m-left-bottom",
394
- "left-start": "pf-m-left-top",
395
- "right": "pf-m-right",
396
- "right-end": "pf-m-right-bottom",
397
- "right-start": "pf-m-right-top",
398
- "top": "pf-m-top",
399
- "top-end": "pf-m-top-right",
400
- "top-start": "pf-m-top-left",
401
433
  }
402
- }
403
- trigger={
404
- <div>
405
- Toggle Popover
406
- </div>
407
- }
408
- zIndex={9999}
409
- />
434
+ trigger={
435
+ <div>
436
+ Toggle Popover
437
+ </div>
438
+ }
439
+ zIndex={9999}
440
+ />
441
+ </ContextProvider>
410
442
  `;