@patternfly/react-table 5.2.0-prerelease.4 → 5.2.0-prerelease.6

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 (48) hide show
  1. package/CHANGELOG.md +8 -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/Table.js +2 -2
  11. package/dist/esm/components/Table/Table.js.map +1 -1
  12. package/dist/esm/components/Table/Td.d.ts.map +1 -1
  13. package/dist/esm/components/Table/Td.js +7 -3
  14. package/dist/esm/components/Table/Td.js.map +1 -1
  15. package/dist/esm/components/Table/Th.d.ts.map +1 -1
  16. package/dist/esm/components/Table/Th.js +4 -1
  17. package/dist/esm/components/Table/Th.js.map +1 -1
  18. package/dist/esm/components/Table/utils/decorators/treeRow.d.ts +1 -1
  19. package/dist/esm/components/Table/utils/decorators/treeRow.js +3 -3
  20. package/dist/esm/components/Table/utils/decorators/treeRow.js.map +1 -1
  21. package/dist/js/components/Table/Table.js +2 -2
  22. package/dist/js/components/Table/Table.js.map +1 -1
  23. package/dist/js/components/Table/Td.d.ts.map +1 -1
  24. package/dist/js/components/Table/Td.js +7 -3
  25. package/dist/js/components/Table/Td.js.map +1 -1
  26. package/dist/js/components/Table/Th.d.ts.map +1 -1
  27. package/dist/js/components/Table/Th.js +4 -1
  28. package/dist/js/components/Table/Th.js.map +1 -1
  29. package/dist/js/components/Table/utils/decorators/treeRow.d.ts +1 -1
  30. package/dist/js/components/Table/utils/decorators/treeRow.js +3 -3
  31. package/dist/js/components/Table/utils/decorators/treeRow.js.map +1 -1
  32. package/dist/umd/react-table.min.js +9 -9
  33. package/package.json +6 -6
  34. package/src/components/Table/Table.tsx +2 -2
  35. package/src/components/Table/Td.tsx +10 -5
  36. package/src/components/Table/Th.tsx +6 -3
  37. package/src/components/Table/examples/Table.md +3 -0
  38. package/src/components/Table/examples/TableCompoundExpandable.tsx +2 -1
  39. package/src/components/Table/examples/TableMisc.tsx +3 -1
  40. package/src/components/Table/examples/TableNestedHeaders.tsx +4 -3
  41. package/src/components/Table/examples/TableNestedStickyHeader.tsx +4 -3
  42. package/src/components/Table/utils/decorators/treeRow.tsx +3 -3
  43. package/src/components/Table/utils/transformers.test.tsx +13 -8
  44. package/src/deprecated/components/Table/examples/LegacyTableCompoundExpandable.tsx +4 -3
  45. package/src/deprecated/components/Table/examples/LegacyTableMisc.tsx +3 -1
  46. package/src/deprecated/components/Table/examples/LegacyTableSelectable.tsx +2 -1
  47. package/src/deprecated/components/Table/examples/Table.md +2 -0
  48. package/src/docs/demos/table-demos/CompoundExpansion.jsx +2 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/react-table",
3
- "version": "5.2.0-prerelease.4",
3
+ "version": "5.2.0-prerelease.6",
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",
@@ -39,10 +39,10 @@
39
39
  "subpaths": "node ../../scripts/exportSubpaths.js --config subpaths.config.json"
40
40
  },
41
41
  "dependencies": {
42
- "@patternfly/react-core": "^5.2.0-prerelease.4",
43
- "@patternfly/react-icons": "^5.2.0-prerelease.2",
44
- "@patternfly/react-styles": "^5.2.0-prerelease.1",
45
- "@patternfly/react-tokens": "^5.2.0-prerelease.2",
42
+ "@patternfly/react-core": "^5.2.0-prerelease.6",
43
+ "@patternfly/react-icons": "^5.2.0-prerelease.3",
44
+ "@patternfly/react-styles": "^5.2.0-prerelease.2",
45
+ "@patternfly/react-tokens": "^5.2.0-prerelease.3",
46
46
  "lodash": "^4.17.19",
47
47
  "tslib": "^2.5.0"
48
48
  },
