@patternfly/react-core 4.202.28 → 4.202.31

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 (105) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/esm/components/JumpLinks/JumpLinksItem.d.ts.map +1 -1
  3. package/dist/esm/components/JumpLinks/JumpLinksItem.js +1 -1
  4. package/dist/esm/components/JumpLinks/JumpLinksItem.js.map +1 -1
  5. package/dist/esm/components/ProgressStepper/ProgressStep.d.ts +3 -0
  6. package/dist/esm/components/ProgressStepper/ProgressStep.d.ts.map +1 -1
  7. package/dist/esm/components/ProgressStepper/ProgressStep.js +2 -2
  8. package/dist/esm/components/ProgressStepper/ProgressStep.js.map +1 -1
  9. package/dist/esm/components/Tabs/Tab.d.ts.map +1 -1
  10. package/dist/esm/components/Tabs/Tab.js +2 -2
  11. package/dist/esm/components/Tabs/Tab.js.map +1 -1
  12. package/dist/esm/components/Tabs/Tabs.d.ts +1 -1
  13. package/dist/esm/components/Tabs/Tabs.d.ts.map +1 -1
  14. package/dist/esm/components/Tabs/Tabs.js +1 -1
  15. package/dist/esm/components/Tabs/Tabs.js.map +1 -1
  16. package/dist/esm/helpers/Popper/Popper.d.ts.map +1 -1
  17. package/dist/esm/helpers/Popper/Popper.js +1 -7
  18. package/dist/esm/helpers/Popper/Popper.js.map +1 -1
  19. package/dist/js/components/JumpLinks/JumpLinksItem.d.ts.map +1 -1
  20. package/dist/js/components/JumpLinks/JumpLinksItem.js +1 -1
  21. package/dist/js/components/JumpLinks/JumpLinksItem.js.map +1 -1
  22. package/dist/js/components/ProgressStepper/ProgressStep.d.ts +3 -0
  23. package/dist/js/components/ProgressStepper/ProgressStep.d.ts.map +1 -1
  24. package/dist/js/components/ProgressStepper/ProgressStep.js +2 -2
  25. package/dist/js/components/ProgressStepper/ProgressStep.js.map +1 -1
  26. package/dist/js/components/Tabs/Tab.d.ts.map +1 -1
  27. package/dist/js/components/Tabs/Tab.js +2 -2
  28. package/dist/js/components/Tabs/Tab.js.map +1 -1
  29. package/dist/js/components/Tabs/Tabs.d.ts +1 -1
  30. package/dist/js/components/Tabs/Tabs.d.ts.map +1 -1
  31. package/dist/js/components/Tabs/Tabs.js +1 -1
  32. package/dist/js/components/Tabs/Tabs.js.map +1 -1
  33. package/dist/js/helpers/Popper/Popper.d.ts.map +1 -1
  34. package/dist/js/helpers/Popper/Popper.js +1 -7
  35. package/dist/js/helpers/Popper/Popper.js.map +1 -1
  36. package/dist/umd/react-core.js +7 -13
  37. package/dist/umd/react-core.min.js +1 -1
  38. package/package.json +5 -5
  39. package/src/components/Dropdown/__tests__/DropdownToggleCheckbox.test.tsx +1 -1
  40. package/src/components/ExpandableSection/examples/ExpandableSection.md +1 -1
  41. package/src/components/JumpLinks/JumpLinksItem.tsx +5 -1
  42. package/src/components/JumpLinks/__tests__/__snapshots__/JumpLinks.test.tsx.snap +5 -0
  43. package/src/components/Page/__tests__/Page.test.tsx +225 -205
  44. package/src/components/Page/__tests__/__snapshots__/Page.test.tsx.snap +1088 -2059
  45. package/src/components/Pagination/__tests__/Pagination.test.tsx +235 -283
  46. package/src/components/Pagination/__tests__/__snapshots__/Pagination.test.tsx.snap +143 -577
  47. package/src/components/ProgressStepper/ProgressStep.tsx +6 -0
  48. package/src/components/ProgressStepper/__tests__/__snapshots__/ProgressStepper.test.tsx.snap +1 -0
  49. package/src/components/ProgressStepper/examples/ProgressStepper.md +9 -9
  50. package/src/components/Radio/__tests__/Radio.test.tsx +38 -44
  51. package/src/components/Radio/__tests__/__snapshots__/Radio.test.tsx.snap +30 -30
  52. package/src/components/SearchInput/__tests__/SearchInput.test.tsx +87 -68
  53. package/src/components/SearchInput/__tests__/__snapshots__/SearchInput.test.tsx.snap +230 -137
  54. package/src/components/Select/__tests__/Select.test.tsx +238 -195
  55. package/src/components/Select/__tests__/SelectToggle.test.tsx +68 -130
  56. package/src/components/Select/__tests__/__snapshots__/Select.test.tsx.snap +978 -2149
  57. package/src/components/Select/__tests__/__snapshots__/SelectToggle.test.tsx.snap +3 -3
  58. package/src/components/SimpleList/__tests__/SimpleList.test.tsx +29 -32
  59. package/src/components/SimpleList/__tests__/__snapshots__/SimpleList.test.tsx.snap +4 -366
  60. package/src/components/Switch/__tests__/Switch.test.tsx +85 -75
  61. package/src/components/Switch/__tests__/__snapshots__/Switch.test.tsx.snap +30 -40
  62. package/src/components/Tabs/Tab.tsx +6 -1
  63. package/src/components/Tabs/Tabs.tsx +2 -2
  64. package/src/components/Tabs/__tests__/Generated/__snapshots__/Tabs.test.tsx.snap +1 -0
  65. package/src/components/Tabs/__tests__/__snapshots__/Tab.test.tsx.snap +3 -0
  66. package/src/components/Tabs/__tests__/__snapshots__/Tabs.test.tsx.snap +135 -0
  67. package/src/components/Tabs/examples/Tabs.md +32 -26
  68. package/src/components/TextArea/__tests__/TextArea.test.tsx +98 -103
  69. package/src/components/TextArea/__tests__/__snapshots__/TextArea.test.tsx.snap +24 -103
  70. package/src/components/TextInput/__tests__/TextInput.test.tsx +71 -70
  71. package/src/components/TextInput/__tests__/__snapshots__/TextInput.test.tsx.snap +15 -103
  72. package/src/components/TextInputGroup/__tests__/TextInputGroup.test.tsx +65 -39
  73. package/src/components/TextInputGroup/__tests__/__snapshots__/TextInputGroup.test.tsx.snap +53 -14
  74. package/src/components/TimePicker/__tests__/TimePicker.test.tsx +113 -110
  75. package/src/components/Title/__tests__/Title.test.tsx +21 -20
  76. package/src/components/Title/__tests__/__snapshots__/Title.test.tsx.snap +24 -30
  77. package/src/components/ToggleGroup/__tests__/ToggleGroup.test.tsx +43 -39
  78. package/src/components/ToggleGroup/__tests__/__snapshots__/ToggleGroup.test.tsx.snap +20 -19
  79. package/src/components/Wizard/__tests__/Wizard.test.tsx +195 -189
  80. package/src/components/Wizard/__tests__/__snapshots__/Wizard.test.tsx.snap +131 -10
  81. package/src/helpers/Popper/Popper.tsx +5 -7
  82. package/src/helpers/__tests__/util.test.ts +113 -0
  83. package/src/layouts/Bullseye/__tests__/Bullseye.test.tsx +25 -25
  84. package/src/layouts/Bullseye/__tests__/__snapshots__/Bullseye.test.tsx.snap +3 -5
  85. package/src/layouts/Flex/__tests__/Flex.test.tsx +159 -96
  86. package/src/layouts/Flex/__tests__/__snapshots__/Flex.test.tsx.snap +9 -17
  87. package/src/components/Page/__tests__/Generated/Page.test.tsx +0 -28
  88. package/src/components/Page/__tests__/Generated/__snapshots__/Page.test.tsx.snap +0 -19
  89. package/src/components/Pagination/__tests__/Generated/Pagination.test.tsx +0 -58
  90. package/src/components/Pagination/__tests__/Generated/__snapshots__/Pagination.test.tsx.snap +0 -205
  91. package/src/components/Radio/__tests__/Generated/Radio.test.tsx +0 -29
  92. package/src/components/Radio/__tests__/Generated/__snapshots__/Radio.test.tsx.snap +0 -36
  93. package/src/components/Select/__tests__/Generated/Select.test.tsx +0 -49
  94. package/src/components/Select/__tests__/Generated/SelectToggle.test.tsx +0 -34
  95. package/src/components/Select/__tests__/Generated/__snapshots__/Select.test.tsx.snap +0 -48
  96. package/src/components/Select/__tests__/Generated/__snapshots__/SelectToggle.test.tsx.snap +0 -36
  97. package/src/components/SimpleList/__tests__/Generated/SimpleList.test.tsx +0 -22
  98. package/src/components/SimpleList/__tests__/Generated/__snapshots__/SimpleList.test.tsx.snap +0 -13
  99. package/src/components/Switch/__tests__/Generated/Switch.test.tsx +0 -24
  100. package/src/components/Switch/__tests__/Generated/__snapshots__/Switch.test.tsx.snap +0 -36
  101. package/src/components/TextArea/__tests__/Generated/TextArea.test.tsx +0 -23
  102. package/src/components/TextArea/__tests__/Generated/__snapshots__/TextArea.test.tsx.snap +0 -13
  103. package/src/components/Title/__tests__/Generated/Title.test.tsx +0 -13
  104. package/src/components/Title/__tests__/Generated/__snapshots__/Title.test.tsx.snap +0 -12
  105. package/src/helpers/__tests__/util.test.js +0 -235
