@patternfly/react-table 6.6.0 → 6.6.1-prerelease.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/components/package.json +1 -1
  3. package/deprecated/package.json +1 -1
  4. package/dist/dynamic/components/Table/package.json +1 -1
  5. package/dist/dynamic/components/Table/utils/decorators/package.json +1 -1
  6. package/dist/dynamic/components/Table/utils/package.json +1 -1
  7. package/dist/dynamic/deprecated/components/Table/base/package.json +1 -1
  8. package/dist/dynamic/deprecated/components/Table/package.json +1 -1
  9. package/dist/dynamic/deprecated/components/package.json +1 -1
  10. package/dist/esm/components/Table/EditColumn.js +2 -2
  11. package/dist/esm/components/Table/EditColumn.js.map +1 -1
  12. package/dist/esm/components/Table/HeaderCellInfoWrapper.js +2 -2
  13. package/dist/esm/components/Table/HeaderCellInfoWrapper.js.map +1 -1
  14. package/dist/esm/components/Table/SortColumn.js +5 -5
  15. package/dist/esm/components/Table/SortColumn.js.map +1 -1
  16. package/dist/esm/components/Table/Tr.d.ts.map +1 -1
  17. package/dist/esm/components/Table/Tr.js +2 -1
  18. package/dist/esm/components/Table/Tr.js.map +1 -1
  19. package/dist/esm/components/Table/utils/decorators/treeRow.js +2 -2
  20. package/dist/esm/components/Table/utils/decorators/treeRow.js.map +1 -1
  21. package/dist/esm/components/Table/utils/inert.d.ts +6 -0
  22. package/dist/esm/components/Table/utils/inert.d.ts.map +1 -0
  23. package/dist/esm/components/Table/utils/inert.js +7 -0
  24. package/dist/esm/components/Table/utils/inert.js.map +1 -0
  25. package/dist/esm/demos/DashboardHeader.js +3 -3
  26. package/dist/esm/demos/DashboardHeader.js.map +1 -1
  27. package/dist/esm/deprecated/components/Table/Table.d.ts.map +1 -1
  28. package/dist/esm/deprecated/components/Table/Table.js +1 -0
  29. package/dist/esm/deprecated/components/Table/Table.js.map +1 -1
  30. package/dist/js/components/Table/EditColumn.js +2 -2
  31. package/dist/js/components/Table/EditColumn.js.map +1 -1
  32. package/dist/js/components/Table/HeaderCellInfoWrapper.js +2 -2
  33. package/dist/js/components/Table/HeaderCellInfoWrapper.js.map +1 -1
  34. package/dist/js/components/Table/SortColumn.js +5 -5
  35. package/dist/js/components/Table/SortColumn.js.map +1 -1
  36. package/dist/js/components/Table/Tr.d.ts.map +1 -1
  37. package/dist/js/components/Table/Tr.js +2 -1
  38. package/dist/js/components/Table/Tr.js.map +1 -1
  39. package/dist/js/components/Table/utils/decorators/treeRow.js +2 -2
  40. package/dist/js/components/Table/utils/decorators/treeRow.js.map +1 -1
  41. package/dist/js/components/Table/utils/inert.d.ts +6 -0
  42. package/dist/js/components/Table/utils/inert.d.ts.map +1 -0
  43. package/dist/js/components/Table/utils/inert.js +10 -0
  44. package/dist/js/components/Table/utils/inert.js.map +1 -0
  45. package/dist/js/demos/DashboardHeader.js +3 -3
  46. package/dist/js/demos/DashboardHeader.js.map +1 -1
  47. package/dist/js/deprecated/components/Table/Table.d.ts.map +1 -1
  48. package/dist/js/deprecated/components/Table/Table.js +1 -0
  49. package/dist/js/deprecated/components/Table/Table.js.map +1 -1
  50. package/dist/umd/assets/{output-Bl7O7Cxq.css → output-BPuw_eqw.css} +2005 -2002
  51. package/dist/umd/react-table.min.js +2 -2
  52. package/package.json +6 -6
  53. package/src/components/Table/EditColumn.tsx +2 -2
  54. package/src/components/Table/HeaderCellInfoWrapper.tsx +3 -3
  55. package/src/components/Table/SortColumn.tsx +5 -5
  56. package/src/components/Table/Tr.tsx +2 -1
  57. package/src/components/Table/examples/Table.md +4 -4
  58. package/src/components/Table/examples/TableEditable.tsx +2 -2
  59. package/src/components/Table/examples/TableEmptyState.tsx +7 -2
  60. package/src/components/Table/examples/TableTree.tsx +3 -3
  61. package/src/components/Table/utils/decorators/treeRow.tsx +2 -2
  62. package/src/components/Table/utils/inert.ts +7 -0
  63. package/src/demos/DashboardHeader.tsx +3 -3
  64. package/src/demos/Table.md +5 -6
  65. package/src/demos/examples/TableColumnManagement.tsx +7 -6
  66. package/src/demos/examples/TableColumnManagementWithDraggable.tsx +7 -6
  67. package/src/demos/examples/TableCompact.tsx +8 -7
  68. package/src/demos/examples/TableCompoundExpansion.tsx +2 -2
  69. package/src/demos/examples/TableEmptyStateDefault.tsx +2 -2
  70. package/src/demos/examples/TableExpandCollapseAll.tsx +6 -6
  71. package/src/demos/examples/TableFilterable.tsx +10 -9
  72. package/src/demos/examples/TableSortableResponsive.tsx +10 -9
  73. package/src/demos/examples/TableStaticBottomPagination.tsx +8 -7
  74. package/src/demos/examples/TableStickyHeader.tsx +6 -6
  75. package/src/deprecated/components/Table/Table.tsx +1 -0
  76. package/src/deprecated/components/Table/__tests__/Table.test.tsx +19 -0
  77. package/src/deprecated/components/Table/__tests__/__snapshots__/Table.test.tsx.snap +869 -326
  78. package/src/deprecated/components/Table/examples/LegacyTableEmptyState.tsx +2 -2
  79. package/src/deprecated/components/Table/examples/LegacyTableTree.tsx +3 -3
  80. package/src/deprecated/components/Table/examples/Table.md +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/react-table",
