@patternfly/react-table 6.5.0-prerelease.5 → 6.5.0-prerelease.50
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.
- package/CHANGELOG.md +184 -0
- package/README.md +1 -1
- package/components/package.json +1 -1
- package/deprecated/package.json +1 -1
- package/dist/dynamic/components/Table/package.json +1 -1
- package/dist/dynamic/components/Table/utils/decorators/package.json +1 -1
- package/dist/dynamic/components/Table/utils/package.json +1 -1
- package/dist/dynamic/deprecated/components/Table/base/package.json +1 -1
- package/dist/dynamic/deprecated/components/Table/package.json +1 -1
- package/dist/dynamic/deprecated/components/package.json +1 -1
- package/dist/esm/components/Table/CollapseColumn.js +2 -2
- package/dist/esm/components/Table/CollapseColumn.js.map +1 -1
- package/dist/esm/components/Table/EditColumn.js +2 -2
- package/dist/esm/components/Table/EditColumn.js.map +1 -1
- package/dist/esm/components/Table/EditableSelectInputCell.d.ts.map +1 -1
- package/dist/esm/components/Table/EditableSelectInputCell.js.map +1 -1
- package/dist/esm/components/Table/Table.d.ts +2 -0
- package/dist/esm/components/Table/Table.d.ts.map +1 -1
- package/dist/esm/components/Table/Table.js +3 -3
- package/dist/esm/components/Table/Table.js.map +1 -1
- package/dist/esm/components/Table/Th.d.ts.map +1 -1
- package/dist/esm/components/Table/Th.js.map +1 -1
- package/dist/esm/components/Table/utils/decorators/treeRow.js +2 -2
- package/dist/esm/components/Table/utils/decorators/treeRow.js.map +1 -1
- package/dist/js/components/Table/CollapseColumn.js +2 -2
- package/dist/js/components/Table/CollapseColumn.js.map +1 -1
- package/dist/js/components/Table/EditColumn.js +2 -2
- package/dist/js/components/Table/EditColumn.js.map +1 -1
- package/dist/js/components/Table/EditableSelectInputCell.d.ts.map +1 -1
- package/dist/js/components/Table/EditableSelectInputCell.js.map +1 -1
- package/dist/js/components/Table/Table.d.ts +2 -0
- package/dist/js/components/Table/Table.d.ts.map +1 -1
- package/dist/js/components/Table/Table.js +3 -3
- package/dist/js/components/Table/Table.js.map +1 -1
- package/dist/js/components/Table/Th.d.ts.map +1 -1
- package/dist/js/components/Table/Th.js.map +1 -1
- package/dist/js/components/Table/utils/decorators/treeRow.js +2 -2
- package/dist/js/components/Table/utils/decorators/treeRow.js.map +1 -1
- package/dist/umd/assets/{output-CHkV-iRK.css → output-DyMfTqZv.css} +6726 -6584
- package/dist/umd/react-table.min.js +5 -5
- package/package.json +7 -7
- package/src/components/Table/CollapseColumn.tsx +2 -2
- package/src/components/Table/EditColumn.tsx +2 -2
- package/src/components/Table/EditableSelectInputCell.tsx +4 -2
- package/src/components/Table/Table.tsx +4 -0
- package/src/components/Table/Th.tsx +1 -2
- package/src/components/Table/__tests__/Table.test.tsx +36 -0
- package/src/components/Table/__tests__/__snapshots__/RowWrapper.test.tsx.snap +2 -2
- package/src/components/Table/__tests__/__snapshots__/Table.test.tsx.snap +1 -1
- package/src/components/Table/__tests__/__snapshots__/Tr.test.tsx.snap +2 -2
- package/src/components/Table/examples/Table.md +6 -3
- package/src/components/Table/examples/TableActions.tsx +4 -9
- package/src/components/Table/examples/TableBasic.tsx +5 -10
- package/src/components/Table/examples/TableEditable.tsx +2 -2
- package/src/components/Table/utils/decorators/treeRow.tsx +2 -2
- package/src/demos/Table.md +4 -5
- package/src/demos/examples/TableEmptyStateError.tsx +2 -2
- package/src/deprecated/components/Table/__tests__/__snapshots__/Table.test.tsx.snap +937 -469
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-table",
|
|
3
|
-
"version": "6.5.0-prerelease.
|
|
3
|
+
"version": "6.5.0-prerelease.50",
|
|
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,16 +40,16 @@
|
|
|
40
40
|
"subpaths": "node ../../scripts/exportSubpaths.mjs --config subpaths.config.json"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@patternfly/react-core": "^6.5.0-prerelease.
|
|
44
|
-
"@patternfly/react-icons": "^6.5.0-prerelease.
|
|
45
|
-
"@patternfly/react-styles": "^6.5.0-prerelease.
|
|
46
|
-
"@patternfly/react-tokens": "^6.5.0-prerelease.
|
|
47
|
-
"lodash": "^4.17.
|
|
43
|
+
"@patternfly/react-core": "^6.5.0-prerelease.49",
|
|
44
|
+
"@patternfly/react-icons": "^6.5.0-prerelease.20",
|
|
45
|
+
"@patternfly/react-styles": "^6.5.0-prerelease.15",
|
|
46
|
+
"@patternfly/react-tokens": "^6.5.0-prerelease.14",
|
|
47
|
+
"lodash": "^4.17.23",
|
|
48
48
|
"tslib": "^2.8.1"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"react": "^17 || ^18 || ^19",
|
|
52
52
|
"react-dom": "^17 || ^18 || ^19"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "a7a847c33ba834994e3a1db186ee071e7fbdd7ad"
|
|
55
55
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fragment } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import RhMicronsCaretDownIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-caret-down-icon';
|
|
3
3
|
import { css } from '@patternfly/react-styles';
|
|
4
4
|
import { Button } from '@patternfly/react-core/dist/esm/components/Button';
|
|
5
5
|
import styles from '@patternfly/react-styles/css/components/Table/table';
|
|
@@ -34,7 +34,7 @@ export const CollapseColumn: React.FunctionComponent<CollapseColumnProps> = ({
|
|
|
34
34
|
aria-expanded={isOpen}
|
|
35
35
|
icon={
|
|
36
36
|
<div className={css(styles.tableToggleIcon)}>
|
|
37
|
-
<
|
|
37
|
+
<RhMicronsCaretDownIcon />
|
|
38
38
|
</div>
|
|
39
39
|
}
|
|
40
40
|
/>
|
|
@@ -2,7 +2,7 @@ import { Fragment } from 'react';
|
|
|
2
2
|
import { Button } from '@patternfly/react-core/dist/esm/components/Button';
|
|
3
3
|
import PencilAltIcon from '@patternfly/react-icons/dist/esm/icons/pencil-alt-icon';
|
|
4
4
|
import CheckIcon from '@patternfly/react-icons/dist/esm/icons/check-icon';
|
|
5
|
-
import
|
|
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';
|
|
8
8
|
import { css } from '@patternfly/react-styles';
|
|
@@ -47,7 +47,7 @@ export const EditColumn: React.FunctionComponent<EditColumnProps> = ({
|
|
|
47
47
|
{...props}
|
|
48
48
|
onClick={(e) => onClick(e, 'cancel')}
|
|
49
49
|
variant="plain"
|
|
50
|
-
icon={<
|
|
50
|
+
icon={<RhMicronsCloseIcon />}
|
|
51
51
|
/>
|
|
52
52
|
</div>
|
|
53
53
|
</div>
|
|
@@ -6,8 +6,10 @@ import inlineStyles from '@patternfly/react-styles/css/components/InlineEdit/inl
|
|
|
6
6
|
import formStyles from '@patternfly/react-styles/css/components/Form/form';
|
|
7
7
|
import { EditableSelectInputProps } from './base/types';
|
|
8
8
|
|
|
9
|
-
export interface IEditableSelectInputCell
|
|
10
|
-
|
|
9
|
+
export interface IEditableSelectInputCell extends Omit<
|
|
10
|
+
React.HTMLProps<HTMLElement | HTMLDivElement>,
|
|
11
|
+
'onSelect' | 'onToggle'
|
|
12
|
+
> {
|
|
11
13
|
/** Row index of this select input cell */
|
|
12
14
|
rowIndex: number;
|
|
13
15
|
/** Cell index of this select input cell */
|
|
@@ -50,6 +50,8 @@ export interface TableProps extends React.HTMLProps<HTMLTableElement>, OUIAProps
|
|
|
50
50
|
role?: string;
|
|
51
51
|
/** @beta Flag indicating if the table should have plain styling with a transparent background */
|
|
52
52
|
isPlain?: boolean;
|
|
53
|
+
/** @beta Flag indicating if the table should not have plain styling when in the glass theme */
|
|
54
|
+
isNoPlainOnGlass?: boolean;
|
|
53
55
|
/** If set to true, the table header sticks to the top of its container */
|
|
54
56
|
isStickyHeader?: boolean;
|
|
55
57
|
/** @hide Forwarded ref */
|
|
@@ -97,6 +99,7 @@ const TableBase: React.FunctionComponent<TableProps> = ({
|
|
|
97
99
|
borders = true,
|
|
98
100
|
isStickyHeader = false,
|
|
99
101
|
isPlain = false,
|
|
102
|
+
isNoPlainOnGlass = false,
|
|
100
103
|
gridBreakPoint = TableGridBreakpoint.gridMd,
|
|
101
104
|
'aria-label': ariaLabel,
|
|
102
105
|
role = 'grid',
|
|
@@ -226,6 +229,7 @@ const TableBase: React.FunctionComponent<TableProps> = ({
|
|
|
226
229
|
isStriped && styles.modifiers.striped,
|
|
227
230
|
isExpandable && styles.modifiers.expandable,
|
|
228
231
|
isPlain && styles.modifiers.plain,
|
|
232
|
+
isNoPlainOnGlass && styles.modifiers.noPlainOnGlass,
|
|
229
233
|
hasNoInset && stylesTreeView.modifiers.noInset,
|
|
230
234
|
isNested && 'pf-m-nested',
|
|
231
235
|
hasAnimations && styles.modifiers.animateExpand
|
|
@@ -15,8 +15,7 @@ import cssStickyCellInlineStart from '@patternfly/react-tokens/dist/esm/c_table_
|
|
|
15
15
|
import cssStickyCellInlineEnd from '@patternfly/react-tokens/dist/esm/c_table__sticky_cell_InsetInlineEnd';
|
|
16
16
|
|
|
17
17
|
export interface ThProps
|
|
18
|
-
extends BaseCellProps,
|
|
19
|
-
Omit<React.HTMLProps<HTMLTableHeaderCellElement>, 'onSelect' | 'width'> {
|
|
18
|
+
extends BaseCellProps, Omit<React.HTMLProps<HTMLTableHeaderCellElement>, 'onSelect' | 'width'> {
|
|
20
19
|
/**
|
|
21
20
|
* The column header the cell corresponds to. Applicable when this component is used as a direct child to <Tr>.
|
|
22
21
|
* This attribute replaces table header in mobile viewport. It is rendered by ::before pseudo element.
|
|
@@ -150,3 +150,39 @@ test('Renders expandable toggle button in Th with pf-m-small class when variant
|
|
|
150
150
|
expect(button).toHaveClass('pf-m-small');
|
|
151
151
|
});
|
|
152
152
|
});
|
|
153
|
+
|
|
154
|
+
test(`Renders with class ${styles.modifiers.plain} when isPlain is true`, () => {
|
|
155
|
+
render(<Table isPlain aria-label="Test table" />);
|
|
156
|
+
|
|
157
|
+
expect(screen.getByRole('grid', { name: 'Test table' })).toHaveClass(styles.modifiers.plain);
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
test(`Does not render with class ${styles.modifiers.plain} when isPlain is not defined`, () => {
|
|
161
|
+
render(<Table aria-label="Test table" />);
|
|
162
|
+
|
|
163
|
+
expect(screen.getByRole('grid', { name: 'Test table' })).not.toHaveClass(styles.modifiers.plain);
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
test(`Does not render with class ${styles.modifiers.plain} when isPlain is false`, () => {
|
|
167
|
+
render(<Table isPlain={false} aria-label="Test table" />);
|
|
168
|
+
|
|
169
|
+
expect(screen.getByRole('grid', { name: 'Test table' })).not.toHaveClass(styles.modifiers.plain);
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
test(`Renders with class ${styles.modifiers.noPlainOnGlass} when isNoPlainOnGlass is true`, () => {
|
|
173
|
+
render(<Table isNoPlainOnGlass aria-label="Test table" />);
|
|
174
|
+
|
|
175
|
+
expect(screen.getByRole('grid', { name: 'Test table' })).toHaveClass(styles.modifiers.noPlainOnGlass);
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
test(`Does not render with class ${styles.modifiers.noPlainOnGlass} when isNoPlainOnGlass is undefined`, () => {
|
|
179
|
+
render(<Table aria-label="Test table" />);
|
|
180
|
+
|
|
181
|
+
expect(screen.getByRole('grid', { name: 'Test table' })).not.toHaveClass(styles.modifiers.noPlainOnGlass);
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
test(`Does not render with class ${styles.modifiers.noPlainOnGlass} when isNoPlainOnGlass is false`, () => {
|
|
185
|
+
render(<Table isNoPlainOnGlass={false} aria-label="Test table" />);
|
|
186
|
+
|
|
187
|
+
expect(screen.getByRole('grid', { name: 'Test table' })).not.toHaveClass(styles.modifiers.noPlainOnGlass);
|
|
188
|
+
});
|
|
@@ -6,7 +6,7 @@ exports[`RowWrapper renders correctly 1`] = `
|
|
|
6
6
|
<tbody>
|
|
7
7
|
<tr
|
|
8
8
|
class="pf-v6-c-table__tr"
|
|
9
|
-
data-ouia-component-id="OUIA-Generated-TableRow
|
|
9
|
+
data-ouia-component-id="OUIA-Generated-TableRow-:r0:"
|
|
10
10
|
data-ouia-component-type="PF6/TableRow"
|
|
11
11
|
data-ouia-safe="true"
|
|
12
12
|
/>
|
|
@@ -21,7 +21,7 @@ exports[`RowWrapper renders expanded correctly 1`] = `
|
|
|
21
21
|
<tbody>
|
|
22
22
|
<tr
|
|
23
23
|
class="pf-v6-c-table__tr pf-v6-c-table__expandable-row pf-m-expanded"
|
|
24
|
-
data-ouia-component-id="OUIA-Generated-TableRow
|
|
24
|
+
data-ouia-component-id="OUIA-Generated-TableRow-:r1:"
|
|
25
25
|
data-ouia-component-type="PF6/TableRow"
|
|
26
26
|
data-ouia-safe="true"
|
|
27
27
|
/>
|
|
@@ -4,7 +4,7 @@ exports[`Matches snapshot without children 1`] = `
|
|
|
4
4
|
<DocumentFragment>
|
|
5
5
|
<table
|
|
6
6
|
class="pf-v6-c-table pf-m-grid-md"
|
|
7
|
-
data-ouia-component-id="OUIA-Generated-Table
|
|
7
|
+
data-ouia-component-id="OUIA-Generated-Table-:rb:"
|
|
8
8
|
data-ouia-component-type="PF6/Table"
|
|
9
9
|
data-ouia-safe="true"
|
|
10
10
|
role="grid"
|
|
@@ -6,7 +6,7 @@ exports[`Matches snapshot with children 1`] = `
|
|
|
6
6
|
<tbody>
|
|
7
7
|
<tr
|
|
8
8
|
class="pf-v6-c-table__tr"
|
|
9
|
-
data-ouia-component-id="OUIA-Generated-TableRow
|
|
9
|
+
data-ouia-component-id="OUIA-Generated-TableRow-:r5:"
|
|
10
10
|
data-ouia-component-type="PF6/TableRow"
|
|
11
11
|
data-ouia-safe="true"
|
|
12
12
|
>
|
|
@@ -25,7 +25,7 @@ exports[`Matches snapshot without children 1`] = `
|
|
|
25
25
|
<tbody>
|
|
26
26
|
<tr
|
|
27
27
|
class="pf-v6-c-table__tr"
|
|
28
|
-
data-ouia-component-id="OUIA-Generated-TableRow
|
|
28
|
+
data-ouia-component-id="OUIA-Generated-TableRow-:r4:"
|
|
29
29
|
data-ouia-component-type="PF6/TableRow"
|
|
30
30
|
data-ouia-safe="true"
|
|
31
31
|
/>
|
|
@@ -54,7 +54,7 @@ import BlueprintIcon from '@patternfly/react-icons/dist/esm/icons/blueprint-icon
|
|
|
54
54
|
import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon';
|
|
55
55
|
import PencilAltIcon from '@patternfly/react-icons/dist/esm/icons/pencil-alt-icon';
|
|
56
56
|
import CheckIcon from '@patternfly/react-icons/dist/esm/icons/check-icon';
|
|
57
|
-
import
|
|
57
|
+
import RhMicronsCloseIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-close-icon';
|
|
58
58
|
|
|
59
59
|
import { css } from '@patternfly/react-styles';
|
|
60
60
|
import styles from '@patternfly/react-styles/css/components/Table/table';
|
|
@@ -78,10 +78,13 @@ Some general notes:
|
|
|
78
78
|
```ts file="TableBasic.tsx"
|
|
79
79
|
|
|
80
80
|
```
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
|
|
82
|
+
### Plain
|
|
83
|
+
|
|
84
|
+
```ts file="TablePlain.tsx"
|
|
83
85
|
|
|
84
86
|
```
|
|
87
|
+
|
|
85
88
|
### Custom row wrapper, header tooltips & popovers
|
|
86
89
|
|
|
87
90
|
- If you add the `noWrap` prop to `Thead`, it won't wrap it if there is no space
|
|
@@ -23,7 +23,7 @@ interface Repository {
|
|
|
23
23
|
singleAction: string;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
type ExampleType = '
|
|
26
|
+
type ExampleType = 'customToggle';
|
|
27
27
|
|
|
28
28
|
export const TableActions: React.FunctionComponent = () => {
|
|
29
29
|
// In real usage, this data would come from some external source like an API via props.
|
|
@@ -45,10 +45,11 @@ export const TableActions: React.FunctionComponent = () => {
|
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
// This state is just for the ToggleGroup in this example and isn't necessary for Table usage.
|
|
48
|
-
const [exampleChoice, setExampleChoice] = useState<ExampleType>('
|
|
48
|
+
const [exampleChoice, setExampleChoice] = useState<ExampleType | ''>('');
|
|
49
49
|
const onExampleTypeChange: ToggleGroupItemProps['onChange'] = (event, _isSelected) => {
|
|
50
50
|
const id = event.currentTarget.id;
|
|
51
|
-
|
|
51
|
+
// Allow toggling off if clicking the already selected item
|
|
52
|
+
setExampleChoice(exampleChoice === id ? '' : (id as ExampleType));
|
|
52
53
|
};
|
|
53
54
|
|
|
54
55
|
const customActionsToggle = (props: CustomActionsToggleProps) => (
|
|
@@ -95,12 +96,6 @@ export const TableActions: React.FunctionComponent = () => {
|
|
|
95
96
|
return (
|
|
96
97
|
<Fragment>
|
|
97
98
|
<ToggleGroup aria-label="Default uses kebab toggle">
|
|
98
|
-
<ToggleGroupItem
|
|
99
|
-
text="Default actions toggle"
|
|
100
|
-
buttonId="defaultToggle"
|
|
101
|
-
isSelected={exampleChoice === 'defaultToggle'}
|
|
102
|
-
onChange={onExampleTypeChange}
|
|
103
|
-
/>
|
|
104
99
|
<ToggleGroupItem
|
|
105
100
|
text="Custom actions toggle"
|
|
106
101
|
buttonId="customToggle"
|
|
@@ -10,7 +10,7 @@ interface Repository {
|
|
|
10
10
|
lastCommit: string;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
type ExampleType = '
|
|
13
|
+
type ExampleType = 'compact' | 'compactBorderless';
|
|
14
14
|
|
|
15
15
|
export const TableBasic: React.FunctionComponent = () => {
|
|
16
16
|
// In real usage, this data would come from some external source like an API via props.
|
|
@@ -29,21 +29,16 @@ export const TableBasic: React.FunctionComponent = () => {
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
// This state is just for the ToggleGroup in this example and isn't necessary for Table usage.
|
|
32
|
-
const [exampleChoice, setExampleChoice] = useState<ExampleType>('
|
|
32
|
+
const [exampleChoice, setExampleChoice] = useState<ExampleType | ''>('');
|
|
33
33
|
const onExampleTypeChange: ToggleGroupItemProps['onChange'] = (event, _isSelected) => {
|
|
34
34
|
const id = event.currentTarget.id;
|
|
35
|
-
|
|
35
|
+
// Allow toggling off if clicking the already selected item
|
|
36
|
+
setExampleChoice(exampleChoice === id ? '' : (id as ExampleType));
|
|
36
37
|
};
|
|
37
38
|
|
|
38
39
|
return (
|
|
39
40
|
<Fragment>
|
|
40
41
|
<ToggleGroup aria-label="Default with single selectable">
|
|
41
|
-
<ToggleGroupItem
|
|
42
|
-
text="Default"
|
|
43
|
-
buttonId="default"
|
|
44
|
-
isSelected={exampleChoice === 'default'}
|
|
45
|
-
onChange={onExampleTypeChange}
|
|
46
|
-
/>
|
|
47
42
|
<ToggleGroupItem
|
|
48
43
|
text="Compact"
|
|
49
44
|
buttonId="compact"
|
|
@@ -59,7 +54,7 @@ export const TableBasic: React.FunctionComponent = () => {
|
|
|
59
54
|
</ToggleGroup>
|
|
60
55
|
<Table
|
|
61
56
|
aria-label="Simple table"
|
|
62
|
-
variant={exampleChoice
|
|
57
|
+
variant={exampleChoice === 'compact' || exampleChoice === 'compactBorderless' ? 'compact' : undefined}
|
|
63
58
|
borders={exampleChoice !== 'compactBorderless'}
|
|
64
59
|
>
|
|
65
60
|
<Caption>Simple table using composable components</Caption>
|
|
@@ -3,7 +3,7 @@ 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 PencilAltIcon from '@patternfly/react-icons/dist/esm/icons/pencil-alt-icon';
|
|
5
5
|
import CheckIcon from '@patternfly/react-icons/dist/esm/icons/check-icon';
|
|
6
|
-
import
|
|
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';
|
|
9
9
|
|
|
@@ -60,7 +60,7 @@ const EditButtonsCell: React.FunctionComponent<EditButtonsCellProps> = ({
|
|
|
60
60
|
onKeyDown={(event) => onKeyDown(event, 'stopEditing')}
|
|
61
61
|
variant="plain"
|
|
62
62
|
>
|
|
63
|
-
<
|
|
63
|
+
<RhMicronsCloseIcon />
|
|
64
64
|
</Button>
|
|
65
65
|
</div>
|
|
66
66
|
</Td>
|
|
@@ -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
|
|
7
|
+
import RhMicronsCaretDownIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-caret-down-icon';
|
|
8
8
|
import EllipsisHIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-h-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
|
-
<
|
|
57
|
+
<RhMicronsCaretDownIcon />
|
|
58
58
|
</div>
|
|
59
59
|
}
|
|
60
60
|
/>
|
package/src/demos/Table.md
CHANGED
|
@@ -58,20 +58,19 @@ import FilterIcon from '@patternfly/react-icons/dist/esm/icons/filter-icon';
|
|
|
58
58
|
import SortAmountDownIcon from '@patternfly/react-icons/dist/esm/icons/sort-amount-down-icon';
|
|
59
59
|
import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
|
|
60
60
|
import SyncIcon from '@patternfly/react-icons/dist/esm/icons/sync-icon';
|
|
61
|
-
import
|
|
61
|
+
import RhUiErrorFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-error-fill-icon';
|
|
62
62
|
import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon';
|
|
63
63
|
import HelpIcon from '@patternfly/react-icons/dist/esm/icons/help-icon';
|
|
64
64
|
import QuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/question-circle-icon';
|
|
65
|
-
import
|
|
66
|
-
import
|
|
65
|
+
import RhMicronsCaretDownIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-caret-down-icon';
|
|
66
|
+
import RhMicronsCaretRightIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-caret-right-icon';
|
|
67
67
|
import BarsIcon from '@patternfly/react-icons/dist/esm/icons/bars-icon';
|
|
68
|
-
import AttentionBellIcon from '@patternfly/react-icons/dist/esm/icons/attention-bell-icon';
|
|
69
68
|
import BlueprintIcon from '@patternfly/react-icons/dist/esm/icons/blueprint-icon';
|
|
70
69
|
import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon';
|
|
71
70
|
import { DashboardWrapper } from '@patternfly/react-table/dist/esm/demos/DashboardWrapper';
|
|
72
71
|
import { rows, columns } from '@patternfly/react-table/dist/esm/demos/sampleData';
|
|
73
72
|
import spacing from '@patternfly/react-styles/css/utilities/Spacing/spacing';
|
|
74
|
-
import
|
|
73
|
+
import RhUiNotificationFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-notification-fill-icon';
|
|
75
74
|
|
|
76
75
|
## Demos
|
|
77
76
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Table, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
|
|
2
2
|
import { Bullseye, EmptyState, EmptyStateVariant, EmptyStateBody, PageSection } from '@patternfly/react-core';
|
|
3
|
-
import
|
|
3
|
+
import RhUiErrorFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-error-fill-icon';
|
|
4
4
|
import { DashboardWrapper } from '@patternfly/react-table/dist/esm/demos/DashboardWrapper';
|
|
5
5
|
|
|
6
6
|
export const TableEmptyStateError: React.FunctionComponent = () => (
|
|
@@ -21,7 +21,7 @@ export const TableEmptyStateError: React.FunctionComponent = () => (
|
|
|
21
21
|
<Td colSpan={8}>
|
|
22
22
|
<Bullseye>
|
|
23
23
|
<EmptyState
|
|
24
|
-
icon={
|
|
24
|
+
icon={RhUiErrorFillIcon}
|
|
25
25
|
titleText="Unable to connect"
|
|
26
26
|
headingLevel="h2"
|
|
27
27
|
variant={EmptyStateVariant.sm}
|