@patternfly/react-table 6.6.1-prerelease.0 → 6.6.1-prerelease.10

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 (27) hide show
  1. package/CHANGELOG.md +40 -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/demos/DashboardHeader.js +1 -1
  11. package/dist/esm/demos/DashboardHeader.js.map +1 -1
  12. package/dist/js/demos/DashboardHeader.js +1 -1
  13. package/dist/js/demos/DashboardHeader.js.map +1 -1
  14. package/dist/umd/assets/{output-bkpDV61l.css → output-Bs_04JEL.css} +6431 -6392
  15. package/dist/umd/react-table.min.js +2 -2
  16. package/package.json +6 -6
  17. package/src/components/Table/examples/TableEditable.tsx +34 -36
  18. package/src/demos/DashboardHeader.tsx +1 -1
  19. package/src/demos/examples/TableColumnManagement.tsx +5 -4
  20. package/src/demos/examples/TableColumnManagementWithDraggable.tsx +5 -4
  21. package/src/demos/examples/TableCompact.tsx +6 -5
  22. package/src/demos/examples/TableExpandCollapseAll.tsx +6 -6
  23. package/src/demos/examples/TableFilterable.tsx +5 -4
  24. package/src/demos/examples/TableSortableResponsive.tsx +6 -5
  25. package/src/demos/examples/TableStaticBottomPagination.tsx +6 -5
  26. package/src/demos/examples/TableStickyHeader.tsx +6 -6
  27. package/src/deprecated/components/Table/examples/Table.md +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/react-table",
3
- "version": "6.6.1-prerelease.0",
3
+ "version": "6.6.1-prerelease.10",
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.1-prerelease.0",
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",
43
+ "@patternfly/react-core": "^6.6.1-prerelease.8",
44
+ "@patternfly/react-icons": "^6.6.1-prerelease.3",
45
+ "@patternfly/react-styles": "^6.6.1-prerelease.2",
46
+ "@patternfly/react-tokens": "^6.6.1-prerelease.2",
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": "8acdd6b143e4d03b24e4f3964e9e6c1fa3696154"
54
+ "gitHead": "008744f97e0d226d41c0bec0b78ec938943392e3"
55
55
  }
@@ -35,49 +35,47 @@ const EditButtonsCell: React.FunctionComponent<EditButtonsCellProps> = ({
35
35
 
36
36
  return (
37
37
  <>
38
- <Td
39
- dataLabel="Save and cancel buttons"
40
- className={css(
41
- inlineEditStyles.inlineEditGroup,
42
- inlineEditStyles.modifiers.iconGroup,
43
- inlineEditStyles.modifiers.actionGroup
44
- )}
45
- >
46
- <div className={css(inlineEditStyles.inlineEditAction, inlineEditStyles.modifiers.valid)}>
47
- <Button
48
- aria-label={`Save edits of ${rowAriaLabel}`}
49
- onClick={() => onClick('save')}
50
- onKeyDown={(event) => onKeyDown(event, 'stopEditing')}
51
- variant="plain"
52
- >
53
- <RhMicronsCheckmarkIcon />
54
- </Button>
38
+ <Td dataLabel="Edit row data" hasAction>
39
+ <div
40
+ className={css(
41
+ inlineEditStyles.inlineEditGroup,
42
+ inlineEditStyles.modifiers.iconGroup,
43
+ inlineEditStyles.modifiers.actionGroup
44
+ )}
45
+ >
46
+ <div className={css(inlineEditStyles.inlineEditAction, inlineEditStyles.modifiers.valid)}>
47
+ <Button
48
+ aria-label={`Save edits of ${rowAriaLabel}`}
49
+ onClick={() => onClick('save')}
50
+ onKeyDown={(event) => onKeyDown(event, 'stopEditing')}
51
+ variant="plain"
52
+ >
53
+ <RhMicronsCheckmarkIcon />
54
+ </Button>
55
+ </div>
56
+ <div className={css(inlineEditStyles.inlineEditAction)}>
57
+ <Button
58
+ aria-label={`Discard edits of ${rowAriaLabel}`}
59
+ onClick={() => onClick('cancel')}
60
+ onKeyDown={(event) => onKeyDown(event, 'stopEditing')}
61
+ variant="plain"
62
+ >
63
+ <RhMicronsCloseIcon />
64
+ </Button>
65
+ </div>
55
66
  </div>
56
- <div className={css(inlineEditStyles.inlineEditAction)}>
67
+ <div className={css(inlineEditStyles.inlineEditAction, inlineEditStyles.modifiers.enableEditable)}>
57
68
  <Button
58
- aria-label={`Discard edits of ${rowAriaLabel}`}
59
- onClick={() => onClick('cancel')}
60
- onKeyDown={(event) => onKeyDown(event, 'stopEditing')}
69
+ ref={editButtonRef}
70
+ aria-label={`Edit ${rowAriaLabel}`}
71
+ onClick={() => onClick('edit')}
72
+ onKeyDown={(event) => onKeyDown(event, 'edit')}
61
73
  variant="plain"
62
74
  >
63
- <RhMicronsCloseIcon />
75
+ <RhUiEditFillIcon />
64
76
  </Button>
65
77
  </div>
66
78
  </Td>
67
- <Td
68
- dataLabel="Edit button"
69
- className={css(inlineEditStyles.inlineEditAction, inlineEditStyles.modifiers.enableEditable)}
70
- >
71
- <Button
72
- ref={editButtonRef}
73
- aria-label={`Edit ${rowAriaLabel}`}
74
- onClick={() => onClick('edit')}
75
- onKeyDown={(event) => onKeyDown(event, 'edit')}
76
- variant="plain"
77
- >
78
- <RhUiEditFillIcon />
79
- </Button>
80
- </Td>
81
79
  </>
82
80
  );
83
81
  };
@@ -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>
@@ -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,
@@ -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
  }
