@patternfly/react-core 5.0.0-alpha.31 → 5.0.0-alpha.33

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 (169) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/components/Alert/Alert.d.ts +0 -2
  3. package/components/Alert/Alert.d.ts.map +1 -1
  4. package/components/Alert/Alert.js +2 -6
  5. package/components/Alert/Alert.js.map +1 -1
  6. package/components/EmptyState/EmptyState.d.ts +6 -6
  7. package/components/EmptyState/EmptyState.d.ts.map +1 -1
  8. package/components/EmptyState/EmptyState.js +4 -4
  9. package/components/EmptyState/EmptyState.js.map +1 -1
  10. package/components/EmptyState/EmptyStateActions.d.ts +9 -0
  11. package/components/EmptyState/EmptyStateActions.d.ts.map +1 -0
  12. package/components/EmptyState/EmptyStateActions.js +10 -0
  13. package/components/EmptyState/EmptyStateActions.js.map +1 -0
  14. package/components/EmptyState/EmptyStateBody.d.ts +2 -2
  15. package/components/EmptyState/EmptyStateBody.d.ts.map +1 -1
  16. package/components/EmptyState/EmptyStateBody.js +1 -1
  17. package/components/EmptyState/EmptyStateBody.js.map +1 -1
  18. package/components/EmptyState/EmptyStateFooter.d.ts +9 -0
  19. package/components/EmptyState/EmptyStateFooter.d.ts.map +1 -0
  20. package/components/EmptyState/EmptyStateFooter.js +10 -0
  21. package/components/EmptyState/EmptyStateFooter.js.map +1 -0
  22. package/components/EmptyState/EmptyStateHeader.d.ts +18 -0
  23. package/components/EmptyState/EmptyStateHeader.d.ts.map +1 -0
  24. package/components/EmptyState/EmptyStateHeader.js +14 -0
  25. package/components/EmptyState/EmptyStateHeader.js.map +1 -0
  26. package/components/EmptyState/EmptyStateIcon.d.ts +3 -9
  27. package/components/EmptyState/EmptyStateIcon.d.ts.map +1 -1
  28. package/components/EmptyState/EmptyStateIcon.js +6 -4
  29. package/components/EmptyState/EmptyStateIcon.js.map +1 -1
  30. package/components/EmptyState/index.d.ts +4 -3
  31. package/components/EmptyState/index.d.ts.map +1 -1
  32. package/components/EmptyState/index.js +4 -3
  33. package/components/EmptyState/index.js.map +1 -1
  34. package/dist/esm/components/Alert/Alert.d.ts +0 -2
  35. package/dist/esm/components/Alert/Alert.d.ts.map +1 -1
  36. package/dist/esm/components/Alert/Alert.js +2 -6
  37. package/dist/esm/components/Alert/Alert.js.map +1 -1
  38. package/dist/esm/components/EmptyState/EmptyState.d.ts +6 -6
  39. package/dist/esm/components/EmptyState/EmptyState.d.ts.map +1 -1
  40. package/dist/esm/components/EmptyState/EmptyState.js +4 -4
  41. package/dist/esm/components/EmptyState/EmptyState.js.map +1 -1
  42. package/dist/esm/components/EmptyState/EmptyStateActions.d.ts +9 -0
  43. package/dist/esm/components/EmptyState/EmptyStateActions.d.ts.map +1 -0
  44. package/dist/esm/components/EmptyState/EmptyStateActions.js +10 -0
  45. package/dist/esm/components/EmptyState/EmptyStateActions.js.map +1 -0
  46. package/dist/esm/components/EmptyState/EmptyStateBody.d.ts +2 -2
  47. package/dist/esm/components/EmptyState/EmptyStateBody.d.ts.map +1 -1
  48. package/dist/esm/components/EmptyState/EmptyStateBody.js +1 -1
  49. package/dist/esm/components/EmptyState/EmptyStateBody.js.map +1 -1
  50. package/dist/esm/components/EmptyState/EmptyStateFooter.d.ts +9 -0
  51. package/dist/esm/components/EmptyState/EmptyStateFooter.d.ts.map +1 -0
  52. package/dist/esm/components/EmptyState/EmptyStateFooter.js +10 -0
  53. package/dist/esm/components/EmptyState/EmptyStateFooter.js.map +1 -0
  54. package/dist/esm/components/EmptyState/EmptyStateHeader.d.ts +18 -0
  55. package/dist/esm/components/EmptyState/EmptyStateHeader.d.ts.map +1 -0
  56. package/dist/esm/components/EmptyState/EmptyStateHeader.js +14 -0
  57. package/dist/esm/components/EmptyState/EmptyStateHeader.js.map +1 -0
  58. package/dist/esm/components/EmptyState/EmptyStateIcon.d.ts +3 -9
  59. package/dist/esm/components/EmptyState/EmptyStateIcon.d.ts.map +1 -1
  60. package/dist/esm/components/EmptyState/EmptyStateIcon.js +6 -4
  61. package/dist/esm/components/EmptyState/EmptyStateIcon.js.map +1 -1
  62. package/dist/esm/components/EmptyState/index.d.ts +4 -3
  63. package/dist/esm/components/EmptyState/index.d.ts.map +1 -1
  64. package/dist/esm/components/EmptyState/index.js +4 -3
  65. package/dist/esm/components/EmptyState/index.js.map +1 -1
  66. package/dist/js/components/Alert/Alert.d.ts +0 -2
  67. package/dist/js/components/Alert/Alert.d.ts.map +1 -1
  68. package/dist/js/components/Alert/Alert.js +2 -6
  69. package/dist/js/components/Alert/Alert.js.map +1 -1
  70. package/dist/js/components/EmptyState/EmptyState.d.ts +6 -6
  71. package/dist/js/components/EmptyState/EmptyState.d.ts.map +1 -1
  72. package/dist/js/components/EmptyState/EmptyState.js +4 -4
  73. package/dist/js/components/EmptyState/EmptyState.js.map +1 -1
  74. package/dist/js/components/EmptyState/EmptyStateActions.d.ts +9 -0
  75. package/dist/js/components/EmptyState/EmptyStateActions.d.ts.map +1 -0
  76. package/dist/js/components/EmptyState/EmptyStateActions.js +14 -0
  77. package/dist/js/components/EmptyState/EmptyStateActions.js.map +1 -0
  78. package/dist/js/components/EmptyState/EmptyStateBody.d.ts +2 -2
  79. package/dist/js/components/EmptyState/EmptyStateBody.d.ts.map +1 -1
  80. package/dist/js/components/EmptyState/EmptyStateBody.js +1 -1
  81. package/dist/js/components/EmptyState/EmptyStateBody.js.map +1 -1
  82. package/dist/js/components/EmptyState/EmptyStateFooter.d.ts +9 -0
  83. package/dist/js/components/EmptyState/EmptyStateFooter.d.ts.map +1 -0
  84. package/dist/js/components/EmptyState/EmptyStateFooter.js +14 -0
  85. package/dist/js/components/EmptyState/EmptyStateFooter.js.map +1 -0
  86. package/dist/js/components/EmptyState/EmptyStateHeader.d.ts +18 -0
  87. package/dist/js/components/EmptyState/EmptyStateHeader.d.ts.map +1 -0
  88. package/dist/js/components/EmptyState/EmptyStateHeader.js +18 -0
  89. package/dist/js/components/EmptyState/EmptyStateHeader.js.map +1 -0
  90. package/dist/js/components/EmptyState/EmptyStateIcon.d.ts +3 -9
  91. package/dist/js/components/EmptyState/EmptyStateIcon.d.ts.map +1 -1
  92. package/dist/js/components/EmptyState/EmptyStateIcon.js +6 -4
  93. package/dist/js/components/EmptyState/EmptyStateIcon.js.map +1 -1
  94. package/dist/js/components/EmptyState/index.d.ts +4 -3
  95. package/dist/js/components/EmptyState/index.d.ts.map +1 -1
  96. package/dist/js/components/EmptyState/index.js +4 -3
  97. package/dist/js/components/EmptyState/index.js.map +1 -1
  98. package/dist/umd/react-core.min.js +1 -1
  99. package/package.json +2 -2
  100. package/src/components/Alert/Alert.tsx +1 -10
  101. package/src/components/Alert/__tests__/Alert.test.tsx +2 -2
  102. package/src/components/DualListSelector/examples/DualListSelectorComposable.tsx +32 -30
  103. package/src/components/DualListSelector/examples/DualListSelectorComposableTree.tsx +38 -34
  104. package/src/components/EmptyState/EmptyState.tsx +9 -9
  105. package/src/components/EmptyState/EmptyStateActions.tsx +21 -0
  106. package/src/components/EmptyState/EmptyStateBody.tsx +3 -3
  107. package/src/components/EmptyState/EmptyStateFooter.tsx +21 -0
  108. package/src/components/EmptyState/EmptyStateHeader.tsx +42 -0
  109. package/src/components/EmptyState/EmptyStateIcon.tsx +15 -18
  110. package/src/components/EmptyState/__tests__/EmptyState.test.tsx +53 -60
  111. package/src/components/EmptyState/__tests__/Generated/{EmptyStatePrimary.test.tsx → EmptyStateActions.test.tsx} +3 -3
  112. package/src/components/EmptyState/__tests__/Generated/EmptyStateIcon.test.tsx +3 -6
  113. package/src/components/EmptyState/__tests__/Generated/__snapshots__/{EmptyStateSecondaryActions.test.tsx.snap → EmptyStateActions.test.tsx.snap} +2 -2
  114. package/src/components/EmptyState/__tests__/Generated/__snapshots__/EmptyStateIcon.test.tsx.snap +41 -22
  115. package/src/components/EmptyState/__tests__/__snapshots__/EmptyState.test.tsx.snap +115 -56
  116. package/src/components/EmptyState/examples/EmptyState.md +7 -3
  117. package/src/components/EmptyState/examples/EmptyStateBasic.tsx +20 -18
  118. package/src/components/EmptyState/examples/EmptyStateCustomIconColor.tsx +17 -0
  119. package/src/components/EmptyState/examples/EmptyStateExtraLarge.tsx +20 -18
  120. package/src/components/EmptyState/examples/EmptyStateExtraSmall.tsx +16 -15
  121. package/src/components/EmptyState/examples/EmptyStateLarge.tsx +21 -19
  122. package/src/components/EmptyState/examples/EmptyStateNoMatchFound.tsx +15 -8
  123. package/src/components/EmptyState/examples/EmptyStateSmall.tsx +21 -19
  124. package/src/components/EmptyState/examples/EmptyStateSpinner.tsx +2 -5
  125. package/src/components/EmptyState/index.ts +4 -3
  126. package/src/components/NotificationDrawer/examples/NotificationDrawerGroups.tsx +15 -11
  127. package/src/components/NotificationDrawer/examples/NotificationDrawerLightweight.tsx +14 -10
  128. package/src/components/Wizard/examples/Wizard.md +1 -1
  129. package/src/components/Wizard/examples/WizardFinished.tsx +18 -14
  130. package/src/components/Wizard/examples/WizardValidateOnButtonPress.tsx +20 -16
  131. package/src/demos/Card/Card.md +13 -8
  132. package/src/demos/Filters/FilterDemos.md +4 -2
  133. package/src/demos/Filters/examples/FilterAttributeSearch.tsx +20 -20
  134. package/src/demos/Filters/examples/FilterFaceted.tsx +19 -19
  135. package/src/demos/Filters/examples/FilterMixedSelectGroup.tsx +19 -19
  136. package/src/demos/Filters/examples/FilterSameSelectGroup.tsx +19 -19
  137. package/src/demos/Filters/examples/FilterSearchInput.tsx +18 -18
  138. package/src/demos/NotificationDrawer/NotificationDrawer.md +52 -39
  139. package/src/demos/examples/AlertGroup/AlertGroupToastWithNotificationDrawer.tsx +19 -17
  140. package/src/next/components/Wizard/examples/WizardValidateOnButtonPress.tsx +19 -15
  141. package/src/next/components/Wizard/examples/WizardWithSubmitProgress.tsx +18 -14
  142. package/components/EmptyState/EmptyStatePrimary.d.ts +0 -9
  143. package/components/EmptyState/EmptyStatePrimary.d.ts.map +0 -1
  144. package/components/EmptyState/EmptyStatePrimary.js +0 -9
  145. package/components/EmptyState/EmptyStatePrimary.js.map +0 -1
  146. package/components/EmptyState/EmptyStateSecondaryActions.d.ts +0 -9
  147. package/components/EmptyState/EmptyStateSecondaryActions.d.ts.map +0 -1
  148. package/components/EmptyState/EmptyStateSecondaryActions.js +0 -9
  149. package/components/EmptyState/EmptyStateSecondaryActions.js.map +0 -1
  150. package/dist/esm/components/EmptyState/EmptyStatePrimary.d.ts +0 -9
  151. package/dist/esm/components/EmptyState/EmptyStatePrimary.d.ts.map +0 -1
  152. package/dist/esm/components/EmptyState/EmptyStatePrimary.js +0 -9
  153. package/dist/esm/components/EmptyState/EmptyStatePrimary.js.map +0 -1
  154. package/dist/esm/components/EmptyState/EmptyStateSecondaryActions.d.ts +0 -9
  155. package/dist/esm/components/EmptyState/EmptyStateSecondaryActions.d.ts.map +0 -1
  156. package/dist/esm/components/EmptyState/EmptyStateSecondaryActions.js +0 -9
  157. package/dist/esm/components/EmptyState/EmptyStateSecondaryActions.js.map +0 -1
  158. package/dist/js/components/EmptyState/EmptyStatePrimary.d.ts +0 -9
  159. package/dist/js/components/EmptyState/EmptyStatePrimary.d.ts.map +0 -1
  160. package/dist/js/components/EmptyState/EmptyStatePrimary.js +0 -13
  161. package/dist/js/components/EmptyState/EmptyStatePrimary.js.map +0 -1
  162. package/dist/js/components/EmptyState/EmptyStateSecondaryActions.d.ts +0 -9
  163. package/dist/js/components/EmptyState/EmptyStateSecondaryActions.d.ts.map +0 -1
  164. package/dist/js/components/EmptyState/EmptyStateSecondaryActions.js +0 -13
  165. package/dist/js/components/EmptyState/EmptyStateSecondaryActions.js.map +0 -1
  166. package/src/components/EmptyState/EmptyStatePrimary.tsx +0 -20
  167. package/src/components/EmptyState/EmptyStateSecondaryActions.tsx +0 -18
  168. package/src/components/EmptyState/__tests__/Generated/EmptyStateSecondaryActions.test.tsx +0 -13
  169. package/src/components/EmptyState/__tests__/Generated/__snapshots__/EmptyStatePrimary.test.tsx.snap +0 -13