@@ -1,7 +1,7 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`no label switch is checked 1`] = `
4
- <div>
3
+ exports[`Switch no label switch is checked 1`] = `
4
+ <DocumentFragment>
5
5
  <label
6
6
  class="pf-c-switch"
7
7
  data-ouia-component-id="OUIA-Generated-Switch-7"
@@ -10,8 +10,7 @@ exports[`no label switch is checked 1`] = `
10
10
  for="no-label-switch-is-checked"
11
11
  >
12
12
  <input
13
- aria-label=""
14
- aria-labelledby="no-label-switch-is-checked-on"
13
+ aria-label="Switch label"
15
14
  checked=""
16
15
  class="pf-c-switch__input"
17
16
  id="no-label-switch-is-checked"
@@ -39,11 +38,11 @@ exports[`no label switch is checked 1`] = `
39
38
  </div>
40
39
  </span>
41
40
  </label>
42
- </div>
41
+ </DocumentFragment>
43
42
  `;
44
43
 
45
- exports[`no label switch is not checked 1`] = `
46
- <div>
44
+ exports[`Switch no label switch is not checked 1`] = `
45
+ <DocumentFragment>
47
46
  <label
48
47
  class="pf-c-switch"
49
48
  data-ouia-component-id="OUIA-Generated-Switch-8"
@@ -52,8 +51,7 @@ exports[`no label switch is not checked 1`] = `
52
51
  for="no-label-switch-is-not-checked"