@@ -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,
@@ -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
  }
@@ -12,6 +12,7 @@ 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';
@@ -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
  }
@@ -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,
@@ -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,
@@ -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
 
@@ -10,6 +10,7 @@ import {
10
10
  MenuToggle,
11
11
  MenuToggleElement,
12
12
  Label,
13
+ LabelStatus,
13
14
  Select,
14
15
  SelectOption,
15
16
  PaginationVariant
@@ -67,25 +68,25 @@ export const TableStaticBottomPagination: React.FunctionComponent = () => {
67
68
  case 'Running':
68
69
  return (
69
70
  <span>
70
- <Label color="green">{labelText}</Label>
71
+ <Label status={LabelStatus.success}>{labelText}</Label>
71
72
  </span>
72
73
  );
73
74
  case 'Stopped':
74
75
  return (
75
76
  <span>
76
- <Label color="orange">{labelText}</Label>
77
+ <Label status={LabelStatus.warning}>{labelText}</Label>
77
78
  </span>
78
79
  );
79
- case 'Needs Maintenance':
80
+ case 'Needs maintenance':
80
81
  return (
81
82
  <span>
82
- <Label color="blue">{labelText}</Label>
83
+ <Label status={LabelStatus.info}>{labelText}</Label>
83
84
  </span>
84
85
  );
85
86
  case 'Down':
86
87
  return (
87
88
  <span>
88
- <Label color="red">{labelText}</Label>
89
+ <Label status={LabelStatus.danger}>{labelText}</Label>
89
90
  </span>
90
91
  );
91
92
  }
@@ -1,4 +1,4 @@
1
- import { Label, PageSection } from '@patternfly/react-core';
1
+ import { Label, LabelStatus, PageSection } from '@patternfly/react-core';
2
2
  import { Table, Thead, Tr, Th, Tbody, Td, TableText } from '@patternfly/react-table';
3
3
  import { DashboardWrapper } from '@patternfly/react-table/dist/esm/demos/DashboardWrapper';
4
4
  import { rows, columns } from '@patternfly/react-table/dist/esm/demos/sampleData';
@@ -7,13 +7,13 @@ export const TableStickyHeader: React.FunctionComponent = () => {
7
7
  const renderLabel = (labelText: string) => {
8
8
  switch (labelText) {
9
9
  case 'Running':
10
- return <Label color="green">{labelText}</Label>;
10
+ return <Label status={LabelStatus.success}>{labelText}</Label>;
11
11
  case 'Stopped':
12
- return <Label color="orange">{labelText}</Label>;
13
- case 'Needs Maintenance':
14
- return <Label color="blue">{labelText}</Label>;
12
+ return <Label status={LabelStatus.warning}>{labelText}</Label>;
13
+ case 'Needs maintenance':
14
+ return <Label status={LabelStatus.info}>{labelText}</Label>;
15
15
  case 'Down':
16
- return <Label color="red">{labelText}</Label>;
16
+ return <Label status={LabelStatus.danger}>{labelText}</Label>;
17
17
  }
18
18
  };
19
19
 
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  id: Table
3
- cssPrefix: pf-c-table
4
3
  section: components
5
4
  propComponents: ['Table', 'TableHeader', 'TableBody', 'ISortBy']
6
5
  ouia: true