3
- "version": "6.6.0",
3
+ "version": "6.6.1-prerelease.1",
4
4
  "description": "This library provides a set of React table components for use with the PatternFly 4",
5
5
  "main": "dist/js/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -40,10 +40,10 @@
40
40
  "subpaths": "node ../../scripts/exportSubpaths.mjs --config subpaths.config.json"
41
41
  },
42
42
  "dependencies": {
43
- "@patternfly/react-core": "^6.6.0",
44
- "@patternfly/react-icons": "^6.6.0",
45
- "@patternfly/react-styles": "^6.6.0",
46
- "@patternfly/react-tokens": "^6.6.0",
43
+ "@patternfly/react-core": "^6.6.1-prerelease.1",
44
+ "@patternfly/react-icons": "^6.6.1-prerelease.0",
45
+ "@patternfly/react-styles": "^6.6.1-prerelease.0",
46
+ "@patternfly/react-tokens": "^6.6.1-prerelease.0",
47
47
  "lodash": "^4.18.1",
48
48
  "tslib": "^2.8.1"
49
49
  },
@@ -51,5 +51,5 @@
51
51
  "react": "^17 || ^18 || ^19",
52
52
  "react-dom": "^17 || ^18 || ^19"
53
53
  },
54
- "gitHead": "6f2385bbcc03de22a7ae8be506481e1b4d653200"
54
+ "gitHead": "759a598cc45873e3b57704a57940614e0079d904"
55
55
  }
@@ -1,7 +1,7 @@
1
1
  import { Fragment } from 'react';
2
2
  import { Button } from '@patternfly/react-core/dist/esm/components/Button';
3
3
  import RhUiEditFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-edit-fill-icon';
4
- import CheckIcon from '@patternfly/react-icons/dist/esm/icons/check-icon';
4
+ import RhMicronsCheckmarkIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-checkmark-icon';
5
5
  import RhMicronsCloseIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-close-icon';
6
6
  import { OnRowEdit } from './TableTypes';
7
7
  import inlineStyles from '@patternfly/react-styles/css/components/InlineEdit/inline-edit';
@@ -38,7 +38,7 @@ export const EditColumn: React.FunctionComponent<EditColumnProps> = ({
38
38
  {...props}
39
39
  onClick={(e) => onClick(e, 'save')}
40
40
  variant="plain"
41
- icon={<CheckIcon />}
41
+ icon={<RhMicronsCheckmarkIcon />}
42
42
  />
43
43
  </div>
44
44
  <div className={css(inlineStyles.inlineEditAction)}>
@@ -1,4 +1,4 @@
1
- import HelpIcon from '@patternfly/react-icons/dist/esm/icons/help-icon';
1
+ import RhUiQuestionMarkCircleIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-question-mark-circle-icon';
2
2
  import { css } from '@patternfly/react-styles';
3
3
  import styles from '@patternfly/react-styles/css/components/Table/table';
4
4
  import { Tooltip, TooltipProps } from '@patternfly/react-core/dist/esm/components/Tooltip';
@@ -55,7 +55,7 @@ export const HeaderCellInfoWrapper: React.FunctionComponent<ColumnHelpWrapperPro
55
55
  variant="plain"
56
56
  hasNoPadding
57
57
  aria-label={ariaLabel || (typeof info === 'string' && info) || 'More info'}
58
- icon={<HelpIcon />}
58
+ icon={<RhUiQuestionMarkCircleIcon />}
59
59
  />
60
60
  </Tooltip>
61
61
  ) : (
@@ -64,7 +64,7 @@ export const HeaderCellInfoWrapper: React.FunctionComponent<ColumnHelpWrapperPro
64
64
  variant="plain"
65
65
  hasNoPadding
66
66
  aria-label={ariaLabel || (typeof info === 'string' && info) || 'More info'}
67
- icon={<HelpIcon />}
67
+ icon={<RhUiQuestionMarkCircleIcon />}
68
68
  />
69
69
  </Popover>
70
70
  )}
@@ -1,7 +1,7 @@
1
1
  import { useState } from 'react';
