diff --git a/packages/react-table/src/demos/examples/TableCompact.tsx b/packages/react-table/src/demos/examples/TableCompact.tsx index 6e7619aa3fa..835a8743a56 100644 --- a/packages/react-table/src/demos/examples/TableCompact.tsx +++ b/packages/react-table/src/demos/examples/TableCompact.tsx @@ -1,7 +1,6 @@ import { Fragment, useState } from 'react'; import { Button, - Card, MenuToggle, MenuToggleElement, Pagination, @@ -130,45 +129,43 @@ export const TableCompact: React.FunctionComponent = () => { - - {tableToolbar} - - - - - - - - - - - + {tableToolbar} +
{columns[0]}{columns[1]}{columns[2]}{columns[3]}{columns[4]}{columns[5]}{columns[6]} - {columns[7]} -
+ + + + + + + + + + + + + + {paginatedRows.map((row, rowIndex) => ( + + <> + + + + + + + + + - - - {paginatedRows.map((row, rowIndex) => ( - - <> - - - - - - - - - - - ))} - -
{columns[0]}{columns[1]}{columns[2]}{columns[3]}{columns[4]}{columns[5]}{columns[6]} + {columns[7]} +
{row.name}{row.threads}{row.applications}{row.workspaces}{renderLabel(row.status)}{row.location}{row.lastModified} + + {row.url} + +
{row.name}{row.threads}{row.applications}{row.workspaces}{renderLabel(row.status)}{row.location}{row.lastModified} - - {row.url} - -
-
+ ))} + +
diff --git a/packages/react-table/src/demos/examples/TableEmptyStateDefault.tsx b/packages/react-table/src/demos/examples/TableEmptyStateDefault.tsx index 967fd39a31d..8e6d772b8c7 100644 --- a/packages/react-table/src/demos/examples/TableEmptyStateDefault.tsx +++ b/packages/react-table/src/demos/examples/TableEmptyStateDefault.tsx @@ -2,7 +2,6 @@ import { Table, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table'; import { Bullseye, Button, - Card, EmptyState, EmptyStateVariant, EmptyStateBody, @@ -16,42 +15,40 @@ import { DashboardWrapper } from '@patternfly/react-table/dist/esm/demos/Dashboa export const TableEmptyStateDefault: React.FunctionComponent = () => ( - - - - - - - - - - - - - - - - -
RepositoriesBranchesPull requestsWorkspacesLast commit
- - - - No results match this filter criteria. Clear all filters and try again. - - - - - - - - -
-
+ + + + + + + + + + + + + + + +
RepositoriesBranchesPull requestsWorkspacesLast commit
+ + + + No results match this filter criteria. Clear all filters and try again. + + + + + + + + +
); diff --git a/packages/react-table/src/demos/examples/TableEmptyStateError.tsx b/packages/react-table/src/demos/examples/TableEmptyStateError.tsx index 9caf9f1478c..ff604e9794f 100644 --- a/packages/react-table/src/demos/examples/TableEmptyStateError.tsx +++ b/packages/react-table/src/demos/examples/TableEmptyStateError.tsx @@ -1,42 +1,40 @@ import { Table, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table'; -import { Bullseye, Card, EmptyState, EmptyStateVariant, EmptyStateBody, PageSection } from '@patternfly/react-core'; +import { Bullseye, EmptyState, EmptyStateVariant, EmptyStateBody, PageSection } from '@patternfly/react-core'; import ExclamationCircleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon'; import { DashboardWrapper } from '@patternfly/react-table/dist/esm/demos/DashboardWrapper'; export const TableEmptyStateError: React.FunctionComponent = () => ( - - - - - - - - - - - - - - - - -
RepositoriesBranchesPull requestsWorkspacesLast commit
- - - - There was an error retrieving data. Check your connection and reload the page. - - - -
-
+ + + + + + + + + + + + + + + +
RepositoriesBranchesPull requestsWorkspacesLast commit
+ + + + There was an error retrieving data. Check your connection and reload the page. + + + +
); diff --git a/packages/react-table/src/demos/examples/TableEmptyStateLoading.tsx b/packages/react-table/src/demos/examples/TableEmptyStateLoading.tsx index 5f62121f078..5724d09158d 100644 --- a/packages/react-table/src/demos/examples/TableEmptyStateLoading.tsx +++ b/packages/react-table/src/demos/examples/TableEmptyStateLoading.tsx @@ -1,32 +1,30 @@ import { Table, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table'; -import { Bullseye, Card, EmptyState, PageSection, Spinner } from '@patternfly/react-core'; +import { Bullseye, EmptyState, PageSection, Spinner } from '@patternfly/react-core'; import { DashboardWrapper } from '@patternfly/react-table/dist/esm/demos/DashboardWrapper'; export const TableEmptyStateLoading: React.FunctionComponent = () => ( - - - - - - - - - - - - - - - - -
RepositoriesBranchesPull requestsWorkspacesLast commit
- - - -
-
+ + + + + + + + + + + + + + + +
RepositoriesBranchesPull requestsWorkspacesLast commit
+ + + +
); diff --git a/packages/react-table/src/demos/examples/TableExpandCollapseAll.tsx b/packages/react-table/src/demos/examples/TableExpandCollapseAll.tsx index d3c23b5a326..2d594dad470 100644 --- a/packages/react-table/src/demos/examples/TableExpandCollapseAll.tsx +++ b/packages/react-table/src/demos/examples/TableExpandCollapseAll.tsx @@ -1,5 +1,5 @@ import { Fragment, ReactNode, useEffect, useState } from 'react'; -import { Card, Content, Label, PageSection } from '@patternfly/react-core'; +import { Content, Label, PageSection } from '@patternfly/react-core'; import { Table, Thead, Tbody, Tr, Th, Td, ExpandableRowContent } from '@patternfly/react-table'; import { DashboardWrapper } from '@patternfly/react-table/dist/esm/demos/DashboardWrapper'; @@ -155,56 +155,54 @@ export const TableExpandCollapseAll: React.FunctionComponent = () => { }} aria-label="Collapsible table data" > - - - - - - ))} - - +
- {expandableColumns.map((column) => ( - {column}
+ + + + ))} + + - {serverData.map((server, serverIndex) => ( - - - - - - - - - - - - - - - ))} -
+ {expandableColumns.map((column) => ( + {column}
setServerExpanded(server, !isServerExpanded(server)) - } - : undefined - } - > - {server.details} - {server?.name}{server?.threads}{server?.applications}{server?.workspaces}{server?.status?.title}
- {server?.details} -
-
+ {serverData.map((server, serverIndex) => ( + + + setServerExpanded(server, !isServerExpanded(server)) + } + : undefined + } + > + {server.details} + + {server?.name} + {server?.threads} + {server?.applications} + {server?.workspaces} + {server?.status?.title} + + + + + {server?.details} + + + + ))} + diff --git a/packages/react-table/src/demos/examples/TableSortableResponsive.tsx b/packages/react-table/src/demos/examples/TableSortableResponsive.tsx index fb522d4a9b3..58cda4339ce 100644 --- a/packages/react-table/src/demos/examples/TableSortableResponsive.tsx +++ b/packages/react-table/src/demos/examples/TableSortableResponsive.tsx @@ -1,7 +1,6 @@ import { Fragment, useEffect, useState } from 'react'; import { Button, - Card, Content, Dropdown, DropdownList, @@ -245,86 +244,84 @@ export const TableSortableResponsive: React.FunctionComponent = () => { }} aria-label="Sortable table data" > - - {tableToolbar} - - - - {columns.map((column, columnIndex) => { - const sortParams = { - sort: { - sortBy: { - index: activeSortIndex, - direction: activeSortDirection - }, - onSort, - columnIndex - } - }; - return ( - - ); - })} + {tableToolbar} +
- {column} -
+ + + {columns.map((column, columnIndex) => { + const sortParams = { + sort: { + sortBy: { + index: activeSortIndex, + direction: activeSortDirection + }, + onSort, + columnIndex + } + }; + return ( + + ); + })} + + + + {sortedRows.map((row, rowIndex) => ( + + <> + + + + + + + + + - - - {sortedRows.map((row, rowIndex) => ( - - <> - - - - - - - - - - - ))} - -
+ {column} +
+
{row.name}
+
+ + + + + {row.threads} + + + + + + + {row.applications} + + + + + + + {row.workspaces} + + + + {renderLabel(row.status)} + + + + {row.location} + + + + {row.lastModified[0]} days ago + + + {row.url} +
-
{row.name}
-
- - - - - {row.threads} - - - - - - - {row.applications} - - - - - - - {row.workspaces} - - - - {renderLabel(row.status)} - - - - {row.location} - - - - {row.lastModified[0]} days ago - - - {row.url} -
- {renderPagination('bottom', false)} -
+ ))} + + + {renderPagination('bottom', false)} diff --git a/packages/react-table/src/demos/examples/TableStaticBottomPagination.tsx b/packages/react-table/src/demos/examples/TableStaticBottomPagination.tsx index b67485b4e3a..af7f2b0302d 100644 --- a/packages/react-table/src/demos/examples/TableStaticBottomPagination.tsx +++ b/packages/react-table/src/demos/examples/TableStaticBottomPagination.tsx @@ -1,7 +1,6 @@ import { Fragment, useState } from 'react'; import { Button, - Card, Toolbar, ToolbarContent, ToolbarGroup, @@ -143,37 +142,35 @@ export const TableStaticBottomPagination: React.FunctionComponent = () => { - - {tableToolbar} - - - - {columns.map((column, columnIndex) => ( - - ))} - - - - {paginatedRows.map((row, rowIndex) => ( - - - - - - - - - - + {tableToolbar} +
{column}
{row.name}{row.threads}{row.applications}{row.workspaces}{renderLabel(row.status)}{row.location}{row.lastModified} - - {row.url} - -
+ + + {columns.map((column, columnIndex) => ( + ))} - -
{column}
- {renderPagination('bottom', false)} -
+ + + + {paginatedRows.map((row, rowIndex) => ( + + {row.name} + {row.threads} + {row.applications} + {row.workspaces} + {renderLabel(row.status)} + {row.location} + {row.lastModified} + + + {row.url} + + + + ))} + + + {renderPagination('bottom', false)}
diff --git a/packages/react-table/src/demos/examples/TableStickyFirstColumn.tsx b/packages/react-table/src/demos/examples/TableStickyFirstColumn.tsx index 535316bf399..4d5caf30812 100644 --- a/packages/react-table/src/demos/examples/TableStickyFirstColumn.tsx +++ b/packages/react-table/src/demos/examples/TableStickyFirstColumn.tsx @@ -1,6 +1,6 @@ import { useState } from 'react'; import { Table, Thead, Tr, Th, Tbody, Td, InnerScrollContainer } from '@patternfly/react-table'; -import { Card, PageSection } from '@patternfly/react-core'; +import { PageSection } from '@patternfly/react-core'; import { DashboardWrapper } from '@patternfly/react-table/dist/esm/demos/DashboardWrapper'; type Direction = 'asc' | 'desc' | undefined; @@ -140,96 +140,88 @@ export const TableStickyFirstColumn = () => { padding={{ default: 'noPadding', xl: 'padding' }} aria-label="Sticky column table data" > - - - - - -
- {columnNames.name} + + + + + + + + + + + + + + + + + + + + + + + + {sortedFacts.map((fact) => ( + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - {sortedFacts.map((fact) => ( - - - - - - - - - - - - - - - - - - - ))} - -
+ {columnNames.name} + + {columnNames.state} + {columnNames.header3}{columnNames.header4}{columnNames.header5}{columnNames.header6}{columnNames.header7}{columnNames.header8}{columnNames.header9}{columnNames.header10}{columnNames.header11}{columnNames.header12}{columnNames.header13}{columnNames.header14}{columnNames.header15}{columnNames.header16}
+ {fact.name} - {columnNames.state} - {columnNames.header3}{columnNames.header4}{columnNames.header5}{columnNames.header6}{columnNames.header7}{columnNames.header8}{columnNames.header9}{columnNames.header10}{columnNames.header11}{columnNames.header12}{columnNames.header13}{columnNames.header14}{columnNames.header15}{columnNames.header16} + {fact.state} + + {fact.detail1} + + {fact.detail2} + + {fact.detail3} + + {fact.detail4} + + {fact.detail5} + + {fact.detail6} + + {fact.detail7} + + {fact.detail8} + + {fact.detail9} + + {fact.detail10} + + {fact.detail11} + + {fact.detail12} + + {fact.detail13} + + {fact.detail14} +
- {fact.name} - - {fact.state} - - {fact.detail1} - - {fact.detail2} - - {fact.detail3} - - {fact.detail4} - - {fact.detail5} - - {fact.detail6} - - {fact.detail7} - - {fact.detail8} - - {fact.detail9} - - {fact.detail10} - - {fact.detail11} - - {fact.detail12} - - {fact.detail13} - - {fact.detail14} -
-
- + ))} + +
+
); diff --git a/packages/react-table/src/demos/examples/TableStickyHeader.tsx b/packages/react-table/src/demos/examples/TableStickyHeader.tsx index 3281b7bf492..1bbd3df7132 100644 --- a/packages/react-table/src/demos/examples/TableStickyHeader.tsx +++ b/packages/react-table/src/demos/examples/TableStickyHeader.tsx @@ -1,4 +1,4 @@ -import { Card, Label, PageSection } from '@patternfly/react-core'; +import { Label, PageSection } from '@patternfly/react-core'; import { Table, Thead, Tr, Th, Tbody, Td, TableText } from '@patternfly/react-table'; import { DashboardWrapper } from '@patternfly/react-table/dist/esm/demos/DashboardWrapper'; import { rows, columns } from '@patternfly/react-table/dist/esm/demos/sampleData'; @@ -20,40 +20,38 @@ export const TableStickyHeader: React.FunctionComponent = () => { return ( - - - - - - - - - - - - +
{columns[0]}{columns[1]}{columns[2]}{columns[3]}{columns[4]}{columns[5]}{columns[6]}{columns[7]}
+ + + + + + + + + + + + + + {rows.map((row) => ( + + + + + + + + + - - - {rows.map((row) => ( - - - - - - - - - - - ))} - -
{columns[0]}{columns[1]}{columns[2]}{columns[3]}{columns[4]}{columns[5]}{columns[6]}{columns[7]}
{row.name}{row.threads}{row.applications}{row.workspaces}{renderLabel(row.status)}{row.location}{row.lastModified} + + {row.url} + +
{row.name}{row.threads}{row.applications}{row.workspaces}{renderLabel(row.status)}{row.location}{row.lastModified} - - {row.url} - -
-
+ ))} + +
);