@patternfly/react-core 4.165.1 → 4.168.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 (164) hide show
  1. package/CHANGELOG.md +145 -0
  2. package/README.md +1 -1
  3. package/dist/esm/components/Dropdown/DropdownToggle.d.ts +1 -1
  4. package/dist/esm/components/Dropdown/DropdownToggle.d.ts.map +1 -1
  5. package/dist/esm/components/Dropdown/KebabToggle.d.ts +1 -1
  6. package/dist/esm/components/Dropdown/KebabToggle.d.ts.map +1 -1
  7. package/dist/esm/components/DualListSelector/DualListSelector.d.ts +1 -0
  8. package/dist/esm/components/DualListSelector/DualListSelector.d.ts.map +1 -1
  9. package/dist/esm/components/DualListSelector/DualListSelector.js +23 -10
  10. package/dist/esm/components/DualListSelector/DualListSelector.js.map +1 -1
  11. package/dist/esm/components/Label/Label.d.ts +4 -4
  12. package/dist/esm/components/Label/Label.d.ts.map +1 -1
  13. package/dist/esm/components/LabelGroup/LabelGroup.d.ts +3 -3
  14. package/dist/esm/components/LabelGroup/LabelGroup.d.ts.map +1 -1
  15. package/dist/esm/components/Menu/Menu.d.ts +11 -11
  16. package/dist/esm/components/Menu/Menu.d.ts.map +1 -1
  17. package/dist/esm/components/Menu/MenuItem.d.ts +5 -5
  18. package/dist/esm/components/Menu/MenuItem.d.ts.map +1 -1
  19. package/dist/esm/components/Select/Select.d.ts +1 -1
  20. package/dist/esm/components/Select/Select.d.ts.map +1 -1
  21. package/dist/esm/components/Select/SelectOption.d.ts +1 -1
  22. package/dist/esm/components/Select/SelectOption.d.ts.map +1 -1
  23. package/dist/esm/components/Tabs/TabContentBody.d.ts +11 -0
  24. package/dist/esm/components/Tabs/TabContentBody.d.ts.map +1 -0
  25. package/dist/esm/components/Tabs/TabContentBody.js +10 -0
  26. package/dist/esm/components/Tabs/TabContentBody.js.map +1 -0
  27. package/dist/esm/components/Tabs/index.d.ts +1 -0
  28. package/dist/esm/components/Tabs/index.d.ts.map +1 -1
  29. package/dist/esm/components/Tabs/index.js +1 -0
  30. package/dist/esm/components/Tabs/index.js.map +1 -1
  31. package/dist/esm/components/TextInputGroup/TextInputGroup.d.ts +9 -0
  32. package/dist/esm/components/TextInputGroup/TextInputGroup.d.ts.map +1 -0
  33. package/dist/esm/components/TextInputGroup/TextInputGroup.js +10 -0
  34. package/dist/esm/components/TextInputGroup/TextInputGroup.js.map +1 -0
  35. package/dist/esm/components/TextInputGroup/TextInputGroupMain.d.ts +15 -0
  36. package/dist/esm/components/TextInputGroup/TextInputGroupMain.d.ts.map +1 -0
  37. package/dist/esm/components/TextInputGroup/TextInputGroupMain.js +15 -0
  38. package/dist/esm/components/TextInputGroup/TextInputGroupMain.js.map +1 -0
  39. package/dist/esm/components/TextInputGroup/TextInputGroupUtilities.d.ts +9 -0
  40. package/dist/esm/components/TextInputGroup/TextInputGroupUtilities.d.ts.map +1 -0
  41. package/dist/esm/components/TextInputGroup/TextInputGroupUtilities.js +10 -0
  42. package/dist/esm/components/TextInputGroup/TextInputGroupUtilities.js.map +1 -0
  43. package/dist/esm/components/TextInputGroup/index.d.ts +4 -0
  44. package/dist/esm/components/TextInputGroup/index.d.ts.map +1 -0
  45. package/dist/esm/components/TextInputGroup/index.js +4 -0
  46. package/dist/esm/components/TextInputGroup/index.js.map +1 -0
  47. package/dist/esm/components/Toolbar/Toolbar.d.ts +2 -0
  48. package/dist/esm/components/Toolbar/Toolbar.d.ts.map +1 -1
  49. package/dist/esm/components/Toolbar/Toolbar.js +2 -2
  50. package/dist/esm/components/Toolbar/Toolbar.js.map +1 -1
  51. package/dist/esm/components/index.d.ts +1 -0
  52. package/dist/esm/components/index.d.ts.map +1 -1
  53. package/dist/esm/components/index.js +1 -0
  54. package/dist/esm/components/index.js.map +1 -1
  55. package/dist/js/components/Dropdown/DropdownToggle.d.ts +1 -1
  56. package/dist/js/components/Dropdown/DropdownToggle.d.ts.map +1 -1
  57. package/dist/js/components/Dropdown/KebabToggle.d.ts +1 -1
  58. package/dist/js/components/Dropdown/KebabToggle.d.ts.map +1 -1
  59. package/dist/js/components/DualListSelector/DualListSelector.d.ts +1 -0
  60. package/dist/js/components/DualListSelector/DualListSelector.d.ts.map +1 -1
  61. package/dist/js/components/DualListSelector/DualListSelector.js +23 -10
  62. package/dist/js/components/DualListSelector/DualListSelector.js.map +1 -1
  63. package/dist/js/components/Label/Label.d.ts +4 -4
  64. package/dist/js/components/Label/Label.d.ts.map +1 -1
  65. package/dist/js/components/LabelGroup/LabelGroup.d.ts +3 -3
  66. package/dist/js/components/LabelGroup/LabelGroup.d.ts.map +1 -1
  67. package/dist/js/components/Menu/Menu.d.ts +11 -11
  68. package/dist/js/components/Menu/Menu.d.ts.map +1 -1
  69. package/dist/js/components/Menu/MenuItem.d.ts +5 -5
  70. package/dist/js/components/Menu/MenuItem.d.ts.map +1 -1
  71. package/dist/js/components/Select/Select.d.ts +1 -1
  72. package/dist/js/components/Select/Select.d.ts.map +1 -1
  73. package/dist/js/components/Select/SelectOption.d.ts +1 -1
  74. package/dist/js/components/Select/SelectOption.d.ts.map +1 -1
  75. package/dist/js/components/Tabs/TabContentBody.d.ts +11 -0
  76. package/dist/js/components/Tabs/TabContentBody.d.ts.map +1 -0
  77. package/dist/js/components/Tabs/TabContentBody.js +14 -0
  78. package/dist/js/components/Tabs/TabContentBody.js.map +1 -0
  79. package/dist/js/components/Tabs/index.d.ts +1 -0
  80. package/dist/js/components/Tabs/index.d.ts.map +1 -1
  81. package/dist/js/components/Tabs/index.js +1 -0
  82. package/dist/js/components/Tabs/index.js.map +1 -1
  83. package/dist/js/components/TextInputGroup/TextInputGroup.d.ts +9 -0
  84. package/dist/js/components/TextInputGroup/TextInputGroup.d.ts.map +1 -0
  85. package/dist/js/components/TextInputGroup/TextInputGroup.js +14 -0
  86. package/dist/js/components/TextInputGroup/TextInputGroup.js.map +1 -0
  87. package/dist/js/components/TextInputGroup/TextInputGroupMain.d.ts +15 -0
  88. package/dist/js/components/TextInputGroup/TextInputGroupMain.d.ts.map +1 -0
  89. package/dist/js/components/TextInputGroup/TextInputGroupMain.js +19 -0
  90. package/dist/js/components/TextInputGroup/TextInputGroupMain.js.map +1 -0
  91. package/dist/js/components/TextInputGroup/TextInputGroupUtilities.d.ts +9 -0
  92. package/dist/js/components/TextInputGroup/TextInputGroupUtilities.d.ts.map +1 -0
  93. package/dist/js/components/TextInputGroup/TextInputGroupUtilities.js +14 -0
  94. package/dist/js/components/TextInputGroup/TextInputGroupUtilities.js.map +1 -0
  95. package/dist/js/components/TextInputGroup/index.d.ts +4 -0
  96. package/dist/js/components/TextInputGroup/index.d.ts.map +1 -0
  97. package/dist/js/components/TextInputGroup/index.js +7 -0
  98. package/dist/js/components/TextInputGroup/index.js.map +1 -0
  99. package/dist/js/components/Toolbar/Toolbar.d.ts +2 -0
  100. package/dist/js/components/Toolbar/Toolbar.d.ts.map +1 -1
  101. package/dist/js/components/Toolbar/Toolbar.js +2 -2
  102. package/dist/js/components/Toolbar/Toolbar.js.map +1 -1
  103. package/dist/js/components/index.d.ts +1 -0
  104. package/dist/js/components/index.d.ts.map +1 -1
  105. package/dist/js/components/index.js +1 -0
  106. package/dist/js/components/index.js.map +1 -1
  107. package/dist/styles/assets/pficon/pficon.woff +0 -0
  108. package/dist/styles/assets/pficon/pficon.woff2 +0 -0
  109. package/dist/umd/react-core.css +360 -17
  110. package/dist/umd/react-core.js +959 -884
  111. package/dist/umd/react-core.min.css +652 -309
  112. package/dist/umd/react-core.min.js +3 -3
  113. package/package.json +6 -6
  114. package/src/components/CodeBlock/examples/CodeBlock.md +0 -1
  115. package/src/components/DataList/examples/DataList.md +4 -3
  116. package/src/components/DragDrop/examples/DragDrop.md +1 -0
  117. package/src/components/Dropdown/DropdownToggle.tsx +1 -1
  118. package/src/components/Dropdown/KebabToggle.tsx +1 -1
  119. package/src/components/DualListSelector/DualListSelector.tsx +25 -23
  120. package/src/components/DualListSelector/examples/DualListSelector.md +3 -0
  121. package/src/components/HelperText/examples/HelperText.md +0 -1
  122. package/src/components/Label/Label.tsx +4 -4
  123. package/src/components/Label/examples/Label.md +1 -1
  124. package/src/components/LabelGroup/LabelGroup.tsx +3 -3
  125. package/src/components/LabelGroup/examples/LabelGroup.md +1 -1
  126. package/src/components/Menu/Menu.tsx +11 -11
  127. package/src/components/Menu/MenuItem.tsx +5 -5
  128. package/src/components/Menu/examples/Menu.md +2 -9
  129. package/src/components/Modal/__tests__/ModalBox.test.tsx +11 -21
  130. package/src/components/Modal/__tests__/ModalBoxDescription.test.tsx +12 -0
  131. package/src/components/Modal/__tests__/ModalBoxTitle.test.tsx +59 -0
  132. package/src/components/Modal/__tests__/ModalContent.test.tsx +15 -10
  133. package/src/components/Modal/__tests__/__snapshots__/ModalBox.test.tsx.snap +12 -30
  134. package/src/components/Modal/__tests__/__snapshots__/ModalBoxDescription.test.tsx.snap +10 -0
  135. package/src/components/Modal/__tests__/__snapshots__/ModalBoxTitle.test.tsx.snap +158 -0
  136. package/src/components/Modal/__tests__/__snapshots__/ModalContent.test.tsx.snap +53 -22
  137. package/src/components/Select/Select.tsx +1 -1
  138. package/src/components/Select/SelectOption.tsx +1 -1
  139. package/src/components/Select/examples/Select.md +4 -11
  140. package/src/components/Sidebar/examples/Sidebar.md +0 -1
  141. package/src/components/Tabs/TabContentBody.tsx +24 -0
  142. package/src/components/Tabs/__tests__/Tabs.test.tsx +4 -3
  143. package/src/components/Tabs/__tests__/__snapshots__/Tabs.test.tsx.snap +10 -2
  144. package/src/components/Tabs/examples/Tabs.md +40 -0
  145. package/src/components/Tabs/index.ts +1 -0
  146. package/src/components/TextInputGroup/TextInputGroup.tsx +22 -0
  147. package/src/components/TextInputGroup/TextInputGroupMain.tsx +43 -0
  148. package/src/components/TextInputGroup/TextInputGroupUtilities.tsx +22 -0
  149. package/src/components/TextInputGroup/__tests__/TextInputGroup.test.tsx +77 -0
  150. package/src/components/TextInputGroup/__tests__/__snapshots__/TextInputGroup.test.tsx.snap +211 -0
  151. package/src/components/TextInputGroup/examples/TextInputGroup.md +138 -0
  152. package/src/components/TextInputGroup/index.ts +3 -0
  153. package/src/components/Toolbar/Toolbar.tsx +4 -0
  154. package/src/components/Wizard/examples/Wizard.md +17 -1
  155. package/src/components/index.ts +1 -0
  156. package/src/demos/ComposableMenu.md +4 -13
  157. package/src/demos/DataListDemo.md +0 -2
  158. package/src/demos/DatePicker.md +1 -0
  159. package/src/demos/NotificationDrawer/NotificationDrawer.md +1 -0
  160. package/src/demos/ProgressDemo.md +82 -0
  161. package/src/demos/ProgressStepperDemo.md +1 -0
  162. package/src/demos/SearchInput/SearchInput.md +1 -0
  163. package/src/demos/Tabs.md +439 -0
  164. package/src/demos/examples/DashboardWrapper.js +16 -2
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  id: Composable menu
3
3
  section: demos