53
52
  >
54
53
  <input
55
- aria-label=""
56
- aria-labelledby="no-label-switch-is-not-checked-on"
54
+ aria-label="Switch label"
57
55
  class="pf-c-switch__input"
58
56
  id="no-label-switch-is-not-checked"
59
57
  type="checkbox"
@@ -80,11 +78,11 @@ exports[`no label switch is not checked 1`] = `
80
78
  </div>
81
79
  </span>
82
80
  </label>
83
- </div>
81
+ </DocumentFragment>
84
82
  `;
85
83
 
86
- exports[`switch is checked 1`] = `
87
- <div>
84
+ exports[`Switch switch is checked 1`] = `
85
+ <DocumentFragment>
88
86
  <label
89
87
  class="pf-c-switch"
90
88
  data-ouia-component-id="OUIA-Generated-Switch-3"
@@ -93,8 +91,7 @@ exports[`switch is checked 1`] = `
93
91
  for="switch-is-checked"
94
92
  >
95
93
  <input
96
- aria-label=""
97
- aria-labelledby="switch-is-checked-on"
94
+ aria-label="Switch label"
98
95
  checked=""
99
96
  class="pf-c-switch__input"
100
97
  id="switch-is-checked"
@@ -106,23 +103,21 @@ exports[`switch is checked 1`] = `
106
103
  <span