@@ -12,16 +12,17 @@ import {
12
12
  Popper,
13
13
  Pagination,
14
14
  EmptyState,
15
- EmptyStateIcon,
16
- Title,
15
+ EmptyStateHeader,
16
+ EmptyStateFooter,
17
17
  EmptyStateBody,
18
- EmptyStatePrimary,
19
18
  Button,
20
19
  Bullseye,
21
20
  Badge,
22
21
  ToolbarFilter,
23
22
  ToolbarToggleGroup,
24
- MenuGroup
23
+ MenuGroup,
24
+ EmptyStateIcon,
25
+ EmptyStateActions
25
26
  } from '@patternfly/react-core';
26
27
  import { TableComposable, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
27
28
  import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
@@ -444,22 +445,21 @@ export const FilterFaceted: React.FunctionComponent = () => {
444
445
 
445
446
  const emptyState = (
446
447
  <EmptyState>
447
- <EmptyStateIcon icon={SearchIcon} />
448
- <Title size="lg" headingLevel="h4">
449
- No results found
450
- </Title>
448
+ <EmptyStateHeader headingLevel="h4" titleText="No results found" icon={<EmptyStateIcon icon={SearchIcon} />} />
451
449
  <EmptyStateBody>No results match the filter criteria. Clear all filters and try again.</EmptyStateBody>
452
- <EmptyStatePrimary>
453
- <Button
454
- variant="link"
455
- onClick={() => {
456
- setStatusSelections([]);
457
- setLocationSelections([]);
458
- }}
459
- >
460
- Clear all filters
461
- </Button>
462
- </EmptyStatePrimary>
450
+ <EmptyStateFooter>
451
+ <EmptyStateActions>
452
+ <Button
453
+ variant="link"
454
+ onClick={() => {
455
+ setStatusSelections([]);
456
+ setLocationSelections([]);
457
+ }}
458
+ >
459
+ Clear all filters
460
+ </Button>
461
+ </EmptyStateActions>
462
+ </EmptyStateFooter>
463
463
  </EmptyState>
464
464
  );
465
465
 
@@ -12,15 +12,16 @@ import {
12
12
  Popper,
13
13
  Pagination,
14
14
  EmptyState,
15
- EmptyStateIcon,
16
- Title,
15
+ EmptyStateHeader,
16
+ EmptyStateFooter,
17
17
  EmptyStateBody,
18
- EmptyStatePrimary,
19
18
  Button,
20
19
  Bullseye,
21
20
  Badge,
22
21
  ToolbarFilter,
23
- ToolbarToggleGroup
22
+ ToolbarToggleGroup,
23
+ EmptyStateIcon,
24
+ EmptyStateActions
24
25
  } from '@patternfly/react-core';
25
26
  import { TableComposable, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
26
27
  import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
@@ -494,22 +495,21 @@ export const FilterMixedSelectGroup: React.FunctionComponent = () => {
494
495
 
495
496
  const emptyState = (
496
497
  <EmptyState>
497
- <EmptyStateIcon icon={SearchIcon} />
498
- <Title size="lg" headingLevel="h4">
499
- No results found
500
- </Title>
498
+ <EmptyStateHeader headingLevel="h4" titleText="No results found" icon={<EmptyStateIcon icon={SearchIcon} />} />
501
499
  <EmptyStateBody>No results match the filter criteria. Clear all filters and try again.</EmptyStateBody>
502
- <EmptyStatePrimary>
503
- <Button
504
- variant="link"
505
- onClick={() => {
506
- setStatusSelection('');
507
- setLocationSelections([]);
508
- }}
509
- >
510
- Clear all filters
511
- </Button>
512
- </EmptyStatePrimary>
500
+ <EmptyStateFooter>
501
+ <EmptyStateActions>
502
+ <Button
503
+ variant="link"
504
+ onClick={() => {
505
+ setStatusSelection('');
506
+ setLocationSelections([]);
507
+ }}
508
+ >
509
+ Clear all filters
510
+ </Button>
511
+ </EmptyStateActions>
512
+ </EmptyStateFooter>
513
513
  </EmptyState>
514
514
  );
515
515
 
@@ -12,13 +12,14 @@ import {
12
12
  Popper,
13
13
  Pagination,
14
14
  EmptyState,
15
- EmptyStateIcon,
16
- Title,
15
+ EmptyStateHeader,
16
+ EmptyStateFooter,
17
17
  EmptyStateBody,
18
- EmptyStatePrimary,
19
18
  Button,
20
19
  Bullseye,
21
- ToolbarToggleGroup
20
+ ToolbarToggleGroup,
21
+ EmptyStateIcon,
22
+ EmptyStateActions
22
23
  } from '@patternfly/react-core';
23
24
  import { TableComposable, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
24
25
  import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
@@ -467,22 +468,21 @@ export const FilterSameSelectGroup: React.FunctionComponent = () => {
467
468
 
468
469
  const emptyState = (
469
470
  <EmptyState>
470
- <EmptyStateIcon icon={SearchIcon} />
471
- <Title size="lg" headingLevel="h4">
472
- No results found
473
- </Title>
471
+ <EmptyStateHeader headingLevel="h4" titleText="No results found" icon={<EmptyStateIcon icon={SearchIcon} />} />
474
472
  <EmptyStateBody>No results match the filter criteria. Clear all filters and try again.</EmptyStateBody>
475
- <EmptyStatePrimary>
476
- <Button
477
- variant="link"
478
- onClick={() => {
479
- setStatusSelection('All statuses');
480
- setLocationSelection('All locations');
481
- }}
482
- >
483
- Clear all filters
484
- </Button>
485
- </EmptyStatePrimary>
473
+ <EmptyStateFooter>
474
+ <EmptyStateActions>
475
+ <Button
476
+ variant="link"
477
+ onClick={() => {
478
+ setStatusSelection('All statuses');
479
+ setLocationSelection('All locations');
480
+ }}
481
+ >
482
+ Clear all filters
483
+ </Button>
484
+ </EmptyStateActions>
485
+ </EmptyStateFooter>
486
486
  </EmptyState>
487
487
  );
488
488
 
@@ -13,12 +13,13 @@ import {
13
13
  Popper,
14
14
  Pagination,
15
15
  EmptyState,
16
- EmptyStateIcon,
17
- Title,
16
+ EmptyStateHeader,
17
+ EmptyStateFooter,
18
18
  EmptyStateBody,
19
- EmptyStatePrimary,
20
19
  Button,
21
- Bullseye
20
+ Bullseye,
21
+ EmptyStateIcon,
22
+ EmptyStateActions
22
23
  } from '@patternfly/react-core';
23
24
  import { TableComposable, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
24
25
  import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
@@ -276,21 +277,20 @@ export const FilterSearchInput: React.FunctionComponent = () => {
276
277
 
277
278
  const emptyState = (
278
279
  <EmptyState>
279
- <EmptyStateIcon icon={SearchIcon} />
280
- <Title size="lg" headingLevel="h4">
281
- No results found
282
- </Title>
280
+ <EmptyStateHeader headingLevel="h4" titleText="No results found" icon={<EmptyStateIcon icon={SearchIcon} />} />
283
281
  <EmptyStateBody>No results match the filter criteria. Clear all filters and try again.</EmptyStateBody>
284
- <EmptyStatePrimary>
285
- <Button
286
- variant="link"
287
- onClick={() => {
288
- setSearchValue('');
289
- }}
290
- >
291
- Clear all filters
292
- </Button>
293
- </EmptyStatePrimary>
282
+ <EmptyStateFooter>
283
+ <EmptyStateActions>
284
+ <Button
285
+ variant="link"
286
+ onClick={() => {
287
+ setSearchValue('');
288
+ }}
289
+ >
290
+ Clear all filters
291
+ </Button>
292
+ </EmptyStateActions>
293
+ </EmptyStateFooter>
294
294
  </EmptyState>
295
295
  );
296
296
 
@@ -38,9 +38,11 @@ import {
38
38
  DropdownItem,
39
39
  DropdownSeparator,
40
40
  EmptyState,
41
+ EmptyStateActions,
41
42
  EmptyStateBody,
42
43
  EmptyStateIcon,
43
- EmptyStatePrimary,
44
+ EmptyStateHeader,
45
+ EmptyStateFooter,
44
46
  EmptyStateVariant,
45
47
  KebabToggle,
46
48
  Nav,
@@ -104,7 +106,7 @@ class BasicNotificationDrawer extends React.Component {
104
106
  });
105
107
  };
106
108
 
107
- this.onDropdownSelect = event => {
109
+ this.onDropdownSelect = (event) => {
108
110
  this.setState({
109
111
  isDropdownOpen: !this.state.isDropdownOpen
110
112
  });
@@ -116,20 +118,20 @@ class BasicNotificationDrawer extends React.Component {
116
118
  });
117
119
  };
118
120
 
119
- this.onKebabDropdownSelect = event => {
121
+ this.onKebabDropdownSelect = (event) => {
120
122
  this.setState({
121
123
  isKebabDropdownOpen: !this.state.isKebabDropdownOpen
122
124
  });
123
125
  };
124
126
 
125
- this.onNavSelect = result => {
127
+ this.onNavSelect = (result) => {
126
128
  this.setState({
127
129
  activeItem: result.itemId
128
130
  });
129
131
  };
130
132
 
131
133
  this.onCloseNotificationDrawer = () => {
132
- this.setState(prevState => {
134
+ this.setState((prevState) => {
133
135
  return {
134
136
  isDrawerExpanded: !prevState.isDrawerExpanded
135
137
  };
@@ -142,14 +144,14 @@ class BasicNotificationDrawer extends React.Component {
142
144
  });
143
145
  };
144
146
 
145
- this.onSelect = event => {
147
+ this.onSelect = (event) => {
146
148
  this.setState({
147
149
  isActionsMenuOpen: null
148
150
  });
149
151
  };
150
152
 
151
- this.onListItemClick = id => {
152
- this.setState(prevState => {
153
+ this.onListItemClick = (id) => {
154
+ this.setState((prevState) => {
153
155
  if (!prevState.isUnreadMap) return;
154
156
  prevState.isUnreadMap[id] = false;
155
157
  return {
@@ -172,7 +174,7 @@ class BasicNotificationDrawer extends React.Component {
172
174
  });
173
175
  };
174
176
 
175
- this.showNotifications = showNotifications => {
177
+ this.showNotifications = (showNotifications) => {
176
178
  this.setState({
177
179
  isUnreadMap: null,
178
180
  showNotifications: showNotifications
@@ -503,16 +505,19 @@ class BasicNotificationDrawer extends React.Component {
503
505
  )}
504
506
  {!showNotifications && (
505
507
  <EmptyState variant={EmptyStateVariant.full}>
506
- <EmptyStateIcon icon={SearchIcon} />
507
- <Title headingLevel="h2" size="lg">
508
- No alerts found
509
- </Title>
508
+ <EmptyStateHeader
509
+ headingLevel="h2"
510
+ titleText="No results found"
511
+ icon={<EmptyStateIcon icon={SearchIcon} />}
512
+ />
510
513
  <EmptyStateBody>
511
514
  There are currently no alerts. There may be silenced critical alerts however.
512
515
  </EmptyStateBody>
513
- <EmptyStatePrimary>
514
- <Button variant="link">Action</Button>
515
- </EmptyStatePrimary>
516
+ <EmptyStateFooter>
517
+ <EmptyStateActions>
518
+ <Button variant="link">Action</Button>
519
+ </EmptyStateActions>
520
+ </EmptyStateFooter>
516
521
  </EmptyState>
517
522
  )}
518
523
  </NotificationDrawerBody>
@@ -572,9 +577,11 @@ import {
572
577
  DropdownItem,
573
578
  DropdownSeparator,
574
579
  EmptyState,
580
+ EmptyStateActions,
575
581
  EmptyStateBody,
576
582
  EmptyStateIcon,
577
- EmptyStatePrimary,
583
+ EmptyStateHeader,
584
+ EmptyStateFooter,
578
585
  EmptyStateVariant,
579
586
  KebabToggle,
580
587
  Nav,
@@ -650,7 +657,7 @@ class GroupedNotificationDrawer extends React.Component {
650
657
  });
651
658
  };
652
659
 
653
- this.onDropdownSelect = event => {
660
+ this.onDropdownSelect = (event) => {
654
661
  this.setState({
655
662
  isDropdownOpen: !this.state.isDropdownOpen
656
663
  });
@@ -662,20 +669,20 @@ class GroupedNotificationDrawer extends React.Component {
662
669
  });
663
670
  };
664
671
 
665
- this.onKebabDropdownSelect = event => {
672
+ this.onKebabDropdownSelect = (event) => {
666
673
  this.setState({
667
674
  isKebabDropdownOpen: !this.state.isKebabDropdownOpen
668
675
  });
669
676
  };
670
677
 
671
- this.onNavSelect = result => {
678
+ this.onNavSelect = (result) => {
672
679
  this.setState({
673
680
  activeItem: result.itemId
674
681
  });
675
682
  };
676
683
 
677
684
  this.onCloseNotificationDrawer = () => {
678
- this.setState(prevState => {
685
+ this.setState((prevState) => {
679
686
  return {
680
687
  isDrawerExpanded: !prevState.isDrawerExpanded
681
688
  };
@@ -688,14 +695,14 @@ class GroupedNotificationDrawer extends React.Component {
688
695
  });
689
696
  };
690
697
 
691
- this.onSelect = event => {
698
+ this.onSelect = (event) => {
692
699
  this.setState({
693
700
  isActionsMenuOpen: null
694
701
  });
695
702
  };
696
703
 
697
704
  this.onListItemClick = (groupId, id) => {
698
- this.setState(prevState => {
705
+ this.setState((prevState) => {
699
706
  if (!prevState.isUnreadMap || !prevState.isUnreadMap[groupId]) return;
700
707
  console.log(prevState.isUnreadMap);
701
708
  prevState.isUnreadMap[groupId][id] = false;
@@ -710,7 +717,7 @@ class GroupedNotificationDrawer extends React.Component {
710
717
  return isUnreadMap && isUnreadMap[groupId] && isUnreadMap[groupId][id];
711
718
  };
712
719
 
713
- this.getNumberUnread = groupId => {
720
+ this.getNumberUnread = (groupId) => {
714
721
  const { isUnreadMap } = this.state;
715
722
  if (isUnreadMap === null) return 0;
716
723
 
@@ -737,7 +744,7 @@ class GroupedNotificationDrawer extends React.Component {
737
744
  });
738
745
  };
739
746
 
740
- this.showNotifications = showNotifications => {
747
+ this.showNotifications = (showNotifications) => {
741
748
  this.setState({
742
749
  isUnreadMap: null,
743
750
  showNotifications: showNotifications
@@ -1232,17 +1239,20 @@ class GroupedNotificationDrawer extends React.Component {
1232
1239
  >
1233
1240
  <NotificationDrawerList isHidden={!thirdDrawerGroupExpanded}>
1234
1241
  <EmptyState variant={EmptyStateVariant.full}>
1235
- <EmptyStateIcon icon={SearchIcon} />
1236
- <Title headingLevel="h2" size="lg">
1237
- No alerts found
1238
- </Title>
1242
+ <EmptyStateHeader
1243
+ headingLevel="h2"
1244
+ titleText="No alerts found"
1245
+ icon={<EmptyStateIcon icon={SearchIcon} />}
1246
+ />
1239
1247
  <EmptyStateBody>
1240
1248
  There are currently no critical alerts firing. There may be firing alerts of other severities or
1241
1249
  silenced critical alerts however.
1242
1250
  </EmptyStateBody>
1243
- <EmptyStatePrimary>
1244
- <Button variant="link">Action</Button>
1245
- </EmptyStatePrimary>
1251
+ <EmptyStateFooter>
1252
+ <EmptyStateActions>
1253
+ <Button variant="link">Action</Button>
1254
+ </EmptyStateActions>
1255
+ </EmptyStateFooter>
1246
1256
  </EmptyState>
1247
1257
  </NotificationDrawerList>
1248
1258
  </NotificationDrawerGroup>
@@ -1250,16 +1260,19 @@ class GroupedNotificationDrawer extends React.Component {
1250
1260
  )}
1251
1261
  {!showNotifications && (
1252
1262
  <EmptyState variant={EmptyStateVariant.full}>
1253
- <EmptyStateIcon icon={SearchIcon} />
1254
- <Title headingLevel="h2" size="lg">
1255
- No alerts found
1256
- </Title>
1263
+ <EmptyStateHeader
1264
+ headingLevel="h2"
1265
+ titleText="No alerts found"
1266
+ icon={<EmptyStateIcon icon={SearchIcon} />}
1267
+ />
1257
1268
  <EmptyStateBody>
1258
1269
  There are currently no alerts. There may be silenced critical alerts however.
1259
1270
  </EmptyStateBody>
1260
- <EmptyStatePrimary>
1261
- <Button variant="link">Action</Button>
1262
- </EmptyStatePrimary>
1271
+ <EmptyStateFooter>
1272
+ <EmptyStateActions>
1273
+ <Button variant="link">Action</Button>
1274
+ </EmptyStateActions>
1275
+ </EmptyStateFooter>
1263
1276
  </EmptyState>
1264
1277
  )}
1265
1278
  </NotificationDrawerBody>
@@ -5,6 +5,7 @@ import {
5
5
  DropdownItem,
6
6
  EmptyState,
7
7
  EmptyStateBody,
8
+ EmptyStateHeader,
8
9
  EmptyStateIcon,
9
10
  KebabToggle,
10
11
  NotificationBadge,
@@ -20,7 +21,6 @@ import {
20
21
  PageSectionVariants,
21
22
  TextContent,
22
23
  Text,
23
- Title,
24
24
  DropdownPosition,
25
25
  EmptyStateVariant,
26
26
  NumberInput,
@@ -69,13 +69,13 @@ export const AlertGroupToastWithNotificationDrawer: React.FunctionComponent = ()
69
69
  const key = getUniqueId();
70
70
  const timestamp = getTimeCreated();
71
71
 
72
- setNotifications(prevNotifications => [
72
+ setNotifications((prevNotifications) => [
73
73
  { title, srTitle, variant, key, timestamp, description, isNotificationRead: false },
74
74
  ...prevNotifications
75
75
  ]);
76
76
 
77
77
  if (!isDrawerExpanded) {
78
- setAlerts(prevAlerts => [
78
+ setAlerts((prevAlerts) => [
79
79
  <Alert
80
80
  variant={variant}
81
81
  title={title}
@@ -96,7 +96,7 @@ export const AlertGroupToastWithNotificationDrawer: React.FunctionComponent = ()
96
96
  };
97
97
 
98
98
  const removeNotification = (key: React.Key) => {
99
- setNotifications(prevNotifications => prevNotifications.filter(notification => notification.key !== key));
99
+ setNotifications((prevNotifications) => prevNotifications.filter((notification) => notification.key !== key));
100
100
  };
101
101
 
102
102
  const removeAllNotifications = () => {
@@ -104,28 +104,29 @@ export const AlertGroupToastWithNotificationDrawer: React.FunctionComponent = ()
104
104
  };
105
105
 
106
106
  const isNotificationRead = (key: React.Key) =>
107
- notifications.find(notification => notification.key === key)?.isNotificationRead;
107
+ notifications.find((notification) => notification.key === key)?.isNotificationRead;
108
108
 
109
109
  const markNotificationRead = (key: React.Key) => {
110
- setNotifications(prevNotifications =>
111
- prevNotifications.map(notification =>
110
+ setNotifications((prevNotifications) =>
111
+ prevNotifications.map((notification) =>
112
112
  notification.key === key ? { ...notification, isNotificationRead: true } : notification
113
113
  )
114
114
  );
115
115
  };
116
116
 
117
117
  const markAllNotificationsRead = () => {
118
- setNotifications(prevNotifications =>
119
- prevNotifications.map(notification => ({ ...notification, isNotificationRead: true }))
118
+ setNotifications((prevNotifications) =>
119
+ prevNotifications.map((notification) => ({ ...notification, isNotificationRead: true }))
120
120
  );
121
121
  };
122
122
 
123
123
  const getUnreadNotificationsNumber = () =>
124
- notifications.filter(notification => notification.isNotificationRead === false).length;
124
+ notifications.filter((notification) => notification.isNotificationRead === false).length;
125
125
 
126
126
  const containsUnreadAlertNotification = () =>
127
- notifications.filter(notification => notification.isNotificationRead === false && notification.variant === 'danger')
128
- .length > 0;
127
+ notifications.filter(
128
+ (notification) => notification.isNotificationRead === false && notification.variant === 'danger'
129
+ ).length > 0;
129
130
 
130
131
  const getNotificationBadgeVariant = () => {
131
132
  if (getUnreadNotificationsNumber() === 0) {
@@ -176,7 +177,7 @@ export const AlertGroupToastWithNotificationDrawer: React.FunctionComponent = ()
176
177
  };
177
178
 
178
179
  const removeAlert = (key: React.Key) => {
179
- setAlerts(prevAlerts => prevAlerts.filter(alert => alert.props.id !== key.toString()));
180
+ setAlerts((prevAlerts) => prevAlerts.filter((alert) => alert.props.id !== key.toString()));
180
181
  };
181
182
 
182
183
  const removeAllAlerts = () => {
@@ -281,10 +282,11 @@ export const AlertGroupToastWithNotificationDrawer: React.FunctionComponent = ()
281
282
  )}
282
283
  {notifications.length === 0 && (
283
284
  <EmptyState variant={EmptyStateVariant.full}>
284
- <EmptyStateIcon icon={SearchIcon} />
285
- <Title headingLevel="h2" size="lg">
286
- No notifications found
287
- </Title>
285
+ <EmptyStateHeader
286
+ headingLevel="h2"
287
+ titleText="No notifications found"
288
+ icon={<EmptyStateIcon icon={SearchIcon} />}
289
+ />
288
290
  <EmptyStateBody>There are currently no notifications.</EmptyStateBody>
289
291
  </EmptyState>
290
292
  )}
@@ -4,11 +4,12 @@ import {
4
4
  Button,
5
5
  Alert,
6
6
  EmptyState,
7
- EmptyStateIcon,
8
- Title,
7
+ EmptyStateHeader,
8
+ EmptyStateFooter,
9
9
  EmptyStateBody,
10
+ EmptyStateActions,
11
+ EmptyStateIcon,
10
12
  Progress,
11
- EmptyStateSecondaryActions,
12
13
  Form,
13
14
  FormGroup,
14
15
  TextInput
@@ -25,7 +26,7 @@ const ValidationProgress: React.FunctionComponent<ValidationProgressProps> = ({
25
26
 
26
27
  const tick = React.useCallback(() => {
27
28
  if (percentValidated < 100) {
28
- setPercentValidated(prevValue => prevValue + 20);
29
+ setPercentValidated((prevValue) => prevValue + 20);
29
30
  }
30
31
  }, [percentValidated]);
31
32
 
@@ -39,11 +40,12 @@ const ValidationProgress: React.FunctionComponent<ValidationProgressProps> = ({
39
40
 
40
41
  return (
41
42
  <div className="pf-l-bullseye">
42
- <EmptyState variant="large">
43
- <EmptyStateIcon icon={CogsIcon} />
44
- <Title headingLevel="h4" size="lg">
45
- {percentValidated === 100 ? 'Validation complete' : 'Validating credentials'}
46
- </Title>
43
+ <EmptyState variant="lg">
44
+ <EmptyStateHeader
45
+ headingLevel="h4"
46
+ titleText={percentValidated === 100 ? 'Validation complete' : 'Validating credentials'}
47
+ icon={<EmptyStateIcon icon={CogsIcon} />}
48
+ />
47
49
  <EmptyStateBody>
48
50
  <Progress value={percentValidated} measureLocation="outside" aria-label="Wizard validation progress" />
49
51
  </EmptyStateBody>
@@ -51,11 +53,13 @@ const ValidationProgress: React.FunctionComponent<ValidationProgressProps> = ({
51
53
  Description can be used to further elaborate on the validation step, or give the user a better idea of how
52
54
  long the process will take.
53
55
  </EmptyStateBody>
54
- <EmptyStateSecondaryActions>
55
- <Button isDisabled={percentValidated !== 100} onClick={onClose}>
56
- Log to console
57
- </Button>
58
- </EmptyStateSecondaryActions>
56
+ <EmptyStateFooter>
57
+ <EmptyStateActions>
58
+ <Button isDisabled={percentValidated !== 100} onClick={onClose}>
59
+ Log to console
60
+ </Button>
61
+ </EmptyStateActions>
62
+ </EmptyStateFooter>
59
63
  </EmptyState>
60
64
  </div>
61
65
  );
@@ -173,7 +177,7 @@ export const WizardValidateOnButtonPress: React.FunctionComponent = () => {
173
177
  )}
174
178
  <SampleForm
175
179
  value={ageValue}
176
- setValue={value => setAgeValue(value)}
180
+ setValue={(value) => setAgeValue(value)}
177
181
  isValid={!hasErrorOnSubmit || isFirstStepValid}
178
182
  setIsValid={setIsFirstStepValid}
179
183
  />