2
- import LongArrowAltUpIcon from '@patternfly/react-icons/dist/esm/icons/long-arrow-alt-up-icon';
3
- import LongArrowAltDownIcon from '@patternfly/react-icons/dist/esm/icons/long-arrow-alt-down-icon';
4
- import ArrowsAltVIcon from '@patternfly/react-icons/dist/esm/icons/arrows-alt-v-icon';
2
+ import RhMicronsArrowUpIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-arrow-up-icon';
3
+ import RhMicronsArrowDownIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-arrow-down-icon';
4
+ import RhUiArrowUpDownIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-arrow-up-down-icon';
5
5
  import { css } from '@patternfly/react-styles';
6
6
  import styles from '@patternfly/react-styles/css/components/Table/table';
7
7
  import { TableText } from './TableText';
@@ -43,9 +43,9 @@ export const SortColumn: React.FunctionComponent<SortColumnProps> = ({
43
43
  let SortedByIcon;
44
44
  const [focused, setFocused] = useState(false);
45
45
  if (isSortedBy) {
46
- SortedByIcon = sortDirection === SortByDirection.asc ? LongArrowAltUpIcon : LongArrowAltDownIcon;
46
+ SortedByIcon = sortDirection === SortByDirection.asc ? RhMicronsArrowUpIcon : RhMicronsArrowDownIcon;
47
47
  } else {
48
- SortedByIcon = ArrowsAltVIcon;
48
+ SortedByIcon = RhUiArrowUpDownIcon;
49
49
  }
50
50
 
51
51
  if (favoriteButtonProps) {
@@ -4,6 +4,7 @@ import styles from '@patternfly/react-styles/css/components/Table/table';
4
4
  import inlineStyles from '@patternfly/react-styles/css/components/InlineEdit/inline-edit';
5
5
  import { css } from '@patternfly/react-styles';
6
6
  import { TableContext } from './Table';
7
+ import { IS_INERT } from './utils/inert';
7
8
 
8
9
  export interface TrProps extends Omit<React.HTMLProps<HTMLTableRowElement>, 'onResize'>, OUIAProps {
9
10
  /** Content rendered inside the <tr> row */
@@ -115,7 +116,7 @@ const TrBase: React.FunctionComponent<TrProps> = ({
115
116
  {...(isClickable && { tabIndex: 0 })}
116
117
  aria-label={ariaLabel}
117
118
  ref={innerRef}
118
- {...(hasAnimations && rowIsHidden && { inert: '' })}
119
+ {...(hasAnimations && rowIsHidden && { inert: IS_INERT })}
119
120
  {...(onRowClick && { onClick: onRowClick, onKeyDown })}
120
121
  {...ouiaProps}
121
122
  {...props}
@@ -42,18 +42,18 @@ The `Table` component takes an explicit and declarative approach, and its implem
42
42
  The documentation for the deprecated table implementation can be found under the [React deprecated](/components/table/react-deprecated) tab. It is configuration based and takes a less declarative and more implicit approach to laying out the table structure, such as the rows and cells within it.
43
43
 
44
44
  import { Fragment, isValidElement, useCallback, useEffect, useRef, useState, useLayoutEffect } from 'react';
45
- import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
45
+ import RhMicronsSearchIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-search-icon';
46
46
  import RhUiCodeIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-code-icon';
47
47
  import RhUiBranchFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-branch-fill-icon';
48
48
  import CubeIcon from '@patternfly/react-icons/dist/esm/icons/cube-icon';
49
49
  import LeafIcon from '@patternfly/react-icons/dist/esm/icons/leaf-icon';
50
- import FolderIcon from '@patternfly/react-icons/dist/esm/icons/folder-icon';
51
- import FolderOpenIcon from '@patternfly/react-icons/dist/esm/icons/folder-open-icon';
50
+ import RhUiFolderFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-folder-fill-icon';
51
+ import RhUiFolderOpenFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-folder-open-fill-icon';
52
52
  import RhMicronsSortDownLargeToSmallIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-sort-down-large-to-small-icon';
53
53
  import RhUiBlueprintIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-blueprint-icon';
54
54
  import RhUiEditFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-edit-fill-icon';
55
55
  import RhUiEllipsisVerticalFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-ellipsis-vertical-fill-icon';
56
- import CheckIcon from '@patternfly/react-icons/dist/esm/icons/check-icon';
56
+ import RhMicronsCheckmarkIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-checkmark-icon';
57
57
  import RhMicronsCloseIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-close-icon';
58
58
 
59
59
  import { css } from '@patternfly/react-styles';
@@ -2,7 +2,7 @@ import { isValidElement, useRef, useState } from 'react';
2
2
  import { Table, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
3
3
  import { Button, Checkbox, Radio, TextInput, KeyTypes, getUniqueId } from '@patternfly/react-core';
4
4
  import RhUiEditFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-edit-fill-icon';
5
- import CheckIcon from '@patternfly/react-icons/dist/esm/icons/check-icon';
5
+ import RhMicronsCheckmarkIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-checkmark-icon';
6
6
  import RhMicronsCloseIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-close-icon';
7
7
  import inlineEditStyles from '@patternfly/react-styles/css/components/InlineEdit/inline-edit';
8
8
  import { css } from '@patternfly/react-styles';
@@ -50,7 +50,7 @@ const EditButtonsCell: React.FunctionComponent<EditButtonsCellProps> = ({
50
50
  onKeyDown={(event) => onKeyDown(event, 'stopEditing')}
51
51
  variant="plain"
52
52
  >
53
- <CheckIcon />
53
+ <RhMicronsCheckmarkIcon />
54
54
  </Button>
55
55
  </div>
56
56
  <div className={css(inlineEditStyles.inlineEditAction)}>
@@ -8,7 +8,7 @@ import {
8
8
  EmptyStateFooter,
9
9
  EmptyStateActions
10
10
  } from '@patternfly/react-core';
11
- import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
11
+ import RhMicronsSearchIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-search-icon';
12
12
 
13
13
  // This example has been simplified to focus on the empty state. In real usage,
14
14
  // you may want to derive your rows from typed underlying data and minimal state. See other examples.
@@ -28,7 +28,12 @@ export const TableEmptyState: React.FunctionComponent = () => (
28
28
  <Tr>
29
29
  <Td colSpan={8}>
30
30
  <Bullseye>
31
- <EmptyState headingLevel="h2" titleText="No results found" icon={SearchIcon} variant={EmptyStateVariant.sm}>
31
+ <EmptyState
32
+ headingLevel="h2"
33
+ titleText="No results found"
34
+ icon={RhMicronsSearchIcon}
35
+ variant={EmptyStateVariant.sm}
36
+ >
32
37
  <EmptyStateBody>Clear all filters and try again.</EmptyStateBody>
33
38
  <EmptyStateFooter>
34
39
  <EmptyStateActions>
@@ -1,8 +1,8 @@
1
1
  import { useState } from 'react';
2
2
  import { Table, Thead, Tr, Th, Tbody, Td, TreeRowWrapper, TdProps } from '@patternfly/react-table';
3
3
  import LeafIcon from '@patternfly/react-icons/dist/esm/icons/leaf-icon';
4
- import FolderIcon from '@patternfly/react-icons/dist/esm/icons/folder-icon';
5
- import FolderOpenIcon from '@patternfly/react-icons/dist/esm/icons/folder-open-icon';
4
+ import RhUiFolderFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-folder-fill-icon';
5
+ import RhUiFolderOpenFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-folder-open-fill-icon';
6
6
 
7
7
  interface RepositoriesTreeNode {
8
8
  name: string;
@@ -139,7 +139,7 @@ export const TableTree: React.FunctionComponent = () => {
139
139
  const isChecked = isNodeChecked(node);
140
140
  let icon = <LeafIcon />;
141
141
  if (node.children) {
142
- icon = isExpanded ? <FolderOpenIcon /> : <FolderIcon />;
142
+ icon = isExpanded ? <RhUiFolderOpenFillIcon /> : <RhUiFolderFillIcon />;
143
143
  }
144
144
 
145
145
  const treeRow: TdProps['treeRow'] = {
@@ -4,7 +4,7 @@ import styles from '@patternfly/react-styles/css/components/Table/table';
4
4
  import stylesTreeView from '@patternfly/react-styles/css/components/Table/table-tree-view';
5
5
  import { Button } from '@patternfly/react-core/dist/esm/components/Button';
6
6
  import { Checkbox } from '@patternfly/react-core/dist/esm/components/Checkbox';
7
- import RhMicronsCaretDownIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-caret-down-icon';
7
+ import RhMicronsCaretRightIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-caret-right-icon';
8
8
  import RhUiEllipsisHorizontalFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-ellipsis-horizontal-fill-icon';
9
9
 
10
10
  export const treeRow =
@@ -54,7 +54,7 @@ export const treeRow =
54
54
  aria-label={toggleAriaLabel || `${isExpanded ? 'Collapse' : 'Expand'} row ${rowIndex}`}
55
55
  icon={
56
56
  <div className={css(stylesTreeView.tableToggleIcon)}>
57
- <RhMicronsCaretDownIcon />
57
+ <RhMicronsCaretRightIcon />
58
58
  </div>
59
59
  }
60
60
  />
@@ -0,0 +1,7 @@
1
+ import { version } from 'react';
2
+
3
+ /**
4
+ * Before React 19, React JSX treats empty string "" as truthy for inert prop.
5
+ * @see {@link https://stackoverflow.com/questions/72720469}
6
+ */
7
+ export const IS_INERT = Number(version.split('.')[0]) >= 19 ? true : ('' as unknown as boolean);
@@ -24,7 +24,7 @@ import {
24
24
  PageToggleButton
25
25
  } from '@patternfly/react-core';
26
26
  import RhUiSettingsFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-settings-fill-icon';
27
- import HelpIcon from '@patternfly/react-icons/dist/esm/icons/help-icon';
27
+ import RhUiQuestionMarkCircleIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-question-mark-circle-icon';
28
28
  import RhUiQuestionMarkCircleFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-question-mark-circle-fill-icon';
29
29
  import RhUiEllipsisVerticalFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-ellipsis-vertical-fill-icon';
30
30
  import imgAvatar from '@patternfly/react-table/src/demos/assets/avatarImg.svg';
@@ -90,7 +90,7 @@ export const DashboardHeader: React.FC<DashboardHeaderProps> = ({ notificationBa
90
90
  <RhUiSettingsFillIcon /> Settings
91
91
  </DropdownItem>
92
92
  <DropdownItem>
93
- <HelpIcon /> Help
93
+ <RhUiQuestionMarkCircleIcon /> Help
94
94
  </DropdownItem>
95
95
  </>
96
96
  );
@@ -149,7 +149,7 @@ export const DashboardHeader: React.FC<DashboardHeaderProps> = ({ notificationBa
149
149
  <ToolbarItem>
150
150
  <NotificationBadge
151
151
  aria-label="Notifications"
152
- variant={NotificationBadgeVariant.read}
152
+ variant={NotificationBadgeVariant.plain}
153
153
  onClick={() => {}}
154
154
  />
155
155
  </ToolbarItem>
@@ -48,19 +48,18 @@ ModalBody,
48
48
  ModalFooter,
49
49
  } from '@patternfly/react-core';
50
50
  import { DragDropSort } from '@patternfly/react-drag-drop';
51
- import CheckIcon from '@patternfly/react-icons/dist/esm/icons/check-icon';
52
- import CloneIcon from '@patternfly/react-icons/dist/esm/icons/clone-icon';
51
+ import RhUiCopyFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-copy-fill-icon';
53
52
  import RhUiCodeIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-code-icon';
54
53
  import RhUiBranchFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-branch-fill-icon';
55
54
  import CubeIcon from '@patternfly/react-icons/dist/esm/icons/cube-icon';
56
55
  import EditIcon from '@patternfly/react-icons/dist/esm/icons/edit-icon';
57
- import FilterIcon from '@patternfly/react-icons/dist/esm/icons/filter-icon';
58
56
  import RhMicronsSortDownLargeToSmallIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-sort-down-large-to-small-icon';
59
- import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
60
- import SyncIcon from '@patternfly/react-icons/dist/esm/icons/sync-icon';
57
+ import RhUiFilterFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-filter-fill-icon';
58
+ import RhMicronsSearchIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-search-icon';
59
+ import RhUiSyncIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-sync-icon';
61
60
  import RhUiErrorFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-error-fill-icon';
62
61
  import RhUiSettingsFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-settings-fill-icon';
63
- import HelpIcon from '@patternfly/react-icons/dist/esm/icons/help-icon';
62
+ import RhUiQuestionMarkCircleIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-question-mark-circle-icon';
64
63
  import RhUiQuestionMarkCircleFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-question-mark-circle-fill-icon';
65
64
  import RhMicronsCaretDownIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-caret-down-icon';
66
65
  import RhMicronsCaretRightIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-caret-right-icon';
@@ -10,6 +10,7 @@ import {
10
10
  DataListCell,
11
11
  DataListItemCells,
12
12
  Label,
13
+ LabelStatus,
13
14
  Toolbar,
14
15
  ToolbarContent,
15
16
  ToolbarItem,
@@ -26,8 +27,8 @@ import {
26
27
  PaginationVariant
27
28
  } from '@patternfly/react-core';
28
29
  import { Table, TableText, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
29
- import FilterIcon from '@patternfly/react-icons/dist/esm/icons/filter-icon';
30
30
  import RhMicronsSortDownLargeToSmallIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-sort-down-large-to-small-icon';
31
+ import RhUiFilterFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-filter-fill-icon';
31
32
  import { DashboardWrapper } from '@patternfly/react-table/dist/esm/demos/DashboardWrapper';
32
33
  import { capitalize } from '@patternfly/react-table/src/components/Table/utils/utils';
33
34
  import { rows, columns, SampleDataRow } from '@patternfly/react-table/dist/esm/demos/sampleData';
@@ -389,13 +390,13 @@ export const TableColumnManagement: React.FunctionComponent = () => {
389
390
  const renderLabel = (labelText: string): React.JSX.Element => {
390
391
  switch (labelText) {
391
392
  case 'Running':
392
- return <Label color="green">{labelText}</Label>;
393
+ return <Label status={LabelStatus.success}>{labelText}</Label>;
393
394
  case 'Stopped':
394
- return <Label color="orange">{labelText}</Label>;
395
+ return <Label status={LabelStatus.warning}>{labelText}</Label>;
395
396
  case 'Needs maintenance':
396
- return <Label color="blue">{labelText}</Label>;
397
+ return <Label status={LabelStatus.info}>{labelText}</Label>;
397
398
  case 'Down':
398
- return <Label color="red">{labelText}</Label>;
399
+ return <Label status={LabelStatus.danger}>{labelText}</Label>;
399
400
  default:
400
401
  return <></>;
401
402
  }
@@ -411,7 +412,7 @@ export const TableColumnManagement: React.FunctionComponent = () => {
411
412
  <ToolbarItem>
412
413
  <OverflowMenu breakpoint="md">
413
414
  <OverflowMenuItem>
414
- <MenuToggle icon={<FilterIcon />}>Name</MenuToggle>
415
+ <MenuToggle icon={<RhUiFilterFillIcon />}>Name</MenuToggle>
415
416
  </OverflowMenuItem>
416
417
  <OverflowMenuItem>
417
418
  <MenuToggle variant="plain" aria-label="Sort columns" icon={<RhMicronsSortDownLargeToSmallIcon />} />
@@ -9,6 +9,7 @@ import {
9
9
  DataListItemCells,
10
10
  DataListControl,
11
11
  Label,
12
+ LabelStatus,
12
13
  Toolbar,
13
14
  ToolbarContent,
14
15
  ToolbarItem,
@@ -26,8 +27,8 @@ import {
26
27
  } from '@patternfly/react-core';
27
28
  import { Table, TableText, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
28
29
  import { DragDropSort } from '@patternfly/react-drag-drop';
29
- import FilterIcon from '@patternfly/react-icons/dist/esm/icons/filter-icon';
30
30
  import RhMicronsSortDownLargeToSmallIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-sort-down-large-to-small-icon';
31
+ import RhUiFilterFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-filter-fill-icon';
31
32
  import { DashboardWrapper } from '@patternfly/react-table/dist/esm/demos/DashboardWrapper';
32
33
  import { capitalize } from '@patternfly/react-table/src/components/Table/utils/utils';
33
34
  import { rows, columns, SampleDataRow } from '@patternfly/react-table/dist/esm/demos/sampleData';
@@ -284,13 +285,13 @@ export const TableColumnManagement: React.FunctionComponent = () => {
284
285
  const renderLabel = (labelText: string): React.JSX.Element => {
285
286
  switch (labelText) {
286
287
  case 'Running':
287
- return <Label color="green">{labelText}</Label>;
288
+ return <Label status={LabelStatus.success}>{labelText}</Label>;
288
289
  case 'Stopped':
289
- return <Label color="orange">{labelText}</Label>;
290
+ return <Label status={LabelStatus.warning}>{labelText}</Label>;
290
291
  case 'Needs maintenance':
291
- return <Label color="blue">{labelText}</Label>;
292
+ return <Label status={LabelStatus.info}>{labelText}</Label>;
292
293
  case 'Down':
293
- return <Label color="red">{labelText}</Label>;
294
+ return <Label status={LabelStatus.danger}>{labelText}</Label>;
294
295
  default:
295
296
  return <></>;
296
297
  }
@@ -306,7 +307,7 @@ export const TableColumnManagement: React.FunctionComponent = () => {
306
307
  <ToolbarItem>
307
308
  <OverflowMenu breakpoint="md">
308
309
  <OverflowMenuItem>
309
- <MenuToggle icon={<FilterIcon />}>Name</MenuToggle>
310
+ <MenuToggle icon={<RhUiFilterFillIcon />}>Name</MenuToggle>
310
311
  </OverflowMenuItem>
311
312
  <OverflowMenuItem>
312
313
  <MenuToggle
@@ -12,10 +12,11 @@ import {
12
12
  ToolbarGroup,
13
13
  ToolbarItem,
14
14
  Label,
15
+ LabelStatus,
15
16
  PaginationVariant
16
17
  } from '@patternfly/react-core';
17
18
  import { Table, TableText, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
18
- import FilterIcon from '@patternfly/react-icons/dist/esm/icons/filter-icon';
19
+ import RhUiFilterFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-filter-fill-icon';
19
20
  import { rows, columns } from '@patternfly/react-table/dist/esm/demos/sampleData';
20
21
  import { DashboardWrapper } from '@patternfly/react-table/dist/esm/demos/DashboardWrapper';
21
22
 
@@ -72,7 +73,7 @@ export const TableCompact: React.FunctionComponent = () => {
72
73
  aria-label="Select Input"
73
74
  toggle={(toggleRef: React.Ref<MenuToggleElement>) => (
74
75
  <MenuToggle
75
- icon={<FilterIcon />}
76
+ icon={<RhUiFilterFillIcon />}
76
77
  ref={toggleRef}
77
78
  onClick={() => setIsSelectOpen(!isSelectOpen)}
78
79
  isExpanded={isSelectOpen}
@@ -113,13 +114,13 @@ export const TableCompact: React.FunctionComponent = () => {
113
114
  const renderLabel = (labelText: string) => {
114
115
  switch (labelText) {
115
116
  case 'Running':
116
- return <Label color="green">{labelText}</Label>;
117
+ return <Label status={LabelStatus.success}>{labelText}</Label>;
117
118
  case 'Stopped':
118
- return <Label color="orange">{labelText}</Label>;
119
- case 'Needs Maintenance':
120
- return <Label color="blue">{labelText}</Label>;
119
+ return <Label status={LabelStatus.warning}>{labelText}</Label>;
120
+ case 'Needs maintenance':
121
+ return <Label status={LabelStatus.info}>{labelText}</Label>;
121
122
  case 'Down':
122
- return <Label color="red">{labelText}</Label>;
123
+ return <Label status={LabelStatus.danger}>{labelText}</Label>;
123
124
  default:
124
125
  return <></>;
125
126
  }
@@ -20,7 +20,7 @@ import RhUiCodeIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-code-icon
20
20
  import RhUiBranchFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-branch-fill-icon';
21
21
  import CubeIcon from '@patternfly/react-icons/dist/esm/icons/cube-icon';
22
22
  import { DashboardWrapper } from '@patternfly/react-table/dist/esm/demos/DashboardWrapper';
23
- import FilterIcon from '@patternfly/react-icons/dist/esm/icons/filter-icon';
23
+ import RhUiFilterFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-filter-fill-icon';
24
24
 
25
25
  export const TableCompoundExpansion: React.FunctionComponent = () => {
26
26
  // In real usage, this data would come from some external source like an API via props.
@@ -93,7 +93,7 @@ export const TableCompoundExpansion: React.FunctionComponent = () => {
93
93
  ref={toggleRef}
94
94
  onClick={() => setIsSelectOpen(!isSelectOpen)}
95
95
  isExpanded={isSelectOpen}
96
- icon={<FilterIcon />}
96
+ icon={<RhUiFilterFillIcon />}
97
97
  >
98
98
  Status
99
99
  </MenuToggle>
@@ -9,7 +9,7 @@ import {
9
9
  EmptyStateActions,
10
10
  PageSection
11
11
  } from '@patternfly/react-core';
12
- import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
12
+ import RhMicronsSearchIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-search-icon';
13
13
  import { DashboardWrapper } from '@patternfly/react-table/dist/esm/demos/DashboardWrapper';
14
14
 
15
15
  export const TableEmptyStateDefault: React.FunctionComponent = () => (
@@ -31,7 +31,7 @@ export const TableEmptyStateDefault: React.FunctionComponent = () => (
31
31
  <Bullseye>
32
32
  <EmptyState
33
33
  titleText="No results found"
34
- icon={SearchIcon}
34
+ icon={RhMicronsSearchIcon}
35
35
  headingLevel="h2"
36
36
  variant={EmptyStateVariant.sm}
37
37
  >
@@ -1,5 +1,5 @@
1
1
  import { Fragment, ReactNode, useEffect, useState } from 'react';
2
- import { Content, Label, PageSection } from '@patternfly/react-core';
2
+ import { Content, Label, LabelStatus, PageSection } from '@patternfly/react-core';
3
3
  import { Table, Thead, Tbody, Tr, Th, Td, ExpandableRowContent } from '@patternfly/react-table';
4
4
  import { DashboardWrapper } from '@patternfly/react-table/dist/esm/demos/DashboardWrapper';
5
5
 
@@ -20,7 +20,7 @@ const serverData: Server[] = [
20
20
  threads: 18,
21
21
  applications: 42,
22
22
  workspaces: 7,
23
- status: { title: <Label color="green">Running</Label> },
23
+ status: { title: <Label status={LabelStatus.success}>Running</Label> },
24
24
  details: (
25
25
  <Content>
26
26
  <p>
@@ -40,7 +40,7 @@ const serverData: Server[] = [
40
40
  threads: 9,
41
41
  applications: 24,
42
42
  workspaces: 17,
43
- status: { title: <Label color="red">Down</Label> },
43
+ status: { title: <Label status={LabelStatus.danger}>Down</Label> },
44
44
  details: (
45
45
  <Content>
46
46
  <p>
@@ -60,7 +60,7 @@ const serverData: Server[] = [
60
60
  threads: 8,
61
61
  applications: 47,
62
62
  workspaces: 3,
63
- status: { title: <Label color="green">Running</Label> },
63
+ status: { title: <Label status={LabelStatus.success}>Running</Label> },
64
64
  details: (
65
65
  <Content>
66
66
  <p>
@@ -80,7 +80,7 @@ const serverData: Server[] = [
80
80
  threads: 6,
81
81
  applications: 4,
82
82
  workspaces: 15,
83
- status: { title: <Label color="blue">Needs Maintenance</Label> },
83
+ status: { title: <Label status={LabelStatus.info}>Needs Maintenance</Label> },
84
84
  details: (
85
85
  <Content>
86
86
  <p>
@@ -100,7 +100,7 @@ const serverData: Server[] = [
100
100
  threads: 9,
101
101
  applications: 24,
102
102
  workspaces: 17,
103
- status: { title: <Label color="orange">Stopped</Label> },
103
+ status: { title: <Label status={LabelStatus.warning}>Stopped</Label> },
104
104
  details: (
105
105
  <Content>
106
106
  <p>
@@ -8,6 +8,7 @@ import {
8
8
  EmptyStateBody,
9
9
  EmptyStateFooter,
10
10
  Label,
11
+ LabelStatus,
11
12
  MenuToggle,
12
13
  MenuToggleElement,
13
14
  Toolbar,
@@ -21,8 +22,8 @@ import {
21
22
  SearchInput,
22
23
  ToolbarLabelGroup
23
24
  } from '@patternfly/react-core';
24
- import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
25
- import FilterIcon from '@patternfly/react-icons/dist/esm/icons/filter-icon';
25
+ import RhMicronsSearchIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-search-icon';
26
+ import RhUiFilterFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-filter-fill-icon';
26
27
  import { Table, TableText, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
27
28
  import { rows, columns } from '@patternfly/react-table/dist/esm/demos/sampleData';
28
29
 
@@ -125,7 +126,7 @@ export const TableFilterable: React.FunctionComponent = () => {
125
126
  ref={toggleRef}
126
127
  onClick={onCategoryToggle}
127
128
  isExpanded={isCategoryDropdownOpen}
128
- icon={<FilterIcon />}
129
+ icon={<RhUiFilterFillIcon />}
129
130
  style={
130
131
  {
131
132
  width: '100%',
@@ -276,7 +277,7 @@ export const TableFilterable: React.FunctionComponent = () => {
276
277
  collapseListedFiltersBreakpoint="xl"
277
278
  >
278
279
  <ToolbarContent>
279
- <ToolbarToggleGroup toggleIcon={<FilterIcon />} breakpoint="xl">
280
+ <ToolbarToggleGroup toggleIcon={<RhUiFilterFillIcon />} breakpoint="xl">
280
281
  <ToolbarGroup
281
282
  variant="filter-group"
282
283
  style={
@@ -306,7 +307,7 @@ export const TableFilterable: React.FunctionComponent = () => {
306
307
  : rowData;
307
308
 
308
309
  const emptyState = (
309
- <EmptyState icon={SearchIcon} titleText="Clear all filters and try again." headingLevel="h5">
310
+ <EmptyState icon={RhMicronsSearchIcon} titleText="Clear all filters and try again." headingLevel="h5">
310
311
  <EmptyStateBody>No results match the filter criteria. Clear all filters and try again.</EmptyStateBody>
311
312
  <EmptyStateFooter>
312
313
  <EmptyStateActions>
@@ -326,13 +327,13 @@ export const TableFilterable: React.FunctionComponent = () => {
326
327
  const renderLabel = (labelText: string) => {
327
328
  switch (labelText) {
328
329
  case 'Running':
329
- return <Label color="green">{labelText}</Label>;
330
+ return <Label status={LabelStatus.success}>{labelText}</Label>;
330
331
  case 'Stopped':
331
- return <Label color="orange">{labelText}</Label>;
332
+ return <Label status={LabelStatus.warning}>{labelText}</Label>;
332
333
  case 'Needs maintenance':
333
- return <Label color="blue">{labelText}</Label>;
334
+ return <Label status={LabelStatus.info}>{labelText}</Label>;
334
335
  case 'Down':
335
- return <Label color="red">{labelText}</Label>;
336
+ return <Label status={LabelStatus.danger}>{labelText}</Label>;
336
337
  }
337
338
  };
338
339
 
@@ -20,6 +20,7 @@ import {
20
20
  OverflowMenuDropdownItem,
21
21
  PaginationVariant,
22
22
  Label,
23
+ LabelStatus,
23
24
  Select,
24
25
  OverflowMenu,
25
26
  OverflowMenuContent,
@@ -29,9 +30,9 @@ import {
29
30
  PageSectionVariants
30
31
  } from '@patternfly/react-core';
31
32
  import { Table, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
32
- import CloneIcon from '@patternfly/react-icons/dist/esm/icons/clone-icon';
33
+ import RhUiCopyFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-copy-fill-icon';
33
34
  import EditIcon from '@patternfly/react-icons/dist/esm/icons/edit-icon';
34
- import SyncIcon from '@patternfly/react-icons/dist/esm/icons/sync-icon';
35
+ import RhUiSyncIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-sync-icon';
35
36
  import RhUiCodeIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-code-icon';
36
37
  import RhMicronsSortDownLargeToSmallIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-sort-down-large-to-small-icon';
37
38
  import RhUiBranchFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-branch-fill-icon';
@@ -120,13 +121,13 @@ export const TableSortableResponsive: React.FunctionComponent = () => {
120
121
  const renderLabel = (labelText: string) => {
121
122
  switch (labelText) {
122
123
  case 'Running':
123
- return <Label color="green">{labelText}</Label>;
124
+ return <Label status={LabelStatus.success}>{labelText}</Label>;
124
125
  case 'Stopped':
125
- return <Label color="orange">{labelText}</Label>;
126
- case 'Needs Maintenance':
127
- return <Label color="blue">{labelText}</Label>;
126
+ return <Label status={LabelStatus.warning}>{labelText}</Label>;
127
+ case 'Needs maintenance':
128
+ return <Label status={LabelStatus.info}>{labelText}</Label>;
128
129
  case 'Down':
129
- return <Label color="red">{labelText}</Label>;
130
+ return <Label status={LabelStatus.danger}>{labelText}</Label>;
130
131
  }
131
132
  };
132
133
 
@@ -214,10 +215,10 @@ export const TableSortableResponsive: React.FunctionComponent = () => {
214
215
  <Button aria-label="Edit" variant="plain" icon={<EditIcon />} />
215
216
  </ToolbarItem>
216
217
  <ToolbarItem>
217
- <Button aria-label="Clone" variant="plain" icon={<CloneIcon />} />
218
+ <Button aria-label="Clone" variant="plain" icon={<RhUiCopyFillIcon />} />
218
219
  </ToolbarItem>
219
220
  <ToolbarItem>
220
- <Button aria-label="Sync" variant="plain" icon={<SyncIcon />} />
221
+ <Button aria-label="Sync" variant="plain" icon={<RhUiSyncIcon />} />
221
222
  </ToolbarItem>
222
223
  </ToolbarGroup>
223
224
  <ToolbarItem variant="pagination">{renderPagination('top', true)}</ToolbarItem>