107
104
  aria-hidden="true"
108
105
  class="pf-c-switch__label pf-m-on"
109
- id="switch-is-checked-on"
110
106
  >
111
107
  On
112
108
  </span>
113
109
  <span
114
110
  aria-hidden="true"
115
111
  class="pf-c-switch__label pf-m-off"
116
- id="switch-is-checked-off"
117
112
  >
118
113
  Off
119
114
  </span>
120
115
  </label>
121
- </div>
116
+ </DocumentFragment>
122
117
  `;
123
118
 
124
- exports[`switch is checked and disabled 1`] = `
125
- <div>
119
+ exports[`Switch switch is checked and disabled 1`] = `
120
+ <DocumentFragment>
126
121
  <label
127
122
  class="pf-c-switch"
128
123
  data-ouia-component-id="OUIA-Generated-Switch-9"
@@ -131,8 +126,7 @@ exports[`switch is checked and disabled 1`] = `
131
126
  for="switch-is-checked-and-disabled"
132
127
  >
133
128
  <input
134
- aria-label=""
135
- aria-labelledby="switch-is-checked-and-disabled-on"
129
+ aria-label="Switch label"
136
130
  checked=""
137
131
  class="pf-c-switch__input"
138
132
  disabled=""
@@ -161,11 +155,11 @@ exports[`switch is checked and disabled 1`] = `
161
155
  </div>
162
156
  </span>
163
157
  </label>
164
- </div>
158
+ </DocumentFragment>
165
159
  `;
166
160
 
167
- exports[`switch is not checked 1`] = `
168
- <div>
161
+ exports[`Switch switch is not checked 1`] = `
162
+ <DocumentFragment>
169
163
  <label
170
164
  class="pf-c-switch"
171
165
  data-ouia-component-id="OUIA-Generated-Switch-4"
@@ -174,8 +168,7 @@ exports[`switch is not checked 1`] = `
174
168
  for="switch-is-not-checked"
175
169
  >
176
170
  <input
177
- aria-label=""
178
- aria-labelledby="switch-is-not-checked-on"
171
+ aria-label="Switch label"
179
172
  class="pf-c-switch__input"
180
173
  id="switch-is-not-checked"
181
174
  type="checkbox"
@@ -186,23 +179,21 @@ exports[`switch is not checked 1`] = `
186
179
  <span
187
180
  aria-hidden="true"
188
181
  class="pf-c-switch__label pf-m-on"
189
- id="switch-is-not-checked-on"
190
182
  >
191
183
  On
192
184
  </span>
193
185
  <span
194
186
  aria-hidden="true"
195
187
  class="pf-c-switch__label pf-m-off"
196
- id="switch-is-not-checked-off"
197
188
  >
198
189
  Off
199
190
  </span>
200
191
  </label>
201
- </div>
192
+ </DocumentFragment>
202
193
  `;
203
194
 
204
- exports[`switch is not checked and disabled 1`] = `
205
- <div>
195
+ exports[`Switch switch is not checked and disabled 1`] = `
196
+ <DocumentFragment>
206
197
  <label
207
198
  class="pf-c-switch"
208
199
  data-ouia-component-id="OUIA-Generated-Switch-10"
@@ -211,8 +202,7 @@ exports[`switch is not checked and disabled 1`] = `
211
202
  for="switch-is-not-checked-and-disabled"
212
203
  >
213
204
  <input
214
- aria-label=""
215
- aria-labelledby="switch-is-not-checked-and-disabled-on"
205
+ aria-label="Switch label"
216
206
  class="pf-c-switch__input"
217
207
  disabled=""
218
208
  id="switch-is-not-checked-and-disabled"
@@ -240,11 +230,11 @@ exports[`switch is not checked and disabled 1`] = `
240
230
  </div>
241
231
  </span>
242
232
  </label>
243
- </div>
233
+ </DocumentFragment>
244
234
  `;