@@ -54,5 +54,5 @@
54
54
  "react": "^17 || ^18",
55
55
  "react-dom": "^17 || ^18"
56
56
  },
57
- "gitHead": "d3ab21c492302f816f435e8f053adbb1014d283d"
57
+ "gitHead": "50f5acd4ba1650ceb3634d249777a840186e4ee4"
58
58
  }
@@ -159,8 +159,8 @@ const TableBase: React.FunctionComponent<TableProps> = ({
159
159
  const handleKeys = (event: KeyboardEvent) => {
160
160
  if (
161
161
  isNested ||
162
- !(tableRef && tableRef.current && tableRef.current.classList.contains('pf-m-tree-view')) || // implements roving tab-index to tree tables only
163
- (tableRef && tableRef.current !== (event.target as HTMLElement).closest('.pf-v5-c-table:not(.pf-m-nested)'))
162
+ !(tableRef && tableRef.current && tableRef.current.classList.contains(stylesTreeView.modifiers.treeView)) || // implements roving tab-index to tree tables only
163
+ (tableRef && tableRef.current !== (event.target as HTMLElement).closest(`.${styles.table}:not(.pf-m-nested)`))
164
164
  ) {
165
165
  return;
166
166
  }
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  import { css } from '@patternfly/react-styles';
3
3
  import styles from '@patternfly/react-styles/css/components/Table/table';
4
4
  import scrollStyles from '@patternfly/react-styles/css/components/Table/table-scrollable';
5
+ import treeViewStyles from '@patternfly/react-styles/css/components/Table/table-tree-view';
5
6
  import { BaseCellProps } from './Table';
6
7
  import {
7
8
  cellActions,
@@ -28,6 +29,10 @@ import {
28
29
  TdSelectType,
29
30
  TdTreeRowType
30
31
  } from './base/types';
32
+ import cssStickyCellMinWidth from '@patternfly/react-tokens/dist/esm/c_table__sticky_cell_MinWidth';
33
+ import cssStickyCellLeft from '@patternfly/react-tokens/dist/esm/c_table__sticky_cell_Left';
34
+ import cssStickyCellRight from '@patternfly/react-tokens/dist/esm/c_table__sticky_cell_Right';
35
+
31
36
  export interface TdProps extends BaseCellProps, Omit<React.HTMLProps<HTMLTableDataCellElement>, 'onSelect' | 'width'> {
32
37
  /**
33
38
  * The column header the cell corresponds to.
@@ -253,8 +258,8 @@ const TdBase: React.FunctionComponent<TdProps> = ({
253
258
  } = merged;
254
259
 
255
260
  const treeTableTitleCell =
256
- (className && className.includes('pf-v5-c-table__tree-view-title-cell')) ||
257
- (mergedClassName && mergedClassName.includes('pf-v5-c-table__tree-view-title-cell'));
261
+ (className && className.includes(treeViewStyles.tableTreeViewTitleCell)) ||
262
+ (mergedClassName && mergedClassName.includes(treeViewStyles.tableTreeViewTitleCell));
258
263
 
259
264
  React.useEffect(() => {
260
265
  setTruncated(
@@ -288,9 +293,9 @@ const TdBase: React.FunctionComponent<TdProps> = ({
288
293
  {...props}
289
294
  {...(isStickyColumn && {
290
295
  style: {
291
- '--pf-v5-c-table__sticky-cell--MinWidth': stickyMinWidth ? stickyMinWidth : undefined,
292
- '--pf-v5-c-table__sticky-cell--Left': stickyLeftOffset ? stickyLeftOffset : 0,
293
- '--pf-v5-c-table__sticky-cell--Right': stickyRightOffset ? stickyRightOffset : 0,
296
+ [cssStickyCellMinWidth.name]: stickyMinWidth ? stickyMinWidth : undefined,
297
+ [cssStickyCellLeft.name]: stickyLeftOffset ? stickyLeftOffset : 0,
298
+ [cssStickyCellRight.name]: stickyRightOffset ? stickyRightOffset : 0,
294
299
  ...props.style
295
300
  } as React.CSSProperties
296
301
  })}
@@ -9,6 +9,9 @@ import { IVisibility } from './utils/decorators/classNames';
9
9
  import { Tooltip } from '@patternfly/react-core/dist/esm/components/Tooltip/Tooltip';
10
10
  import { BaseCellProps } from './Table';
11
11
  import { IFormatterValueType, IColumn } from './TableTypes';
12
+ import cssStickyCellMinWidth from '@patternfly/react-tokens/dist/esm/c_table__sticky_cell_MinWidth';
13
+ import cssStickyCellLeft from '@patternfly/react-tokens/dist/esm/c_table__sticky_cell_Left';
14
+ import cssStickyCellRight from '@patternfly/react-tokens/dist/esm/c_table__sticky_cell_Right';
12
15
 
13
16
  export interface ThProps
14
17
  extends BaseCellProps,
@@ -193,9 +196,9 @@ const ThBase: React.FunctionComponent<ThProps> = ({
193
196
  {...props}
194
197
  {...(isStickyColumn && {
195
198
  style: {
196
- '--pf-v5-c-table__sticky-cell--MinWidth': stickyMinWidth ? stickyMinWidth : undefined,
197
- '--pf-v5-c-table__sticky-cell--Left': stickyLeftOffset ? stickyLeftOffset : 0,
198
- '--pf-v5-c-table__sticky-cell--Right': stickyRightOffset ? stickyRightOffset : 0,
199
+ [cssStickyCellMinWidth.name]: stickyMinWidth ? stickyMinWidth : undefined,
200
+ [cssStickyCellLeft.name]: stickyLeftOffset ? stickyLeftOffset : 0,
201
+ [cssStickyCellRight.name]: stickyRightOffset ? stickyRightOffset : 0,
199
202
  ...props.style
200
203
  } as React.CSSProperties
201
204
  })}
@@ -54,6 +54,9 @@ import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-ico
54
54
 
55
55
  import { css } from '@patternfly/react-styles';
56
56
  import styles from '@patternfly/react-styles/css/components/Table/table';
57
+ import spacing from '@patternfly/react-styles/css/utilities/Spacing/spacing';
58
+ import textStyles from '@patternfly/react-styles/css/utilities/Text/text';
59
+ import global_BackgroundColor_150 from '@patternfly/react-tokens/dist/esm/global_BackgroundColor_150';
57
60
 
58
61
  ## Table examples
59
62
 
@@ -4,6 +4,7 @@ import { Table, Thead, Tr, Th, Tbody, Td, TdProps, ExpandableRowContent } from '
4
4
  import CodeBranchIcon from '@patternfly/react-icons/dist/esm/icons/code-branch-icon';
5
5
  import CodeIcon from '@patternfly/react-icons/dist/esm/icons/code-icon';
6
6
  import CubeIcon from '@patternfly/react-icons/dist/esm/icons/cube-icon';
7
+ import spacing from '@patternfly/react-styles/css/utilities/Spacing/spacing';
7
8
 
8
9
  interface Repository {
9
10
  name: string;
@@ -110,7 +111,7 @@ export const TableCompoundExpandable: React.FunctionComponent = () => {
110
111
  <Tr isExpanded={isRowExpanded}>
111
112
  <Td dataLabel={columnNames[expandedCellKey]} noPadding colSpan={6}>
112
113
  <ExpandableRowContent>
113
- <div className="pf-v5-u-m-md">
114
+ <div className={spacing.mMd}>
114
115
  Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem
115
116
  ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum
116
117
  sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Table, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
3
+ /* eslint-disable camelcase */
4
+ import global_BackgroundColor_150 from '@patternfly/react-tokens/dist/esm/global_BackgroundColor_150';
3
5
 
4
6
  interface Repository {
5
7
  name: string;
@@ -65,7 +67,7 @@ export const TableMisc: React.FunctionComponent = () => {
65
67
  {repositories.map((repo, rowIndex) => {
66
68
  const isOddRow = (rowIndex + 1) % 2;
67
69
  const customStyle = {
68
- backgroundColor: 'var(--pf-v5-global--BackgroundColor--150)'
70
+ backgroundColor: global_BackgroundColor_150.var
69
71
  };
70
72
  // Some arbitrary logic to demonstrate that cell styles can be based on anything
71
73
  const nameColSpan = repo.branches === null && repo.prs === null ? 3 : 1;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Table, Thead, Tr, Th, Tbody, Td, InnerScrollContainer, ThProps } from '@patternfly/react-table';
3
3
  import { Stack, StackItem } from '@patternfly/react-core';
4
+ import textStyles from '@patternfly/react-styles/css/utilities/Text/text';
4
5
 
5
6
  interface PodConnection {
6
7
  source: {
@@ -162,7 +163,7 @@ export const TableNestedHeaders: React.FunctionComponent = () => {
162
163
  <Td dataLabel={columnNames.datetime}>
163
164
  <div>
164
165
  <span>{new Date(connection.timestamp).toDateString()}</span>{' '}
165
- <span className="pf-v5-u-color-200">{new Date(connection.timestamp).toLocaleTimeString()}</span>
166
+ <span className={textStyles.color_200}>{new Date(connection.timestamp).toLocaleTimeString()}</span>
166
167
  </div>
167
168
  </Td>
168
169
  <Td dataLabel={columnNames.source}>
@@ -171,7 +172,7 @@ export const TableNestedHeaders: React.FunctionComponent = () => {
171
172
  <span>{connection.source.port.num}</span>
172
173
  </StackItem>
173
174
  <StackItem>
174
- <span className="pf-v5-u-color-200">({connection.source.port.protocol})</span>
175
+ <span className={textStyles.color_200}>({connection.source.port.protocol})</span>
175
176
  </StackItem>
176
177
  </Stack>
177
178
  </Td>
@@ -181,7 +182,7 @@ export const TableNestedHeaders: React.FunctionComponent = () => {
181
182
  <span>{connection.destination.port.num}</span>
182
183
  </StackItem>
183
184
  <StackItem>
184
- <span className="pf-v5-u-color-200">({connection.destination.port.protocol})</span>
185
+ <span className={textStyles.color_200}>({connection.destination.port.protocol})</span>
185
186
  </StackItem>
186
187
  </Stack>
187
188
  </Td>
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Table, Thead, Tr, Th, Tbody, Td, InnerScrollContainer, ThProps } from '@patternfly/react-table';
3
3
  import { Stack, StackItem } from '@patternfly/react-core';
4
+ import textStyles from '@patternfly/react-styles/css/utilities/Text/text';
4
5
 
5
6
  interface PodConnection {
6
7
  source: {
@@ -165,7 +166,7 @@ export const TableNestedHeaders: React.FunctionComponent = () => {
165
166
  <Td dataLabel={columnNames.datetime}>
166
167
  <div>
167
168
  <span>{new Date(connection.timestamp).toDateString()}</span>{' '}
168
- <span className="pf-v5-u-color-200">{new Date(connection.timestamp).toLocaleTimeString()}</span>
169
+ <span className={textStyles.color_200}>{new Date(connection.timestamp).toLocaleTimeString()}</span>
169
170
  </div>
170
171
  </Td>
171
172
  <Td dataLabel={columnNames.source}>
@@ -174,7 +175,7 @@ export const TableNestedHeaders: React.FunctionComponent = () => {
174
175
  <span>{connection.source.port.num}</span>
175
176
  </StackItem>
176
177
  <StackItem>
177
- <span className="pf-v5-u-color-200">({connection.source.port.protocol})</span>
178
+ <span className={textStyles.color_200}>({connection.source.port.protocol})</span>
178
179
  </StackItem>
179
180
  </Stack>
180
181
  </Td>
@@ -184,7 +185,7 @@ export const TableNestedHeaders: React.FunctionComponent = () => {
184
185
  <span>{connection.destination.port.num}</span>
185
186
  </StackItem>
186
187
  <StackItem>
187
- <span className="pf-v5-u-color-200">({connection.destination.port.protocol})</span>
188
+ <span className={textStyles.color_200}>({connection.destination.port.protocol})</span>
188
189
  </StackItem>
189
190
  </Stack>
190
191
  </Td>
@@ -31,7 +31,7 @@ export const treeRow =
31
31
  {icon}
32
32
  </span>
33
33
  )}
34
- <span className="pf-v5-c-table__text" key="table-text">
34
+ <span className={styles.tableText} key="table-text">
35
35
  {content as React.ReactNode}
36
36
  </span>
37
37
  </div>
@@ -41,7 +41,7 @@ export const treeRow =
41
41
  };
42
42
  return {
43
43
  component: 'th',
44
- className: 'pf-v5-c-table__tree-view-title-cell',
44
+ className: stylesTreeView.tableTreeViewTitleCell,
45
45
  children:
46
46
  level !== undefined ? (
47
47
  <div className={css(stylesTreeView.tableTreeViewMain)}>
@@ -83,7 +83,7 @@ export const treeRow =
83
83
  onToggleRowDetails && onToggleRowDetails(event, rowIndex, content as React.ReactNode, rowData)
84
84
  }
85
85
  >
86
- <span className="pf-v5-c-table__details-toggle-icon">
86
+ <span className={`${styles.table}__details-toggle-icon`}>
87
87
  <EllipsisHIcon aria-hidden />
88
88
  </span>
89
89
  </Button>
@@ -29,6 +29,9 @@ import {
29
29
  IRowData,
30
30
  ISeparator
31
31
  } from '../TableTypes';
32
+ import { css } from '@patternfly/react-styles';
33
+ import tableStyles from '@patternfly/react-styles/css/components/Table/table';
34
+ import dropdownStyles from '@patternfly/react-styles/css/components/Dropdown/dropdown';
32
35
 
33
36
  const testCellActions = async ({
34
37
  actions,
@@ -65,7 +68,7 @@ const testCellActions = async ({
65
68
  actions = actionResolver(rowData, extraData);
66
69
  }
67
70
 
68
- expect(returnedData).toMatchObject({ className: 'pf-v5-c-table__action' });
71
+ expect(returnedData).toMatchObject({ className: tableStyles.tableAction });
69
72
 
70
73
  if (!actions || actions.length === 0) {
71
74
  expect(returnedData.children).toBeUndefined();
@@ -73,7 +76,9 @@ const testCellActions = async ({
73
76
  const { container } = render(returnedData.children as React.ReactElement<any>);
74
77
  await user.click(screen.getAllByRole('button')[0]);
75
78
  await waitFor(() =>
76
- expect(container.querySelectorAll('.pf-v5-c-dropdown__menu li button')).toHaveLength(expectDisabled ? 0 : 1)
79
+ expect(container.querySelectorAll(`.${dropdownStyles.dropdownMenu} li button`)).toHaveLength(
80
+ expectDisabled ? 0 : 1
81
+ )
77
82
  );
78
83
  }
79
84
  };
@@ -86,7 +91,7 @@ describe('Transformer functions', () => {
86
91
  extraParams: { onSelect }
87
92
  };
88
93
  const returnedData = selectable('', { column, rowData: {} } as IExtra);
89
- expect(returnedData).toMatchObject({ className: 'pf-v5-c-table__check' });
94
+ expect(returnedData).toMatchObject({ className: tableStyles.tableCheck });
90
95
 
91
96
  const user = userEvent.setup();
92
97
 
@@ -103,7 +108,7 @@ describe('Transformer functions', () => {
103
108
  extraParams: { onSelect }
104
109
  };
105
110
  const returnedData = selectable('', { column, rowIndex: 0, rowData: { selected: true } } as IExtra);
106
- expect(returnedData).toMatchObject({ className: 'pf-v5-c-table__check' });
111
+ expect(returnedData).toMatchObject({ className: tableStyles.tableCheck });
107
112
  const user = userEvent.setup();
108
113
 
109
114
  render(returnedData.children as React.ReactElement<any>);
@@ -128,7 +133,7 @@ describe('Transformer functions', () => {
128
133
  const onSort = jest.fn();
129
134
  const column = { extraParams: { sortBy: {}, onSort } };
130
135
  const returnedData = sortable('', { column, columnIndex: 0 });
131
- expect(returnedData).toMatchObject({ className: 'pf-v5-c-table__sort' });
136
+ expect(returnedData).toMatchObject({ className: tableStyles.tableSort });
132
137
 
133
138
  const user = userEvent.setup();
134
139
 
@@ -154,7 +159,7 @@ describe('Transformer functions', () => {
154
159
  const onSort = jest.fn();
155
160
  const column = { extraParams: { sortBy: { index: 0, direction: 'desc' }, onSort } };
156
161
  const returnedData = sortable('', { column, columnIndex: 0 } as IExtra);
157
- expect(returnedData).toMatchObject({ className: 'pf-v5-c-table__sort pf-m-selected' });
162
+ expect(returnedData).toMatchObject({ className: css(tableStyles.tableSort, tableStyles.modifiers.selected) });
158
163
 
159
164
  const user = userEvent.setup();
160
165
 
@@ -226,7 +231,7 @@ describe('Transformer functions', () => {
226
231
  extraParams: { onCollapse }
227
232
  };
228
233
  const returnedData = collapsible('', { rowIndex: 0, rowData, column });
229
- expect(returnedData).toMatchObject({ className: 'pf-v5-c-table__toggle' });
234
+ expect(returnedData).toMatchObject({ className: tableStyles.tableToggle });
230
235
 
231
236
  const user = userEvent.setup();
232
237
 
@@ -332,7 +337,7 @@ describe('Transformer functions', () => {
332
337
  extraParams: { onRowEdit }
333
338
  };
334
339
  const returned = editable('test', { rowIndex: 0, column });
335
- expect(returned).toMatchObject({ className: 'pf-v5-c-table__inline-edit-action' });
340
+ expect(returned).toMatchObject({ className: tableStyles.tableInlineEditAction });
336
341
  });
337
342
 
338
343
  describe('visibility classNames', () => {
@@ -5,6 +5,7 @@ import { compoundExpand } from '@patternfly/react-table';
5
5
  import CodeBranchIcon from '@patternfly/react-icons/dist/esm/icons/code-branch-icon';
6
6
  import CodeIcon from '@patternfly/react-icons/dist/esm/icons/code-icon';
7
7
  import CubeIcon from '@patternfly/react-icons/dist/esm/icons/cube-icon';
8
+ import spacing from '@patternfly/react-styles/css/utilities/Spacing/spacing';
8
9
 
9
10
  interface Repository {
10
11
  name: string;
@@ -117,7 +118,7 @@ export const LegacyTableCompoundExpandable: React.FunctionComponent = () => {
117
118
  cells: [
118
119
  {
119
120
  title: (
120
- <div className="pf-v5-u-m-md" id={`compound-expansion-table-${repo.name}-1`}>
121
+ <div className={spacing.mMd} id={`compound-expansion-table-${repo.name}-1`}>
121
122
  Expanded content for {repo.name}: Branches goes here!
122
123
  </div>
123
124
  ),
@@ -132,7 +133,7 @@ export const LegacyTableCompoundExpandable: React.FunctionComponent = () => {
132
133
  cells: [
133
134
  {
134
135
  title: (
135
- <div className="pf-v5-u-m-md" id={`compound-expansion-table-${repo.name}-2`}>
136
+ <div className={spacing.mMd} id={`compound-expansion-table-${repo.name}-2`}>
136
137
  Expanded content for {repo.name}: Pull requests goes here!
137
138
  </div>
138
139
  ),
@@ -147,7 +148,7 @@ export const LegacyTableCompoundExpandable: React.FunctionComponent = () => {
147
148
  cells: [
148
149
  {
149
150
  title: (
150
- <div className="pf-v5-u-m-md" id={`compound-expansion-table-${repo.name}-3`}>
151
+ <div className={spacing.mMd} id={`compound-expansion-table-${repo.name}-3`}>
151
152
  Expanded content for {repo.name}: Workspaces goes here!
152
153
  </div>
153
154
  ),
@@ -1,6 +1,8 @@
1
1
  import React from 'react';
2
2
  import { Table, TableHeader, TableBody, TableProps } from '@patternfly/react-table/deprecated';
3
3
  import { css } from '@patternfly/react-styles';
4
+ /* eslint-disable camelcase */
5
+ import global_primary_color_100 from '@patternfly/react-tokens/dist/esm/global_primary_color_100';
4
6
 
5
7
  interface Repository {
6
8
  name: string;
@@ -30,7 +32,7 @@ export const LegacyTableMisc: React.FunctionComponent = () => {
30
32
  const customRowWrapper: TableProps['rowWrapper'] = ({ trRef, className, rowProps, row: _row }) => {
31
33
  const isOddRow = rowProps ? !!((rowProps.rowIndex + 1) % 2) : true;
32
34
  const customStyle = {
33
- borderLeft: '3px solid var(--pf-v5-global--primary-color--100)'
35
+ borderLeft: `3px solid ${global_primary_color_100.var}`
34
36
  };
35
37
  return (
36
38
  <tr
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { headerCol } from '@patternfly/react-table';
3
3
  import { Table, TableHeader, TableBody, TableProps } from '@patternfly/react-table/deprecated';
4
4
  import { Checkbox } from '@patternfly/react-core';
5
+ import spacing from '@patternfly/react-styles/css/utilities/Spacing/spacing';
5
6
 
6
7
  interface Repository {
7
8
  name: string;
@@ -96,7 +97,7 @@ export const LegacyTableSelectable: React.FunctionComponent = () => {
96
97
  <div>
97
98
  <Checkbox
98
99
  label="Can select all"
99
- className="pf-v5-u-mb-lg"
100
+ className={spacing.mbLg}
100
101
  isChecked={canSelectAll}
101
102
  onChange={(_event, checked) => setCanSelectAll(checked)}
102
103
  aria-label="toggle select all checkbox"
@@ -32,6 +32,8 @@ import {
32
32
 
33
33
  import { css } from '@patternfly/react-styles';
34
34
  import styles from '@patternfly/react-styles/css/components/Table/table';
35
+ import spacing from '@patternfly/react-styles/css/utilities/Spacing/spacing';
36
+ import global_primary_color_100 from '@patternfly/react-tokens/dist/esm/global_primary_color_100';
35
37
 
36
38
  ## Table Columns
37
39
 
@@ -21,6 +21,7 @@ import CodeIcon from '@patternfly/react-icons/dist/esm/icons/code-icon';
21
21
  import CubeIcon from '@patternfly/react-icons/dist/esm/icons/cube-icon';
22
22
  import { DashboardWrapper } from '@patternfly/react-core/src/demos/DashboardWrapper';
23
23
  import FilterIcon from '@patternfly/react-icons/dist/esm/icons/filter-icon';
24
+ import spacing from '@patternfly/react-styles/css/utilities/Spacing/spacing';
24
25
 
25
26
  export const CompoundExpandable = () => {
26
27
  // In real usage, this data would come from some external source like an API via props.
@@ -248,7 +249,7 @@ export const CompoundExpandable = () => {
248
249
  <NestedItemsTable />
249
250
  ) : (
250
251
  <ExpandableRowContent>
251
- <div className="pf-v5-u-m-md">
252
+ <div className={spacing.mMd}>
252
253
  Expanded content for {repo.name}: {expandedCellKey} goes here!
253
254
  </div>
254
255
  </ExpandableRowContent>