@patternfly/react-core 4.203.1 → 4.205.0
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 +30 -0
- package/dist/esm/components/Form/Form.d.ts +3 -1
- package/dist/esm/components/Form/Form.d.ts.map +1 -1
- package/dist/esm/components/Form/Form.js +4 -2
- package/dist/esm/components/Form/Form.js.map +1 -1
- package/dist/esm/components/ProgressStepper/ProgressStep.d.ts +3 -5
- package/dist/esm/components/ProgressStepper/ProgressStep.d.ts.map +1 -1
- package/dist/esm/components/ProgressStepper/ProgressStep.js +6 -6
- package/dist/esm/components/ProgressStepper/ProgressStep.js.map +1 -1
- package/dist/esm/components/Switch/Switch.d.ts +7 -5
- package/dist/esm/components/Switch/Switch.d.ts.map +1 -1
- package/dist/esm/components/Switch/Switch.js +3 -1
- package/dist/esm/components/Switch/Switch.js.map +1 -1
- package/dist/js/components/Form/Form.d.ts +3 -1
- package/dist/js/components/Form/Form.d.ts.map +1 -1
- package/dist/js/components/Form/Form.js +4 -2
- package/dist/js/components/Form/Form.js.map +1 -1
- package/dist/js/components/ProgressStepper/ProgressStep.d.ts +3 -5
- package/dist/js/components/ProgressStepper/ProgressStep.d.ts.map +1 -1
- package/dist/js/components/ProgressStepper/ProgressStep.js +7 -6
- package/dist/js/components/ProgressStepper/ProgressStep.js.map +1 -1
- package/dist/js/components/Switch/Switch.d.ts +7 -5
- package/dist/js/components/Switch/Switch.d.ts.map +1 -1
- package/dist/js/components/Switch/Switch.js +3 -1
- package/dist/js/components/Switch/Switch.js.map +1 -1
- package/dist/umd/react-core.css +102 -14
- package/dist/umd/react-core.js +18 -9
- package/dist/umd/react-core.min.css +255 -167
- package/dist/umd/react-core.min.js +4 -4
- package/package.json +6 -6
- package/src/components/Form/Form.tsx +11 -2
- package/src/components/ProgressStepper/ProgressStep.tsx +10 -15
- package/src/components/ProgressStepper/__tests__/ProgressStepper.test.tsx +1 -1
- package/src/components/ProgressStepper/examples/ProgressStepper.md +13 -20
- package/src/components/Switch/Switch.tsx +13 -5
- package/src/components/Switch/examples/Switch.md +64 -5
- package/src/components/Toolbar/examples/Toolbar.md +7 -39
- package/src/demos/Tabs.md +6 -1
- package/src/demos/examples/DashboardWrapper.js +16 -2
- package/src/demos/examples/Tabs/GrayTabs.tsx +2 -8
- package/src/demos/examples/Tabs/ModalTabs.tsx +1 -1
- package/src/demos/{Tabs/NestedTabsDemo.js → examples/Tabs/NestedTabs.tsx} +12 -13
- package/src/demos/examples/Tabs/NestedUnindentedTabs.tsx +174 -0
- package/src/demos/examples/Tabs/TabsAndTable.tsx +1 -1
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Card,
|
|
4
|
+
CardHeader,
|
|
5
|
+
CardBody,
|
|
6
|
+
Grid,
|
|
7
|
+
GridItem,
|
|
8
|
+
PageSection,
|
|
9
|
+
Tabs,
|
|
10
|
+
Tab,
|
|
11
|
+
TabContent,
|
|
12
|
+
TabContentBody,
|
|
13
|
+
TabTitleText,
|
|
14
|
+
Title,
|
|
15
|
+
Text,
|
|
16
|
+
TextContent,
|
|
17
|
+
TitleSizes
|
|
18
|
+
} from '@patternfly/react-core';
|
|
19
|
+
import DashboardWrapper from '../DashboardWrapper';
|
|
20
|
+
|
|
21
|
+
export const NestedUnindentedTabs: React.FunctionComponent = () => {
|
|
22
|
+
const [activeTabKey, setActiveTabKey] = React.useState(1);
|
|
23
|
+
const [activeNestedTabKey, setActiveNestedTabKey] = React.useState(10);
|
|
24
|
+
|
|
25
|
+
// Toggle currently active tab
|
|
26
|
+
const handleTabClick = (tabIndex: number) => setActiveTabKey(tabIndex);
|
|
27
|
+
|
|
28
|
+
// Toggle currently active nested tab
|
|
29
|
+
const handleNestedTabClick = (tabIndex: number) => setActiveNestedTabKey(tabIndex);
|
|
30
|
+
|
|
31
|
+
const tabContent = (
|
|
32
|
+
<Grid hasGutter>
|
|
33
|
+
<GridItem>
|
|
34
|
+
<CardHeader>
|
|
35
|
+
<Title headingLevel="h1" size={TitleSizes['2xl']}>
|
|
36
|
+
Get started with Red Hat Enterprise Linux
|
|
37
|
+
</Title>
|
|
38
|
+
</CardHeader>
|
|
39
|
+
</GridItem>
|
|
40
|
+
<GridItem>
|
|
41
|
+
<Tabs
|
|
42
|
+
activeKey={activeNestedTabKey}
|
|
43
|
+
isSecondary
|
|
44
|
+
onSelect={(_event, tabIndex) => handleNestedTabClick(Number(tabIndex))}
|
|
45
|
+
id="nested-tabs-example-nested-tabs-list"
|
|
46
|
+
>
|
|
47
|
+
<Tab eventKey={10} title={<TabTitleText>x86 architecture</TabTitleText>} tabContentId={`tabContent${10}`} />
|
|
48
|
+
<Tab
|
|
49
|
+
eventKey={11}
|
|
50
|
+
title={<TabTitleText>Additional Architectures</TabTitleText>}
|
|
51
|
+
tabContentId={`tabContent${11}`}
|
|
52
|
+
/>
|
|
53
|
+
</Tabs>
|
|
54
|
+
</GridItem>
|
|
55
|
+
<GridItem>
|
|
56
|
+
<TabContent
|
|
57
|
+
key={10}
|
|
58
|
+
eventKey={10}
|
|
59
|
+
id={`tabContent${10}`}
|
|
60
|
+
activeKey={activeNestedTabKey}
|
|
61
|
+
hidden={10 !== activeNestedTabKey}
|
|
62
|
+
>
|
|
63
|
+
<TabContentBody>
|
|
64
|
+
<Grid hasGutter>
|
|
65
|
+
<GridItem>
|
|
66
|
+
<TextContent>
|
|
67
|
+
<Text>To perform a standard x86_64 installation using the GUI, you'll need to:</Text>
|
|
68
|
+
</TextContent>
|
|
69
|
+
</GridItem>
|
|
70
|
+
<Grid md={6} xl2={3} hasGutter>
|
|
71
|
+
<GridItem>
|
|
72
|
+
<Card isFullHeight>
|
|
73
|
+
<CardHeader>Check system requirements</CardHeader>
|
|
74
|
+
<CardBody>
|
|
75
|
+
Your physical or virtual machine should meet the <a href="#">system requirement</a>.
|
|
76
|
+
</CardBody>
|
|
77
|
+
</Card>
|
|
78
|
+
</GridItem>
|
|
79
|
+
|
|
80
|
+
<GridItem>
|
|
81
|
+
<Card isFullHeight>
|
|
82
|
+
<CardHeader>Download an installation ISO image</CardHeader>
|
|
83
|
+
<CardBody>
|
|
84
|
+
{' '}
|
|
85
|
+
<a href="#">Download</a> the binary DVD ISO.
|
|
86
|
+
</CardBody>
|
|
87
|
+
</Card>
|
|
88
|
+
</GridItem>
|
|
89
|
+
<GridItem>
|
|
90
|
+
<Card isFullHeight>
|
|
91
|
+
<CardHeader>Create a bootable installation media</CardHeader>
|
|
92
|
+
<CardBody>
|
|
93
|
+
{' '}
|
|
94
|
+
<a href="#">Create</a> a bootable installation media, for example a USB flash drive.
|
|
95
|
+
</CardBody>
|
|
96
|
+
</Card>
|
|
97
|
+
</GridItem>
|
|
98
|
+
<GridItem>
|
|
99
|
+
<Card isFullHeight>
|
|
100
|
+
<CardHeader>Install and register your system</CardHeader>
|
|
101
|
+
<CardBody>
|
|
102
|
+
Boot the installation, register your system, attach RHEL subscriptions, and install RHEL from the
|
|
103
|
+
Red Hat Content Delivery Network (CDN) using the GUI.
|
|
104
|
+
</CardBody>
|
|
105
|
+
</Card>
|
|
106
|
+
</GridItem>
|
|
107
|
+
</Grid>
|
|
108
|
+
</Grid>
|
|
109
|
+
</TabContentBody>
|
|
110
|
+
</TabContent>
|
|
111
|
+
<TabContent
|
|
112
|
+
key={11}
|
|
113
|
+
eventKey={11}
|
|
114
|
+
id={`tabContent${11}`}
|
|
115
|
+
activeKey={activeNestedTabKey}
|
|
116
|
+
hidden={11 !== activeNestedTabKey}
|
|
117
|
+
>
|
|
118
|
+
<TabContentBody>Additional architectures panel</TabContentBody>
|
|
119
|
+
</TabContent>
|
|
120
|
+
<TabContent
|
|
121
|
+
key={12}
|
|
122
|
+
eventKey={12}
|
|
123
|
+
id={`tabContent${12}`}
|
|
124
|
+
activeKey={activeNestedTabKey}
|
|
125
|
+
hidden={12 !== activeNestedTabKey}
|
|
126
|
+
>
|
|
127
|
+
<TabContentBody>Operators panel</TabContentBody>
|
|
128
|
+
</TabContent>
|
|
129
|
+
<TabContent
|
|
130
|
+
key={13}
|
|
131
|
+
eventKey={13}
|
|
132
|
+
id={`tabContent${13}`}
|
|
133
|
+
activeKey={activeNestedTabKey}
|
|
134
|
+
hidden={13 !== activeNestedTabKey}
|
|
135
|
+
>
|
|
136
|
+
<TabContentBody>Virtualization panel</TabContentBody>
|
|
137
|
+
</TabContent>
|
|
138
|
+
</GridItem>
|
|
139
|
+
</Grid>
|
|
140
|
+
);
|
|
141
|
+
|
|
142
|
+
return (
|
|
143
|
+
<DashboardWrapper hasPageTemplateTitle>
|
|
144
|
+
<PageSection type="tabs" isWidthLimited variant="light">
|
|
145
|
+
<Tabs
|
|
146
|
+
isBox
|
|
147
|
+
activeKey={activeTabKey}
|
|
148
|
+
onSelect={(_event, tabIndex) => handleTabClick(Number(tabIndex))}
|
|
149
|
+
usePageInsets
|
|
150
|
+
id="nested-tabs-example-tabs-list"
|
|
151
|
+
>
|
|
152
|
+
<Tab eventKey={0} title={<TabTitleText>What's new</TabTitleText>} tabContentId={`tabContent${0}`} />
|
|
153
|
+
<Tab eventKey={1} title={<TabTitleText>Get started</TabTitleText>} tabContentId={`tabContent${1}`} />
|
|
154
|
+
<Tab eventKey={2} title={<TabTitleText>Knowledge</TabTitleText>} tabContentId={`tabContent${2}`} />
|
|
155
|
+
<Tab eventKey={3} title={<TabTitleText>Support</TabTitleText>} tabContentId={`tabContent${3}`} />
|
|
156
|
+
</Tabs>
|
|
157
|
+
</PageSection>
|
|
158
|
+
<PageSection variant="light">
|
|
159
|
+
<TabContent key={0} eventKey={0} id={`tabContent${0}`} activeKey={activeTabKey} hidden={0 !== activeTabKey}>
|
|
160
|
+
<TabContentBody>What's new panel</TabContentBody>
|
|
161
|
+
</TabContent>
|
|
162
|
+
<TabContent key={1} eventKey={1} id={`tabContent${1}`} activeKey={activeTabKey} hidden={1 !== activeTabKey}>
|
|
163
|
+
<TabContentBody>{tabContent}</TabContentBody>
|
|
164
|
+
</TabContent>
|
|
165
|
+
<TabContent key={2} eventKey={2} id={`tabContent${2}`} activeKey={activeTabKey} hidden={2 !== activeTabKey}>
|
|
166
|
+
<TabContentBody>Knowledge panel</TabContentBody>
|
|
167
|
+
</TabContent>
|
|
168
|
+
<TabContent key={3} eventKey={3} id={`tabContent${3}`} activeKey={activeTabKey} hidden={3 !== activeTabKey}>
|
|
169
|
+
<TabContentBody>Support Panel</TabContentBody>
|
|
170
|
+
</TabContent>
|
|
171
|
+
</PageSection>
|
|
172
|
+
</DashboardWrapper>
|
|
173
|
+
);
|
|
174
|
+
};
|