@patternfly/react-table 6.0.0-alpha.50 → 6.0.0-alpha.51
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 +254 -0
- 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/ActionsColumn.d.ts +2 -0
- package/dist/esm/components/Table/ActionsColumn.d.ts.map +1 -1
- package/dist/esm/components/Table/ActionsColumn.js +4 -4
- package/dist/esm/components/Table/ActionsColumn.js.map +1 -1
- package/dist/esm/components/Table/TableTypes.d.ts +2 -0
- package/dist/esm/components/Table/TableTypes.d.ts.map +1 -1
- package/dist/esm/components/Table/Th.d.ts +8 -0
- package/dist/esm/components/Table/Th.d.ts.map +1 -1
- package/dist/esm/components/Table/Th.js +7 -3
- package/dist/esm/components/Table/Th.js.map +1 -1
- package/dist/esm/components/Table/utils/decorators/selectable.js +1 -1
- package/dist/esm/components/Table/utils/decorators/selectable.js.map +1 -1
- package/dist/js/components/Table/ActionsColumn.d.ts +2 -0
- package/dist/js/components/Table/ActionsColumn.d.ts.map +1 -1
- package/dist/js/components/Table/ActionsColumn.js +4 -4
- package/dist/js/components/Table/ActionsColumn.js.map +1 -1
- package/dist/js/components/Table/TableTypes.d.ts +2 -0
- package/dist/js/components/Table/TableTypes.d.ts.map +1 -1
- package/dist/js/components/Table/Th.d.ts +8 -0
- package/dist/js/components/Table/Th.d.ts.map +1 -1
- package/dist/js/components/Table/Th.js +7 -3
- package/dist/js/components/Table/Th.js.map +1 -1
- package/dist/js/components/Table/utils/decorators/selectable.js +1 -1
- package/dist/js/components/Table/utils/decorators/selectable.js.map +1 -1
- package/dist/umd/react-table.min.js +3 -3
- package/package.json +6 -6
- package/src/components/Table/ActionsColumn.tsx +33 -28
- package/src/components/Table/TableTypes.tsx +2 -0
- package/src/components/Table/Th.tsx +20 -2
- package/src/components/Table/__tests__/Th.test.tsx +31 -0
- package/src/components/Table/examples/TableActions.tsx +2 -2
- package/src/components/Table/examples/TableActionsOverflow.tsx +1 -1
- package/src/components/Table/examples/TableCompoundExpandable.tsx +1 -1
- package/src/components/Table/examples/TableDraggable.tsx +19 -16
- package/src/components/Table/examples/TableExpandable.tsx +1 -1
- package/src/components/Table/examples/TableNestedExpandable.tsx +1 -1
- package/src/components/Table/examples/TableNestedStickyHeader.tsx +0 -3
- package/src/components/Table/examples/TableNestedTableExpandable.tsx +1 -1
- package/src/components/Table/examples/TableSelectable.tsx +1 -0
- package/src/components/Table/examples/TableSelectableRadio.tsx +1 -1
- package/src/components/Table/examples/TableStripedExpandable.tsx +1 -1
- package/src/components/Table/utils/decorators/selectable.tsx +1 -1
- package/src/demos/examples/TableBulkSelect.tsx +1 -1
- package/src/demos/examples/TableColumnManagement.tsx +6 -6
- package/src/demos/examples/TableCompoundExpansion.tsx +5 -9
- package/src/demos/examples/TableExpandCollapseAll.tsx +2 -1
- package/src/deprecated/components/Table/__tests__/__snapshots__/Table.test.tsx.snap +10 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-table",
|
|
3
|
-
"version": "6.0.0-alpha.
|
|
3
|
+
"version": "6.0.0-alpha.51",
|
|
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.js --config subpaths.config.json"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@patternfly/react-core": "^6.0.0-alpha.
|
|
44
|
-
"@patternfly/react-icons": "^6.0.0-alpha.
|
|
45
|
-
"@patternfly/react-styles": "^6.0.0-alpha.
|
|
46
|
-
"@patternfly/react-tokens": "^6.0.0-alpha.
|
|
43
|
+
"@patternfly/react-core": "^6.0.0-alpha.51",
|
|
44
|
+
"@patternfly/react-icons": "^6.0.0-alpha.20",
|
|
45
|
+
"@patternfly/react-styles": "^6.0.0-alpha.20",
|
|
46
|
+
"@patternfly/react-tokens": "^6.0.0-alpha.20",
|
|
47
47
|
"lodash": "^4.17.19",
|
|
48
48
|
"tslib": "^2.5.0"
|
|
49
49
|
},
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"react": "^17 || ^18",
|
|
56
56
|
"react-dom": "^17 || ^18"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "8d93660fcd63d544d8ef0f2ee6494cfe5f09379e"
|
|
59
59
|
}
|
|
@@ -30,6 +30,8 @@ export interface ActionsColumnProps extends Omit<React.HTMLProps<HTMLElement>, '
|
|
|
30
30
|
innerRef?: React.Ref<any>;
|
|
31
31
|
/** Ref to forward to the first item in the popup menu */
|
|
32
32
|
firstActionItemRef?: React.Ref<HTMLButtonElement>;
|
|
33
|
+
/** Flag indicating that the dropdown's onOpenChange callback should not be called. */
|
|
34
|
+
isOnOpenChangeDisabled?: boolean;
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
const ActionsColumnBase: React.FunctionComponent<ActionsColumnProps> = ({
|
|
@@ -44,6 +46,7 @@ const ActionsColumnBase: React.FunctionComponent<ActionsColumnProps> = ({
|
|
|
44
46
|
},
|
|
45
47
|
innerRef,
|
|
46
48
|
firstActionItemRef,
|
|
49
|
+
isOnOpenChangeDisabled = false,
|
|
47
50
|
...props
|
|
48
51
|
}: ActionsColumnProps) => {
|
|
49
52
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
@@ -91,7 +94,7 @@ const ActionsColumnBase: React.FunctionComponent<ActionsColumnProps> = ({
|
|
|
91
94
|
|
|
92
95
|
<Dropdown
|
|
93
96
|
isOpen={isOpen}
|
|
94
|
-
onOpenChange={(isOpen: boolean) => setIsOpen(isOpen)}
|
|
97
|
+
onOpenChange={!isOnOpenChangeDisabled ? (isOpen: boolean) => setIsOpen(isOpen) : undefined}
|
|
95
98
|
toggle={(toggleRef: any) =>
|
|
96
99
|
actionsToggle ? (
|
|
97
100
|
actionsToggle({ onToggle, isOpen, isDisabled, toggleRef })
|
|
@@ -115,35 +118,37 @@ const ActionsColumnBase: React.FunctionComponent<ActionsColumnProps> = ({
|
|
|
115
118
|
<DropdownList>
|
|
116
119
|
{items
|
|
117
120
|
.filter((item) => !item.isOutsideDropdown)
|
|
118
|
-
.map(
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
if (tooltipProps?.content) {
|
|
138
|
-
return (
|
|
139
|
-
<Tooltip key={itemKey || index} {...tooltipProps}>
|
|
140
|
-
{item}
|
|
141
|
-
</Tooltip>
|
|
121
|
+
.map(
|
|
122
|
+
({ title, itemKey, onClick, tooltipProps, isSeparator, shouldCloseOnClick = true, ...props }, index) => {
|
|
123
|
+
if (isSeparator) {
|
|
124
|
+
return <Divider key={itemKey || index} data-key={itemKey || index} />;
|
|
125
|
+
}
|
|
126
|
+
const item = (
|
|
127
|
+
<DropdownItem
|
|
128
|
+
onClick={(event: any) => {
|
|
129
|
+
onActionClick(event, onClick);
|
|
130
|
+
shouldCloseOnClick && onToggle();
|
|
131
|
+
}}
|
|
132
|
+
{...props}
|
|
133
|
+
key={itemKey || index}
|
|
134
|
+
data-key={itemKey || index}
|
|
135
|
+
ref={index === 0 ? firstActionItemRef : undefined}
|
|
136
|
+
>
|
|
137
|
+
{title}
|
|
138
|
+
</DropdownItem>
|
|
142
139
|
);
|
|
143
|
-
|
|
144
|
-
|
|
140
|
+
|
|
141
|
+
if (tooltipProps?.content) {
|
|
142
|
+
return (
|
|
143
|
+
<Tooltip key={itemKey || index} {...tooltipProps}>
|
|
144
|
+
{item}
|
|
145
|
+
</Tooltip>
|
|
146
|
+
);
|
|
147
|
+
} else {
|
|
148
|
+
return item;
|
|
149
|
+
}
|
|
145
150
|
}
|
|
146
|
-
|
|
151
|
+
)}
|
|
147
152
|
</DropdownList>
|
|
148
153
|
</Dropdown>
|
|
149
154
|
</React.Fragment>
|
|
@@ -166,6 +166,8 @@ export interface IAction extends Omit<DropdownItemProps, 'title' | 'onClick'>, P
|
|
|
166
166
|
onClick?: (event: React.MouseEvent, rowIndex: number, rowData: IRowData, extraData: IExtraData) => void;
|
|
167
167
|
/** Flag indicating this action should be placed outside the actions menu, beside the toggle */
|
|
168
168
|
isOutsideDropdown?: boolean;
|
|
169
|
+
/** Flag indicating whether the actions dropdown should close after an item is clicked. */
|
|
170
|
+
shouldCloseOnClick?: boolean;
|
|
169
171
|
}
|
|
170
172
|
|
|
171
173
|
export interface ISeparator extends IAction {
|
|
@@ -56,6 +56,14 @@ export interface ThProps
|
|
|
56
56
|
stickyRightOffset?: string;
|
|
57
57
|
/** Indicates the <th> is part of a subheader of a nested header */
|
|
58
58
|
isSubheader?: boolean;
|
|
59
|
+
/** Visually hidden text accessible only via assistive technologies. This must be passed in if the
|
|
60
|
+
* th is intended to be visually empty, and must be conveyed as a column header text.
|
|
61
|
+
*/
|
|
62
|
+
screenReaderText?: string;
|
|
63
|
+
/** Provides an accessible name to the th. This should only be passed in when the th contains only non-text
|
|
64
|
+
* content, such as a "select all" checkbox or "expand all" toggle.
|
|
65
|
+
*/
|
|
66
|
+
'aria-label'?: string;
|
|
59
67
|
}
|
|
60
68
|
|
|
61
69
|
const ThBase: React.FunctionComponent<ThProps> = ({
|
|
@@ -83,8 +91,17 @@ const ThBase: React.FunctionComponent<ThProps> = ({
|
|
|
83
91
|
stickyLeftOffset,
|
|
84
92
|
stickyRightOffset,
|
|
85
93
|
isSubheader = false,
|
|
94
|
+
screenReaderText,
|
|
95
|
+
'aria-label': ariaLabel,
|
|
86
96
|
...props
|
|
87
97
|
}: ThProps) => {
|
|
98
|
+
if (!children && !screenReaderText && !ariaLabel) {
|
|
99
|
+
// eslint-disable-next-line no-console
|
|
100
|
+
console.warn(
|
|
101
|
+
'Th: Table headers must have an accessible name. If the Th is intended to be visually empty, pass in screenReaderText. If the Th contains only non-text, interactive content such as a checkbox or expand toggle, pass in an aria-label.'
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
88
105
|
const [showTooltip, setShowTooltip] = React.useState(false);
|
|
89
106
|
const [truncated, setTruncated] = React.useState(false);
|
|
90
107
|
const cellRef = innerRef ? innerRef : React.createRef();
|
|
@@ -188,8 +205,9 @@ const ThBase: React.FunctionComponent<ThProps> = ({
|
|
|
188
205
|
onBlur={() => setShowTooltip(false)}
|
|
189
206
|
data-label={dataLabel}
|
|
190
207
|
onMouseEnter={tooltip !== null ? onMouseEnter : onMouseEnterProp}
|
|
191
|
-
scope={component === 'th'
|
|
208
|
+
scope={component === 'th' ? scope : null}
|
|
192
209
|
ref={cellRef}
|
|
210
|
+
aria-label={ariaLabel}
|
|
193
211
|
className={css(
|
|
194
212
|
styles.tableTh,
|
|
195
213
|
className,
|
|
@@ -212,7 +230,7 @@ const ThBase: React.FunctionComponent<ThProps> = ({
|
|
|
212
230
|
} as React.CSSProperties
|
|
213
231
|
})}
|
|
214
232
|
>
|
|
215
|
-
{transformedChildren}
|
|
233
|
+
{transformedChildren || (screenReaderText && <span className="pf-v5-screen-reader">{screenReaderText}</span>)}
|
|
216
234
|
</MergedComponent>
|
|
217
235
|
);
|
|
218
236
|
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { render, screen } from '@testing-library/react';
|
|
3
|
+
import { Th } from '../Th';
|
|
4
|
+
|
|
5
|
+
test('Does not render with aria-label by default', () => {
|
|
6
|
+
render(<Th />);
|
|
7
|
+
expect(screen.getByRole('columnheader')).not.toHaveAccessibleName();
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
test('Renders with aria-label when passed in', () => {
|
|
11
|
+
render(<Th aria-label="Test" />);
|
|
12
|
+
expect(screen.getByRole('columnheader')).toHaveAccessibleName('Test');
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
test('Does not render with screen reader text by default', () => {
|
|
16
|
+
render(<Th />);
|
|
17
|
+
|
|
18
|
+
expect(screen.getByRole('columnheader')).toBeEmptyDOMElement();
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
test('Does not render with screen reader text when children are passed in', () => {
|
|
22
|
+
render(<Th screenReaderText="Test">Heading label</Th>);
|
|
23
|
+
|
|
24
|
+
expect(screen.getByRole('columnheader')).not.toHaveTextContent('Test');
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
test('Renders with screen reader text when screenReaderText is passed in', () => {
|
|
28
|
+
render(<Th screenReaderText="Test" />);
|
|
29
|
+
|
|
30
|
+
expect(screen.getByRole('columnheader')).toHaveTextContent('Test');
|
|
31
|
+
});
|
|
@@ -116,8 +116,8 @@ export const TableActions: React.FunctionComponent = () => {
|
|
|
116
116
|
<Th>{columnNames.prs}</Th>
|
|
117
117
|
<Th>{columnNames.workspaces}</Th>
|
|
118
118
|
<Th>{columnNames.lastCommit}</Th>
|
|
119
|
-
<
|
|
120
|
-
<
|
|
119
|
+
<Th screenReaderText="Primary action" />
|
|
120
|
+
<Th screenReaderText="Secondary action" />
|
|
121
121
|
</Tr>
|
|
122
122
|
</Thead>
|
|
123
123
|
<Tbody>
|
|
@@ -67,7 +67,7 @@ export const TableCompoundExpandable: React.FunctionComponent = () => {
|
|
|
67
67
|
<Th>{columnNames.prs}</Th>
|
|
68
68
|
<Th>{columnNames.workspaces}</Th>
|
|
69
69
|
<Th>{columnNames.lastCommit}</Th>
|
|
70
|
-
<Th />
|
|
70
|
+
<Th screenReaderText="URL" />
|
|
71
71
|
</Tr>
|
|
72
72
|
</Thead>
|
|
73
73
|
{repositories.map((repo: Repository, rowIndex: number) => {
|
|
@@ -140,30 +140,33 @@ export const TableDraggable: React.FunctionComponent = () => {
|
|
|
140
140
|
];
|
|
141
141
|
|
|
142
142
|
return (
|
|
143
|
-
<Table aria-label="Draggable table" className={isDragging
|
|
143
|
+
<Table aria-label="Draggable table" className={isDragging ? styles.modifiers.dragOver : ''}>
|
|
144
144
|
<Thead>
|
|
145
145
|
<Tr>
|
|
146
|
-
<Th />
|
|
146
|
+
<Th screenReaderText="Drag and drop" />
|
|
147
147
|
{columns.map((column, columnIndex) => (
|
|
148
148
|
<Th key={columnIndex}>{column}</Th>
|
|
149
149
|
))}
|
|
150
150
|
</Tr>
|
|
151
151
|
</Thead>
|
|
152
152
|
<Tbody ref={bodyRef} onDragOver={onDragOver} onDrop={onDragOver} onDragLeave={onDragLeave}>
|
|
153
|
-
{rows.map((row, rowIndex) =>
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
153
|
+
{rows.map((row, rowIndex) => {
|
|
154
|
+
const rowCellsToBuild = Object.keys(row).filter((rowCell) => rowCell !== 'id');
|
|
155
|
+
return (
|
|
156
|
+
<Tr key={rowIndex} id={row.id} draggable onDrop={onDrop} onDragEnd={onDragEnd} onDragStart={onDragStart}>
|
|
157
|
+
<Td
|
|
158
|
+
draggableRow={{
|
|
159
|
+
id: `draggable-row-${row.id}`
|
|
160
|
+
}}
|
|
161
|
+
/>
|
|
162
|
+
{rowCellsToBuild.map((key, keyIndex) => (
|
|
163
|
+
<Td key={`${rowIndex}_${keyIndex}`} dataLabel={columns[keyIndex]}>
|
|
164
|
+
{row[key]}
|
|
165
|
+
</Td>
|
|
166
|
+
))}
|
|
167
|
+
</Tr>
|
|
168
|
+
);
|
|
169
|
+
})}
|
|
167
170
|
</Tbody>
|
|
168
171
|
</Table>
|
|
169
172
|
);
|
|
@@ -120,7 +120,7 @@ export const TableExpandable: React.FunctionComponent = () => {
|
|
|
120
120
|
<Table aria-label="Expandable table" variant={isExampleCompact ? 'compact' : undefined}>
|
|
121
121
|
<Thead>
|
|
122
122
|
<Tr>
|
|
123
|
-
<Th />
|
|
123
|
+
<Th screenReaderText="Row expansion" />
|
|
124
124
|
<Th width={25}>{columnNames.name}</Th>
|
|
125
125
|
<Th width={10}>{columnNames.branches}</Th>
|
|
126
126
|
<Th width={15}>{columnNames.prs}</Th>
|
|
@@ -64,7 +64,7 @@ export const TableNestedExpandable: React.FunctionComponent = () => {
|
|
|
64
64
|
<Table aria-label="Nested column headers with expandable rows table" gridBreakPoint="">
|
|
65
65
|
<Thead hasNestedHeader>
|
|
66
66
|
<Tr>
|
|
67
|
-
<Th rowSpan={2} />
|
|
67
|
+
<Th screenReaderText="Row expansion" rowSpan={2} />
|
|
68
68
|
<Th width={35} rowSpan={2} hasRightBorder>
|
|
69
69
|
{columnNames.team}
|
|
70
70
|
</Th>
|
|
@@ -152,9 +152,6 @@ export const TableNestedHeaders: React.FunctionComponent = () => {
|
|
|
152
152
|
{columnNames.destination}
|
|
153
153
|
</Th>
|
|
154
154
|
</Tr>
|
|
155
|
-
<Tr isBorderRow aria-hidden="true">
|
|
156
|
-
<Td colSpan={9}></Td>
|
|
157
|
-
</Tr>
|
|
158
155
|
</Thead>
|
|
159
156
|
<Tbody>
|
|
160
157
|
{sortedConnections.map((connection) => (
|
|
@@ -131,7 +131,7 @@ export const TableExpandable: React.FunctionComponent = () => {
|
|
|
131
131
|
<Table aria-label="Simple table">
|
|
132
132
|
<Thead>
|
|
133
133
|
<Tr>
|
|
134
|
-
<
|
|
134
|
+
<Th screenReaderText="Row expansion" />
|
|
135
135
|
<Th width={20}>{columnNames.name}</Th>
|
|
136
136
|
<Th>{columnNames.branches}</Th>
|
|
137
137
|
<Th>{columnNames.prs}</Th>
|
|
@@ -93,6 +93,7 @@ export const TableSelectable: React.FunctionComponent = () => {
|
|
|
93
93
|
onSelect: (_event, isSelecting) => selectAllRepos(isSelecting),
|
|
94
94
|
isSelected: areAllReposSelected
|
|
95
95
|
}}
|
|
96
|
+
aria-label="Row select"
|
|
96
97
|
/>
|
|
97
98
|
<Th>{columnNames.name}</Th>
|
|
98
99
|
<Th>{columnNames.branches}</Th>
|
|
@@ -35,7 +35,7 @@ export const TableSelectableRadio: React.FunctionComponent = () => {
|
|
|
35
35
|
<Table aria-label="Selectable table">
|
|
36
36
|
<Thead>
|
|
37
37
|
<Tr>
|
|
38
|
-
<Th />
|
|
38
|
+
<Th screenReaderText="Row select" />
|
|
39
39
|
<Th>{columnNames.name}</Th>
|
|
40
40
|
<Th>{columnNames.branches}</Th>
|
|
41
41
|
<Th>{columnNames.prs}</Th>
|
|
@@ -115,7 +115,7 @@ export const TableStripedExpandable: React.FunctionComponent = () => {
|
|
|
115
115
|
<Table aria-label="Expandable table" variant={isExampleCompact ? 'compact' : undefined} isStriped isExpandable>
|
|
116
116
|
<Thead>
|
|
117
117
|
<Tr>
|
|
118
|
-
<Th />
|
|
118
|
+
<Th screenReaderText="Row expansion" />
|
|
119
119
|
<Th width={25}>{columnNames.name}</Th>
|
|
120
120
|
<Th width={10}>{columnNames.branches}</Th>
|
|
121
121
|
<Th width={15}>{columnNames.prs}</Th>
|
|
@@ -154,7 +154,7 @@ export const TableBulkSelect: React.FunctionComponent = () => {
|
|
|
154
154
|
<Table aria-label="Selectable table">
|
|
155
155
|
<Thead>
|
|
156
156
|
<Tr>
|
|
157
|
-
<Th />
|
|
157
|
+
<Th screenReaderText="Row select" />
|
|
158
158
|
<Th key={0}>{columns[0]}</Th>
|
|
159
159
|
<Th key={1}>{columns[1]}</Th>
|
|
160
160
|
<Th key={2}>{columns[2]}</Th>
|
|
@@ -404,14 +404,14 @@ export const TableColumnManagement: React.FunctionComponent = () => {
|
|
|
404
404
|
<ToolbarItem variant="overflow-menu">
|
|
405
405
|
<OverflowMenu breakpoint="md">
|
|
406
406
|
<OverflowMenuItem>
|
|
407
|
-
<MenuToggle
|
|
407
|
+
<MenuToggle>
|
|
408
|
+
<FilterIcon /> Name
|
|
409
|
+
</MenuToggle>
|
|
408
410
|
</OverflowMenuItem>
|
|
409
411
|
<OverflowMenuItem>
|
|
410
|
-
<MenuToggle
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
icon={<SortAmountDownIcon aria-hidden="true" />}
|
|
414
|
-
/>
|
|
412
|
+
<MenuToggle variant="plain" aria-label="Sort columns">
|
|
413
|
+
<SortAmountDownIcon aria-hidden="true" />
|
|
414
|
+
</MenuToggle>
|
|
415
415
|
</OverflowMenuItem>
|
|
416
416
|
<OverflowMenuGroup groupType="button" isPersistent>
|
|
417
417
|
<OverflowMenuItem>
|
|
@@ -51,7 +51,7 @@ export const TableCompoundExpansion: React.FunctionComponent = () => {
|
|
|
51
51
|
<Th>{columnNames.description}</Th>
|
|
52
52
|
<Th>{columnNames.date}</Th>
|
|
53
53
|
<Th>{columnNames.status}</Th>
|
|
54
|
-
<Th />
|
|
54
|
+
<Th screenReaderText="Actions" />
|
|
55
55
|
</Tr>
|
|
56
56
|
</Thead>
|
|
57
57
|
<Tbody>
|
|
@@ -91,13 +91,8 @@ export const TableCompoundExpansion: React.FunctionComponent = () => {
|
|
|
91
91
|
id="select-example"
|
|
92
92
|
aria-label="Select Input"
|
|
93
93
|
toggle={(toggleRef: React.Ref<MenuToggleElement>) => (
|
|
94
|
-
<MenuToggle
|
|
95
|
-
|
|
96
|
-
ref={toggleRef}
|
|
97
|
-
onClick={() => setIsSelectOpen(!isSelectOpen)}
|
|
98
|
-
isExpanded={isSelectOpen}
|
|
99
|
-
>
|
|
100
|
-
Status
|
|
94
|
+
<MenuToggle ref={toggleRef} onClick={() => setIsSelectOpen(!isSelectOpen)} isExpanded={isSelectOpen}>
|
|
95
|
+
<FilterIcon /> Status
|
|
101
96
|
</MenuToggle>
|
|
102
97
|
)}
|
|
103
98
|
isOpen={isSelectOpen}
|
|
@@ -210,7 +205,8 @@ export const TableCompoundExpansion: React.FunctionComponent = () => {
|
|
|
210
205
|
<Th>{columnNames.prs}</Th>
|
|
211
206
|
<Th>{columnNames.workspaces}</Th>
|
|
212
207
|
<Th>{columnNames.lastCommit}</Th>
|
|
213
|
-
<Th />
|
|
208
|
+
<Th screenReaderText="URL" />
|
|
209
|
+
<Th screenReaderText="Actions" />
|
|
214
210
|
</Tr>
|
|
215
211
|
</Thead>
|
|
216
212
|
{repositories.map((repo, rowIndex) => {
|
|
@@ -164,7 +164,8 @@ export const TableExpandCollapseAll: React.FunctionComponent = () => {
|
|
|
164
164
|
collapseAllAriaLabel,
|
|
165
165
|
onToggle: onCollapseAll
|
|
166
166
|
}}
|
|
167
|
-
|
|
167
|
+
aria-label="Row expansion"
|
|
168
|
+
/>
|
|
168
169
|
{expandableColumns.map((column) => (
|
|
169
170
|
<Th key={column}>{column}</Th>
|
|
170
171
|
))}
|
|
@@ -1402,6 +1402,7 @@ exports[`Table Collapsible nested table 1`] = `
|
|
|
1402
1402
|
class="pf-v6-c-table__th"
|
|
1403
1403
|
data-key="0"
|
|
1404
1404
|
data-label=""
|
|
1405
|
+
scope=""
|
|
1405
1406
|
tabindex="-1"
|
|
1406
1407
|
/>
|
|
1407
1408
|
<th
|
|
@@ -2154,6 +2155,7 @@ exports[`Table Collapsible table 1`] = `
|
|
|
2154
2155
|
class="pf-v6-c-table__th"
|
|
2155
2156
|
data-key="0"
|
|
2156
2157
|
data-label=""
|
|
2158
|
+
scope=""
|
|
2157
2159
|
tabindex="-1"
|
|
2158
2160
|
/>
|
|
2159
2161
|
<th
|
|
@@ -4169,10 +4171,11 @@ exports[`Table Selectable table 1`] = `
|
|
|
4169
4171
|
data-ouia-component-type="PF5/TableRow"
|
|
4170
4172
|
data-ouia-safe="true"
|
|
4171
4173
|
>
|
|
4172
|
-
<
|
|
4174
|
+
<th
|
|
4173
4175
|
class="pf-v6-c-table__th pf-v6-c-table__check"
|
|
4174
4176
|
data-key="0"
|
|
4175
4177
|
data-label=""
|
|
4178
|
+
scope=""
|
|
4176
4179
|
tabindex="-1"
|
|
4177
4180
|
>
|
|
4178
4181
|
<label>
|
|
@@ -4182,7 +4185,7 @@ exports[`Table Selectable table 1`] = `
|
|
|
4182
4185
|
type="checkbox"
|
|
4183
4186
|
/>
|
|
4184
4187
|
</label>
|
|
4185
|
-
</
|
|
4188
|
+
</th>
|
|
4186
4189
|
<th
|
|
4187
4190
|
aria-sort="none"
|
|
4188
4191
|
class="pf-v6-c-table__th pf-v6-c-table__sort"
|
|
@@ -4873,6 +4876,7 @@ exports[`Table Selectable table with Radio 1`] = `
|
|
|
4873
4876
|
class="pf-v6-c-table__th"
|
|
4874
4877
|
data-key="0"
|
|
4875
4878
|
data-label=""
|
|
4879
|
+
scope=""
|
|
4876
4880
|
tabindex="-1"
|
|
4877
4881
|
/>
|
|
4878
4882
|
<th
|
|
@@ -5561,10 +5565,11 @@ exports[`Table Selectable table with selected expandable row 1`] = `
|
|
|
5561
5565
|
data-ouia-component-type="PF5/TableRow"
|
|
5562
5566
|
data-ouia-safe="true"
|
|
5563
5567
|
>
|
|
5564
|
-
<
|
|
5568
|
+
<th
|
|
5565
5569
|
class="pf-v6-c-table__th pf-v6-c-table__check"
|
|
5566
5570
|
data-key="0"
|
|
5567
5571
|
data-label=""
|
|
5572
|
+
scope=""
|
|
5568
5573
|
tabindex="-1"
|
|
5569
5574
|
>
|
|
5570
5575
|
<label>
|
|
@@ -5575,7 +5580,7 @@ exports[`Table Selectable table with selected expandable row 1`] = `
|
|
|
5575
5580
|
type="checkbox"
|
|
5576
5581
|
/>
|
|
5577
5582
|
</label>
|
|
5578
|
-
</
|
|
5583
|
+
</th>
|
|
5579
5584
|
<th
|
|
5580
5585
|
class="pf-v6-c-table__th"
|
|
5581
5586
|
data-key="1"
|
|
@@ -10305,6 +10310,7 @@ exports[`Table simple Editable table 1`] = `
|
|
|
10305
10310
|
class="pf-v6-c-table__th"
|
|
10306
10311
|
data-key="4"
|
|
10307
10312
|
data-label=""
|
|
10313
|
+
scope=""
|
|
10308
10314
|
tabindex="-1"
|
|
10309
10315
|
/>
|
|
10310
10316
|
</tr>
|