4
- beta: true
5
4
  ---
6
5
 
7
6
  import { Link } from '@reach/router';
@@ -106,7 +105,6 @@ import React from 'react';
106
105
  import {
107
106
  MenuToggle,
108
107
  Menu,
109
- MenuContent,
110
108
  MenuList,
111
109
  MenuItem,
112
110
  MenuGroup,
@@ -116,9 +114,6 @@ import {
116
114
  import BarsIcon from '@patternfly/react-icons/dist/esm/icons/bars-icon';
117
115
  import ClipboardIcon from '@patternfly/react-icons/dist/esm/icons/clipboard-icon';
118
116
  import CodeBranchIcon from '@patternfly/react-icons/dist/esm/icons/code-branch-icon';
119
- import LayerGroupIcon from '@patternfly/react-icons/dist/esm/icons/layer-group-icon';
120
- import CubeIcon from '@patternfly/react-icons/dist/esm/icons/cube-icon';
121
- import TableIcon from '@patternfly/react-icons/dist/esm/icons/table-icon';
122
117
  import BellIcon from '@patternfly/react-icons/dist/esm/icons/bell-icon';
123
118
 
124
119
  ActionComposableMenu = () => {
@@ -303,7 +298,7 @@ SelectComposableMenu = () => {
303
298
 
304
299
  ### Drilldown menu with toggle
305
300
 
306
- ```js
301
+ ```js isBeta
307
302
  import React from 'react';
308
303
  import {
309
304
  MenuToggle,
@@ -547,7 +542,7 @@ DrilldownComposableMenu = () => {
547
542
 
548
543
  ```js
549
544
  import React from 'react';
550
- import { MenuToggle, Menu, MenuContent, MenuGroup, MenuList, MenuItem, Popper, TreeView } from '@patternfly/react-core';
545
+ import { MenuToggle, Menu, MenuContent, MenuGroup, MenuList, Popper, TreeView } from '@patternfly/react-core';
551
546
 
552
547
  FilterTreeComposableMenu = () => {
553
548
  const [isOpen, setIsOpen] = React.useState(false);
@@ -786,9 +781,9 @@ FilterTreeComposableMenu = () => {
786
781
 
787
782
  The flyout will automatically position to the left or top if it would otherwise go outside the window. The menu must be placed in a container outside the main content like Popper, [Popover](/components/popover) or [Tooltip](/components/tooltip) since it may go over the side nav.
788
783
 
789
- ```js
784
+ ```js isBeta
790
785
  import React from 'react';
791
- import { MenuToggle, Menu, MenuContent, MenuGroup, MenuList, MenuItem, Popper } from '@patternfly/react-core';
786
+ import { MenuToggle, Menu, MenuContent, MenuList, MenuItem, Popper } from '@patternfly/react-core';
792
787
 
793
788
  MenuWithFlyout = () => {
794
789
  const [isOpen, setIsOpen] = React.useState(false);
@@ -1182,18 +1177,14 @@ import {
1182
1177
  MenuFooter,
1183
1178
  MenuList,
1184
1179
  MenuItem,
1185
- MenuGroup,
1186
1180
  MenuInput,
1187
1181
  Popper,
1188
- Tooltip,
1189
1182
  Divider,
1190
1183
  TextInput,
1191
1184
  InputGroup,
1192
1185
  Button
1193
1186
  } from '@patternfly/react-core';
1194
- import { Link } from '@reach/router';
1195
1187
  import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
1196
- import pfIcon from './examples/pf-logo-small.svg';
1197
1188
 
1198
1189
  MenuContextSelector = () => {
1199
1190
  const items = [
@@ -21,7 +21,6 @@ import {
21
21
  DataListItem,
22
22
  DataListItemRow,
23
23
  DataListCell,
24
- DataListCheck,
25
24
  DataListAction,
26
25
  DataListToggle,
27
26
  DataListContent,
@@ -40,7 +39,6 @@ import {
40
39
  Tooltip
41
40
  } from '@patternfly/react-core';
42
41
  import CodeBranchIcon from '@patternfly/react-icons/dist/esm/icons/code-branch-icon';
43
- import AngleDownIcon from '@patternfly/react-icons/dist/esm/icons/angle-down-icon';
44
42
  import AngleRightIcon from '@patternfly/react-icons/dist/esm/icons/angle-right-icon';
45
43
  import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
46
44
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  id: Date picker
3
3
  section: components
4
+ beta: true
4
5
  ---
5
6
 
6
7
  ## Demos
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  id: Notification drawer
3
3
  section: components
4
+ beta: true
4
5
  ---
5
6
 
6
7
  import BellIcon from '@patternfly/react-icons/dist/esm/icons/bell-icon';
@@ -0,0 +1,82 @@
1
+ ---
2
+ id: Progress
3
+ section: components
4
+ ---
5
+
6
+ ## Demos
7
+
8
+ ### Basic
9
+
10
+ ```js
11
+ import React from 'react';
12
+ import { Progress, Button, Stack, StackItem } from '@patternfly/react-core';
13
+
14
+ ProgressStepperDemo = () => {
15
+ const [currentValue, setCurrentValue] = React.useState(0);
16
+
17
+ const onProgressUpdate = nextValue => {
18
+ setCurrentValue(nextValue);
19
+ };
20
+
21
+ return (
22
+ <Stack>
23
+ <StackItem>
24
+ <Button onClick={() => onProgressUpdate(currentValue - 10)} isDisabled={currentValue === 0}>
25
+ Decrease value
26
+ </Button>{' '}
27
+ <Button onClick={() => onProgressUpdate(currentValue + 10)} isDisabled={currentValue === 100}>
28
+ Increase value
29
+ </Button>
30
+ <br />
31
+ <br />
32
+ </StackItem>
33
+ <StackItem>
34
+ <div className="pf-screen-reader" aria-live="polite">
35
+ {`Progress value is ${currentValue}%.`}
36
+ </div>
37
+ <Progress value={currentValue} title="Title" />
38
+ </StackItem>
39
+ </Stack>
40
+ );
41
+ };
42
+ ```
43
+
44
+ ### With only increasing progress
45
+
46
+ Sometimes a progress bar should only show increases to progress state. In this case, before the next value is set it should be checked against the current progress. The `Decrease progress` button attempts to set a lower progress value, simulating an update to a progress state that isn't desired, but won't change the progress state due to this check.
47
+
48
+ ```js
49
+ import React from 'react';
50
+ import { Progress, Button, Stack, StackItem } from '@patternfly/react-core';
51
+
52
+ ProgressStepperDemo = () => {
53
+ const [currentValue, setCurrentValue] = React.useState(0);
54
+
55
+ const onProgressUpdate = nextValue => {
56
+ if (nextValue > currentValue) {
57
+ setCurrentValue(nextValue);
58
+ }
59
+ };
60
+
61
+ return (
62
+ <Stack>
63
+ <StackItem>
64
+ <Button onClick={() => onProgressUpdate(currentValue - 10)} isDisabled={currentValue === 0}>
65
+ Decrease value
66
+ </Button>{' '}
67
+ <Button onClick={() => onProgressUpdate(currentValue + 10)} isDisabled={currentValue === 100}>
68
+ Increase value
69
+ </Button>
70
+ <br />
71
+ <br />
72
+ </StackItem>
73
+ <StackItem>
74
+ <div className="pf-screen-reader" aria-live="polite">
75
+ {`Progress value is ${currentValue}%.`}
76
+ </div>
77
+ <Progress value={currentValue} title="Title" />
78
+ </StackItem>
79
+ </Stack>
80
+ );
81
+ };
82
+ ```
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  id: Progress stepper
3
3
  section: components
4
+ beta: true
4
5
  ---
5
6
 
6
7
  ## Demos
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  id: Search input
3
3
  section: components
4
+ beta: true
4
5
  ---
5
6
  import {
6
7
  Button,
@@ -0,0 +1,439 @@
1
+ ---
2
+ id: Tabs
3
+ section: components
4
+ ---
5
+
6
+ import DashboardWrapper from './examples/DashboardWrapper';
7
+ import CheckCircleIcon from '@patternfly/react-icons/dist/js/icons/check-circle-icon';
8
+ import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
9
+
10
+ ## Demos
11
+
12
+ ### Open tabs
13
+
14
+ ```js isFullscreen
15
+ import React from 'react';
16
+ import {
17
+ PageSection,
18
+ PageSectionVariants,
19
+ PageBreadcrumb,
20
+ Breadcrumb,
21
+ BreadcrumbItem,
22
+ Tabs,
23
+ Tab,
24
+ TabContent,
25
+ TabContentBody,
26
+ TabTitleText,
27
+ Title,
28
+ DescriptionList,
29
+ DescriptionListGroup,
30
+ DescriptionListTerm,
31
+ DescriptionListDescription,
32
+ Label,
33
+ LabelGroup,
34
+ Flex,
35
+ FlexItem
36
+ } from '@patternfly/react-core';
37
+ import DashboardWrapper from './examples/DashboardWrapper';
38
+ import CheckCircleIcon from '@patternfly/react-icons/dist/js/icons/check-circle-icon';
39
+ import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
40
+
41
+ TabsOpenDemo = () => {
42
+ const [activeTabKey, setActiveTabKey] = React.useState(0);
43
+
44
+ // Toggle currently active tab
45
+ const handleTabClick = (event, tabIndex) => {
46
+ setActiveTabKey(tabIndex);
47
+ };
48
+
49
+ const tabsBreadcrumb = (
50
+ <PageBreadcrumb isWidthLimited>
51
+ <Breadcrumb>
52
+ <BreadcrumbItem to="#">Overview</BreadcrumbItem>
53
+ <BreadcrumbItem to="#">Pods</BreadcrumbItem>
54
+ <BreadcrumbItem to="#" isActive>
55
+ Pod details{' '}
56
+ </BreadcrumbItem>
57
+ </Breadcrumb>
58
+ </PageBreadcrumb>
59
+ );
60
+
61
+ const tabContent = (
62
+ <Flex direction={{ default: 'column' }}>
63
+ <FlexItem spacer={{ default: 'spacerLg' }}>
64
+ <Title headingLevel="h2" size="lg" className="pf-u-mt-sm" id="open-tabs-example-tabs-list-details-title">
65
+ Pod details
66
+ </Title>
67
+ </FlexItem>
68
+ <FlexItem>
69
+ <DescriptionList columnModifier={{ lg: '2Col' }} aria-labelledby="open-tabs-example-tabs-list-details-title">
70
+ <DescriptionListGroup>
71
+ <DescriptionListTerm>Name</DescriptionListTerm>
72
+ <DescriptionListDescription>3scale-control-fccb6ddb9-phyqv9</DescriptionListDescription>
73
+ </DescriptionListGroup>
74
+ <DescriptionListGroup>
75
+ <DescriptionListTerm>Status</DescriptionListTerm>
76
+ <DescriptionListDescription>
77
+ <Flex spacer={{ default: 'spacerLg' }}>
78
+ <FlexItem>
79
+ <CheckCircleIcon />
80
+ </FlexItem>
81
+ <FlexItem>Running</FlexItem>
82
+ </Flex>
83
+ </DescriptionListDescription>
84
+ </DescriptionListGroup>
85
+ <DescriptionListGroup>
86
+ <DescriptionListTerm>Namespace</DescriptionListTerm>
87
+ <DescriptionListDescription>
88
+ <Flex spaceItems={{ default: 'spaceItemsSm' }}>
89
+ <FlexItem>
90
+ <Label color="cyan">NS</Label>
91
+ </FlexItem>
92
+ <FlexItem>
93
+ <a href="#">knative-serving-ingress</a>
94
+ </FlexItem>
95
+ </Flex>
96
+ </DescriptionListDescription>
97
+ </DescriptionListGroup>
98
+ <DescriptionListGroup>
99
+ <DescriptionListTerm>Restart policy</DescriptionListTerm>
100
+ <DescriptionListDescription>Always restart</DescriptionListDescription>
101
+ </DescriptionListGroup>
102
+ <DescriptionListGroup>
103
+ <DescriptionListTerm>Labels</DescriptionListTerm>
104
+ <DescriptionListDescription>
105
+ <LabelGroup>
106
+ <Label>app=3scale-gateway</Label>
107
+ <Label>pod-template-has=6747686899</Label>
108
+ </LabelGroup>
109
+ </DescriptionListDescription>
110
+ </DescriptionListGroup>
111
+ <DescriptionListGroup>
112
+ <DescriptionListTerm>Active deadline seconds</DescriptionListTerm>
113
+ <DescriptionListDescription>Not configured</DescriptionListDescription>
114
+ </DescriptionListGroup>
115
+ <DescriptionListGroup>
116
+ <DescriptionListTerm>Tolerations</DescriptionListTerm>
117
+ <DescriptionListDescription>stuff</DescriptionListDescription>
118
+ </DescriptionListGroup>
119
+ <DescriptionListGroup>
120
+ <DescriptionListTerm>Pod IP</DescriptionListTerm>
121
+ <DescriptionListDescription>10..345.2.197</DescriptionListDescription>
122
+ </DescriptionListGroup>
123
+ <DescriptionListGroup>
124
+ <DescriptionListTerm>Annotations</DescriptionListTerm>
125
+ <DescriptionListDescription>stuff</DescriptionListDescription>
126
+ </DescriptionListGroup>
127
+ <DescriptionListGroup>
128
+ <DescriptionListTerm>Node</DescriptionListTerm>
129
+ <DescriptionListDescription>
130
+ <Flex spaceItems={{ default: 'spaceItemsSm' }}>
131
+ <FlexItem>
132
+ <Label color="purple">N</Label>
133
+ </FlexItem>
134
+ <FlexItem>ip-10-0-233-118.us-east-2.computer.external</FlexItem>
135
+ </Flex>
136
+ </DescriptionListDescription>
137
+ </DescriptionListGroup>
138
+ <DescriptionListGroup>
139
+ <DescriptionListTerm>Created at</DescriptionListTerm>
140
+ <DescriptionListDescription>
141
+ <time>Oct 15, 1:51 pm</time>
142
+ </DescriptionListDescription>
143
+ </DescriptionListGroup>
144
+ </DescriptionList>
145
+ </FlexItem>
146
+ </Flex>
147
+ );
148
+
149
+ return (
150
+ <DashboardWrapper hasNoBreadcrumb>
151
+ {tabsBreadcrumb}
152
+ <PageSection isWidthLimited variant={PageSectionVariants.light}>
153
+ <Flex
154
+ spaceItems={{ default: 'spaceItemsMd' }}
155
+ alignItems={{ default: 'alignItemsFlexStart' }}
156
+ flexWrap={{ default: 'noWrap' }}
157
+ >
158
+ <FlexItem>
159
+ <Label color="blue">N</Label>
160
+ </FlexItem>
161
+ <FlexItem>
162
+ <Title headingLevel="h1" size="2xl">
163
+ 3scale-control-fccb6ddb9-phyqv9
164
+ </Title>
165
+ </FlexItem>
166
+ <FlexItem flex={{ default: 'flexNone' }}>
167
+ <Label icon={<InfoCircleIcon />}>Running</Label>
168
+ </FlexItem>
169
+ </Flex>
170
+ </PageSection>
171
+ <PageSection type="tabs" variant={PageSectionVariants.light} isWidthLimited>
172
+ <Tabs activeKey={activeTabKey} onSelect={handleTabClick} usePageInsets id="open-tabs-example-tabs-list">
173
+ <Tab eventKey={0} title={<TabTitleText>Details</TabTitleText>} tabContentId={`tabContent${0}`} />
174
+ <Tab eventKey={1} title={<TabTitleText>YAML</TabTitleText>} tabContentId={`tabContent${1}`} />
175
+ <Tab eventKey={2} title={<TabTitleText>Environment</TabTitleText>} tabContentId={`tabContent${2}`} />
176
+ <Tab eventKey={3} title={<TabTitleText>Events</TabTitleText>} tabContentId={`tabContent${3}`} />
177
+ <Tab eventKey={4} title={<TabTitleText>Terminal</TabTitleText>} tabContentId={`tabContent${4}`} />
178
+ </Tabs>
179
+ </PageSection>
180
+ <PageSection isWidthLimited variant={PageSectionVariants.light}>
181
+ <TabContent key={0} eventKey={0} id={`tabContent${0}`} activeKey={activeTabKey} hidden={0 !== activeTabKey}>
182
+ <TabContentBody>{tabContent}</TabContentBody>
183
+ </TabContent>
184
+ <TabContent key={1} eventKey={1} id={`tabContent${1}`} activeKey={activeTabKey} hidden={1 !== activeTabKey}>
185
+ <TabContentBody>YAML panel</TabContentBody>
186
+ </TabContent>
187
+ <TabContent key={2} eventKey={2} id={`tabContent${2}`} activeKey={activeTabKey} hidden={2 !== activeTabKey}>
188
+ <TabContentBody>Environment panel</TabContentBody>
189
+ </TabContent>
190
+ <TabContent key={3} eventKey={3} id={`tabContent${3}`} activeKey={activeTabKey} hidden={3 !== activeTabKey}>
191
+ <TabContentBody>Events panel</TabContentBody>
192
+ </TabContent>
193
+ <TabContent key={4} eventKey={4} id={`tabContent${4}`} activeKey={activeTabKey} hidden={4 !== activeTabKey}>
194
+ <TabContentBody>Terminal panel</TabContentBody>
195
+ </TabContent>
196
+ </PageSection>
197
+ </DashboardWrapper>
198
+ );
199
+ };
200
+ ```
201
+
202
+ ### Open tabs with secondary tabs
203
+
204
+ ```js isFullscreen
205
+ import React from 'react';
206
+ import {
207
+ PageSection,
208
+ PageSectionVariants,
209
+ PageBreadcrumb,
210
+ Breadcrumb,
211
+ BreadcrumbItem,
212
+ Tabs,
213
+ Tab,
214
+ TabContent,
215
+ TabContentBody,
216
+ TabTitleText,
217
+ Title,
218
+ DescriptionList,
219
+ DescriptionListGroup,
220
+ DescriptionListTerm,
221
+ DescriptionListDescription,
222
+ Label,
223
+ LabelGroup,
224
+ Flex,
225
+ FlexItem
226
+ } from '@patternfly/react-core';
227
+ import DashboardWrapper from './examples/DashboardWrapper';
228
+ import CheckCircleIcon from '@patternfly/react-icons/dist/js/icons/check-circle-icon';
229
+ import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
230
+
231
+ TabsOpenWithSecondaryTabsDemo = () => {
232
+ const [activeTabKey, setActiveTabKey] = React.useState(0);
233
+ const [activeTabKeySecondary, setActiveTabKeySecondary] = React.useState(10);
234
+
235
+ // Toggle currently active tab
236
+ const handleTabClick = (event, tabIndex) => {
237
+ setActiveTabKey(tabIndex);
238
+ };
239
+
240
+ // Toggle currently active secondary tab
241
+ const handleTabClickSecondary = (event, tabIndex) => {
242
+ setActiveTabKeySecondary(tabIndex);
243
+ };
244
+
245
+ const tabsBreadcrumb = (
246
+ <PageBreadcrumb isWidthLimited>
247
+ <Breadcrumb>
248
+ <BreadcrumbItem to="#">Overview</BreadcrumbItem>
249
+ <BreadcrumbItem to="#">Pods</BreadcrumbItem>
250
+ <BreadcrumbItem to="#" isActive>
251
+ Pod details{' '}
252
+ </BreadcrumbItem>
253
+ </Breadcrumb>
254
+ </PageBreadcrumb>
255
+ );
256
+
257
+ const tabContent = (
258
+ <Flex direction={{ default: 'column' }}>
259
+ <FlexItem spacer={{ default: 'spacerLg' }}>
260
+ <Title headingLevel="h2" size="lg" className="pf-u-mt-sm" id="open-tabs-example-tabs-list-details-title">
261
+ Pod details
262
+ </Title>
263
+ </FlexItem>
264
+ <FlexItem>
265
+ <DescriptionList columnModifier={{ lg: '2Col' }} aria-labelledby="open-tabs-example-tabs-list-details-title">
266
+ <DescriptionListGroup>
267
+ <DescriptionListTerm>Name</DescriptionListTerm>
268
+ <DescriptionListDescription>3scale-control-fccb6ddb9-phyqv9</DescriptionListDescription>
269
+ </DescriptionListGroup>
270
+ <DescriptionListGroup>
271
+ <DescriptionListTerm>Status</DescriptionListTerm>
272
+ <DescriptionListDescription>
273
+ <Flex spacer={{ default: 'spacerLg' }}>
274
+ <FlexItem>
275
+ <CheckCircleIcon />
276
+ </FlexItem>
277
+ <FlexItem>Running</FlexItem>
278
+ </Flex>
279
+ </DescriptionListDescription>
280
+ </DescriptionListGroup>
281
+ <DescriptionListGroup>
282
+ <DescriptionListTerm>Namespace</DescriptionListTerm>
283
+ <DescriptionListDescription>
284
+ <Flex spaceItems={{ default: 'spaceItemsSm' }}>
285
+ <FlexItem>
286
+ <Label color="cyan">NS</Label>
287
+ </FlexItem>
288
+ <FlexItem>
289
+ <a href="#">knative-serving-ingress</a>
290
+ </FlexItem>
291
+ </Flex>
292
+ </DescriptionListDescription>
293
+ </DescriptionListGroup>
294
+ <DescriptionListGroup>
295
+ <DescriptionListTerm>Restart policy</DescriptionListTerm>
296
+ <DescriptionListDescription>Always restart</DescriptionListDescription>
297
+ </DescriptionListGroup>
298
+ <DescriptionListGroup>
299
+ <DescriptionListTerm>Labels</DescriptionListTerm>
300
+ <DescriptionListDescription>
301
+ <LabelGroup>
302
+ <Label>app=3scale-gateway</Label>
303
+ <Label>pod-template-has=6747686899</Label>
304
+ </LabelGroup>
305
+ </DescriptionListDescription>
306
+ </DescriptionListGroup>
307
+ <DescriptionListGroup>
308
+ <DescriptionListTerm>Active deadline seconds</DescriptionListTerm>
309
+ <DescriptionListDescription>Not configured</DescriptionListDescription>
310
+ </DescriptionListGroup>
311
+ <DescriptionListGroup>
312
+ <DescriptionListTerm>Tolerations</DescriptionListTerm>
313
+ <DescriptionListDescription>stuff</DescriptionListDescription>
314
+ </DescriptionListGroup>
315
+ <DescriptionListGroup>
316
+ <DescriptionListTerm>Pod IP</DescriptionListTerm>
317
+ <DescriptionListDescription>10..345.2.197</DescriptionListDescription>
318
+ </DescriptionListGroup>
319
+ <DescriptionListGroup>
320
+ <DescriptionListTerm>Annotations</DescriptionListTerm>
321
+ <DescriptionListDescription>stuff</DescriptionListDescription>
322
+ </DescriptionListGroup>
323
+ <DescriptionListGroup>
324
+ <DescriptionListTerm>Node</DescriptionListTerm>
325
+ <DescriptionListDescription>
326
+ <Flex spaceItems={{ default: 'spaceItemsSm' }}>
327
+ <FlexItem>
328
+ <Label color="purple">N</Label>
329
+ </FlexItem>
330
+ <FlexItem>ip-10-0-233-118.us-east-2.computer.external</FlexItem>
331
+ </Flex>
332
+ </DescriptionListDescription>
333
+ </DescriptionListGroup>
334
+ <DescriptionListGroup>
335
+ <DescriptionListTerm>Created at</DescriptionListTerm>
336
+ <DescriptionListDescription>
337
+ <time>Oct 15, 1:51 pm</time>
338
+ </DescriptionListDescription>
339
+ </DescriptionListGroup>
340
+ </DescriptionList>
341
+ </FlexItem>
342
+ </Flex>
343
+ );
344
+
345
+ return (
346
+ <DashboardWrapper hasNoBreadcrumb>
347
+ {tabsBreadcrumb}
348
+ <PageSection isWidthLimited variant={PageSectionVariants.light}>
349
+ <Flex
350
+ spaceItems={{ default: 'spaceItemsMd' }}
351
+ alignItems={{ default: 'alignItemsFlexStart' }}
352
+ flexWrap={{ default: 'noWrap' }}
353
+ >
354
+ <FlexItem>
355
+ <Label color="blue">N</Label>
356
+ </FlexItem>
357
+ <FlexItem>
358
+ <Title headingLevel="h1" size="2xl">
359
+ 3scale-control-fccb6ddb9-phyqv9
360
+ </Title>
361
+ </FlexItem>
362
+ <FlexItem flex={{ default: 'flexNone' }}>
363
+ <Label icon={<InfoCircleIcon />}>Running</Label>
364
+ </FlexItem>
365
+ </Flex>
366
+ </PageSection>
367
+ <PageSection type="tabs" variant={PageSectionVariants.light} isWidthLimited>
368
+ <Tabs activeKey={activeTabKey} onSelect={handleTabClick} usePageInsets id="open-tabs-example-tabs-list">
369
+ <Tab eventKey={0} title={<TabTitleText>Details</TabTitleText>} tabContentId={`tabContent${0}`} />
370
+ <Tab eventKey={1} title={<TabTitleText>YAML</TabTitleText>} tabContentId={`tabContent${1}`} />
371
+ <Tab eventKey={2} title={<TabTitleText>Environment</TabTitleText>} tabContentId={`tabContent${2}`} />
372
+ <Tab eventKey={3} title={<TabTitleText>Events</TabTitleText>} tabContentId={`tabContent${3}`} />
373
+ <Tab eventKey={4} title={<TabTitleText>Terminal</TabTitleText>} tabContentId={`tabContent${4}`} />
374
+ </Tabs>
375
+ </PageSection>
376
+ <PageSection isWidthLimited variant={PageSectionVariants.light}>
377
+ <Flex direction={{ default: 'column' }}>
378
+ <FlexItem>
379
+ <TabContent key={0} eventKey={0} id={`tabContent${0}`} activeKey={activeTabKey} hidden={0 !== activeTabKey}>
380
+ <TabContentBody>
381
+ <Tabs
382
+ isSecondary
383
+ activeKey={activeTabKeySecondary}
384
+ onSelect={handleTabClickSecondary}
385
+ inset={{ default: 'insetNone' }}
386
+ id="open-with-secondary-tabs-example-tabs-list-secondary"
387
+ >
388
+ <Tab
389
+ eventKey={10}
390
+ title={<TabTitleText>Pod information</TabTitleText>}
391
+ tabContentId={`tabContent${10}`}
392
+ />
393
+ <Tab
394
+ eventKey={11}
395
+ title={<TabTitleText>Editable aspects</TabTitleText>}
396
+ tabContentId={`tabContent${11}`}
397
+ />
398
+ </Tabs>
399
+ <TabContent
400
+ key={10}
401
+ eventKey={10}
402
+ id={`tabContent${10}`}
403
+ activeKey={activeTabKeySecondary}
404
+ hidden={10 !== activeTabKeySecondary}
405
+ >
406
+ <TabContentBody>{tabContent}</TabContentBody>
407
+ </TabContent>
408
+ <TabContent
409
+ key={11}
410
+ eventKey={11}
411
+ id={`tabContent${11}`}
412
+ activeKey={activeTabKeySecondary}
413
+ hidden={11 !== activeTabKeySecondary}
414
+ >
415
+ <TabContentBody>Editable aspects</TabContentBody>
416
+ </TabContent>
417
+ </TabContentBody>
418
+ </TabContent>
419
+ </FlexItem>
420
+ <FlexItem>
421
+ <TabContent key={1} eventKey={1} id={`tabContent${1}`} activeKey={activeTabKey} hidden={1 !== activeTabKey}>
422
+ <TabContentBody>YAML panel</TabContentBody>
423
+ </TabContent>
424
+ <TabContent key={2} eventKey={2} id={`tabContent${2}`} activeKey={activeTabKey} hidden={2 !== activeTabKey}>
425
+ <TabContentBody>Environment panel</TabContentBody>
426
+ </TabContent>
427
+ <TabContent key={3} eventKey={3} id={`tabContent${3}`} activeKey={activeTabKey} hidden={3 !== activeTabKey}>
428
+ <TabContentBody>Events panel</TabContentBody>
429
+ </TabContent>
430
+ <TabContent key={4} eventKey={4} id={`tabContent${4}`} activeKey={activeTabKey} hidden={4 !== activeTabKey}>
431
+ <TabContentBody>Terminal panel</TabContentBody>
432
+ </TabContent>
433
+ </FlexItem>
434
+ </Flex>
435
+ </PageSection>
436
+ </DashboardWrapper>
437
+ );
438
+ };
439
+ ```
@@ -37,7 +37,21 @@ export default class DashboardWrapper extends React.Component {
37
37
 
38
38
  render() {
39
39
  const { activeItem } = this.state;
40
- const { children, mainContainerId, breadcrumb, header, sidebar, sidebarNavOpen, onPageResize } = this.props;
40
+ const {
41
+ children,
42
+ mainContainerId,
43
+ breadcrumb,
44
+ header,
45
+ sidebar,
46
+ sidebarNavOpen,
47
+ onPageResize,
48
+ hasNoBreadcrumb
49
+ } = this.props;
50
+
51
+ let renderedBreadcrumb;
52
+ if (!hasNoBreadcrumb) {
53
+ renderedBreadcrumb = breadcrumb !== undefined ? breadcrumb : DashboardBreadcrumb;
54
+ }
41
55
 
42
56
  const PageNav = (
43
57
  <Nav onSelect={this.onNavSelect} aria-label="Nav">
@@ -74,7 +88,7 @@ export default class DashboardWrapper extends React.Component {
74
88
  sidebar={sidebar !== undefined ? sidebar : _sidebar}
75
89
  isManagedSidebar
76
90
  skipToContent={PageSkipToContent}
77
- breadcrumb={breadcrumb !== undefined ? breadcrumb : DashboardBreadcrumb}
91
+ breadcrumb={renderedBreadcrumb}
78
92
  mainContainerId={mainContainerId ? mainContainerId : 'main-content-page-layout-default-nav'}
79
93
  onPageResize={onPageResize}
80
94
  >