245
235
 
246
- exports[`switch with only label is checked 1`] = `
247
- <div>
236
+ exports[`Switch switch with only label is checked 1`] = `
237
+ <DocumentFragment>
248
238
  <label
249
239
  class="pf-c-switch"
250
240
  data-ouia-component-id="OUIA-Generated-Switch-5"
@@ -278,11 +268,11 @@ exports[`switch with only label is checked 1`] = `
278
268
  On
279
269
  </span>
280
270
  </label>
281
- </div>
271
+ </DocumentFragment>
282
272
  `;
283
273
 
284
- exports[`switch with only label is not checked 1`] = `
285
- <div>
274
+ exports[`Switch switch with only label is not checked 1`] = `
275
+ <DocumentFragment>
286
276
  <label
287
277
  class="pf-c-switch"
288
278
  data-ouia-component-id="OUIA-Generated-Switch-6"
@@ -315,5 +305,5 @@ exports[`switch with only label is not checked 1`] = `
315
305
  Off
316
306
  </span>
317
307
  </label>
318
- </div>
308
+ </DocumentFragment>
319
309
  `;
@@ -92,6 +92,8 @@ const TabBase: React.FunctionComponent<TabProps> = ({
92
92
  tabContentRef={tabContentRef}
93
93
  ouiaId={childOuiaId}
94
94
  href={href}
95
+ role="tab"
96
+ aria-selected={eventKey === localActiveKey}
95
97
  {...props}
96
98
  >
97
99
  {title}
@@ -99,7 +101,10 @@ const TabBase: React.FunctionComponent<TabProps> = ({
99
101
  );
100
102
 
101
103
  return (
102
- <li className={css(styles.tabsItem, eventKey === localActiveKey && styles.modifiers.current, childClassName)}>
104
+ <li
105
+ className={css(styles.tabsItem, eventKey === localActiveKey && styles.modifiers.current, childClassName)}
106
+ role="presentation"
107
+ >
103
108
  {tooltip ? <Tooltip {...tooltip.props}>{tabButton}</Tooltip> : tabButton}
104
109
  </li>
105
110
  );
@@ -79,7 +79,7 @@ export interface TabsProps extends Omit<React.HTMLProps<HTMLElement | HTMLDivEle
79
79
  defaultIsExpanded?: boolean;
80
80
  /** Text that appears in the expandable toggle */
81
81
  toggleText?: string;
82
- /** Aria-label for the left expandable toggle */
82
+ /** Aria-label for the expandable toggle */
83
83
  toggleAriaLabel?: string;
84
84
  /** Callback function to toggle the expandable tabs. */
85
85
  onToggle?: (isExpanded: boolean) => void;
@@ -400,7 +400,7 @@ export class Tabs extends React.Component<TabsProps, TabsState> {
400
400
  >
401
401
  <AngleLeftIcon />
402
402
  </button>
403
- <ul className={css(styles.tabsList)} ref={this.tabList} onScroll={this.handleScrollButtons}>
403
+ <ul className={css(styles.tabsList)} ref={this.tabList} onScroll={this.handleScrollButtons} role="tablist">
404
404
  {filteredChildren}
405
405
  </ul>
406
406
  <button
@@ -32,6 +32,7 @@ exports[`Tabs should match snapshot (auto-generated) 1`] = `
32
32
  </button>
33
33
  <ul
34
34
  class="pf-c-tabs__list"
35
+ role="tablist"
35
36
  >
36
37
  <div>
37
38
  ReactNode
@@ -4,13 +4,16 @@ exports[`should not render anything 1`] = `
4
4
  <div>
5
5
  <li
6
6
  class="pf-c-tabs__item"
7
+ role="presentation"
7
8
  >
8
9
  <button
9
10
  aria-controls="pf-tab-section-0-"
11
+ aria-selected="false"
10
12
  class="pf-c-tabs__link"
11
13
  data-ouia-component-type="PF4/TabButton"
12
14
  data-ouia-safe="true"
13
15
  id="pf-tab-0-"
16
+ role="tab"
14
17
  >
15
18
  <span
16
19
  class="pf-c-tabs__item-text"