@patternfly/react-core 4.222.3 → 4.222.4
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 +8 -0
- package/dist/esm/components/AboutModal/AboutModal.d.ts +1 -1
- package/dist/esm/components/AboutModal/AboutModal.js.map +1 -1
- package/dist/esm/components/DualListSelector/DualListSelector.d.ts.map +1 -1
- package/dist/esm/components/DualListSelector/DualListSelector.js +6 -5
- package/dist/esm/components/DualListSelector/DualListSelector.js.map +1 -1
- package/dist/esm/components/DualListSelector/DualListSelectorPane.d.ts.map +1 -1
- package/dist/esm/components/DualListSelector/DualListSelectorPane.js.map +1 -1
- package/dist/esm/components/Menu/MenuItem.js.map +1 -1
- package/dist/esm/components/MenuToggle/MenuToggle.js.map +1 -1
- package/dist/esm/components/Modal/Modal.d.ts +1 -1
- package/dist/esm/components/Modal/Modal.js.map +1 -1
- package/dist/esm/components/Select/Select.d.ts.map +1 -1
- package/dist/esm/components/Select/Select.js +2 -1
- package/dist/esm/components/Select/Select.js.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarToggleGroup.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarToggleGroup.js.map +1 -1
- package/dist/js/components/AboutModal/AboutModal.d.ts +1 -1
- package/dist/js/components/AboutModal/AboutModal.js.map +1 -1
- package/dist/js/components/DualListSelector/DualListSelector.d.ts.map +1 -1
- package/dist/js/components/DualListSelector/DualListSelector.js +6 -5
- package/dist/js/components/DualListSelector/DualListSelector.js.map +1 -1
- package/dist/js/components/DualListSelector/DualListSelectorPane.d.ts.map +1 -1
- package/dist/js/components/DualListSelector/DualListSelectorPane.js.map +1 -1
- package/dist/js/components/Menu/MenuItem.js.map +1 -1
- package/dist/js/components/MenuToggle/MenuToggle.js.map +1 -1
- package/dist/js/components/Modal/Modal.d.ts +1 -1
- package/dist/js/components/Modal/Modal.js.map +1 -1
- package/dist/js/components/Select/Select.d.ts.map +1 -1
- package/dist/js/components/Select/Select.js +2 -1
- package/dist/js/components/Select/Select.js.map +1 -1
- package/dist/js/components/Toolbar/ToolbarToggleGroup.d.ts.map +1 -1
- package/dist/js/components/Toolbar/ToolbarToggleGroup.js.map +1 -1
- package/dist/umd/react-core.css +63 -63
- package/dist/umd/react-core.js +8 -6
- package/package.json +5 -5
- package/src/components/AboutModal/AboutModal.tsx +1 -1
- package/src/components/DualListSelector/DualListSelector.tsx +57 -37
- package/src/components/DualListSelector/DualListSelectorPane.tsx +10 -8
- package/src/components/Menu/MenuItem.tsx +1 -1
- package/src/components/MenuToggle/MenuToggle.tsx +1 -1
- package/src/components/Modal/Modal.tsx +1 -1
- package/src/components/Select/Select.tsx +6 -3
- package/src/components/Toolbar/ToolbarToggleGroup.tsx +4 -1
- package/src/demos/Wizard/WizardDemo.md +66 -121
|
@@ -3,30 +3,9 @@ id: Wizard
|
|
|
3
3
|
section: components
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
Brand,
|
|
8
|
-
Breadcrumb,
|
|
9
|
-
BreadcrumbItem,
|
|
10
|
-
Modal,
|
|
11
|
-
ModalVariant,
|
|
12
|
-
Nav,
|
|
13
|
-
NavItem,
|
|
14
|
-
NavList,
|
|
15
|
-
Page,
|
|
16
|
-
PageToggleButton,
|
|
17
|
-
PageSection,
|
|
18
|
-
PageSectionTypes,
|
|
19
|
-
PageSectionVariants,
|
|
20
|
-
PageSidebar,
|
|
21
|
-
Progress,
|
|
22
|
-
SkipToContent,
|
|
23
|
-
Text,
|
|
24
|
-
TextContent,
|
|
25
|
-
Title,
|
|
26
|
-
Wizard
|
|
27
|
-
} from '@patternfly/react-core';
|
|
28
6
|
import imgBrand from './imgBrand.svg';
|
|
29
7
|
import BarsIcon from '@patternfly/react-icons/dist/js/icons/bars-icon';
|
|
8
|
+
import DashboardWrapper from '../examples/DashboardWrapper';
|
|
30
9
|
|
|
31
10
|
## Demos
|
|
32
11
|
|
|
@@ -34,10 +13,36 @@ import BarsIcon from '@patternfly/react-icons/dist/js/icons/bars-icon';
|
|
|
34
13
|
|
|
35
14
|
```js isFullscreen
|
|
36
15
|
import React from 'react';
|
|
37
|
-
import {
|
|
16
|
+
import {
|
|
17
|
+
Card,
|
|
18
|
+
CardBody,
|
|
19
|
+
Gallery,
|
|
20
|
+
GalleryItem,
|
|
21
|
+
Nav,
|
|
22
|
+
NavItem,
|
|
23
|
+
NavList,
|
|
24
|
+
PageSection,
|
|
25
|
+
Wizard,
|
|
26
|
+
Modal,
|
|
27
|
+
ModalVariant
|
|
28
|
+
} from '@patternfly/react-core';
|
|
29
|
+
import DashboardWrapper from '../examples/DashboardWrapper';
|
|
38
30
|
|
|
39
31
|
class BasicWizardDemo extends React.Component {
|
|
32
|
+
constructor(props) {
|
|
33
|
+
super(props);
|
|
34
|
+
this.state = {
|
|
35
|
+
activeItem: 0
|
|
36
|
+
};
|
|
37
|
+
this.onNavSelect = result => {
|
|
38
|
+
this.setState({
|
|
39
|
+
activeItem: result.itemId
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
}
|
|
40
43
|
render() {
|
|
44
|
+
const { activeItem } = this.state;
|
|
45
|
+
|
|
41
46
|
const steps = [
|
|
42
47
|
{ id: 0, name: 'Information', component: <p>Step 1 content</p> },
|
|
43
48
|
{
|
|
@@ -62,25 +67,40 @@ class BasicWizardDemo extends React.Component {
|
|
|
62
67
|
];
|
|
63
68
|
const title = 'Basic wizard';
|
|
64
69
|
return (
|
|
65
|
-
<
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
70
|
+
<React.Fragment>
|
|
71
|
+
<DashboardWrapper hasPageTemplateTitle>
|
|
72
|
+
<PageSection isWidthLimited>
|
|
73
|
+
<Gallery hasGutter>
|
|
74
|
+
{Array.apply(0, Array(10)).map((x, i) => (
|
|
75
|
+
<GalleryItem key={i}>
|
|
76
|
+
<Card>
|
|
77
|
+
<CardBody>This is a card</CardBody>
|
|
78
|
+
</Card>
|
|
79
|
+
</GalleryItem>
|
|
80
|
+
))}
|
|
81
|
+
</Gallery>
|
|
82
|
+
</PageSection>
|
|
83
|
+
</DashboardWrapper>
|
|
84
|
+
<Modal
|
|
85
|
+
isOpen
|
|
86
|
+
variant={ModalVariant.large}
|
|
87
|
+
showClose={false}
|
|
88
|
+
hasNoBodyWrapper
|
|
89
|
+
aria-describedby="wiz-modal-demo-description"
|
|
90
|
+
aria-labelledby="wiz-modal-demo-title"
|
|
91
|
+
>
|
|
92
|
+
<Wizard
|
|
93
|
+
navAriaLabel={`${title} steps`}
|
|
94
|
+
mainAriaLabel={`${title} content`}
|
|
95
|
+
titleId="wiz-modal-demo-title"
|
|
96
|
+
descriptionId="wiz-modal-demo-description"
|
|
97
|
+
title="Simple wizard in modal"
|
|
98
|
+
description="Simple wizard description"
|
|
99
|
+
steps={steps}
|
|
100
|
+
height={400}
|
|
101
|
+
/>
|
|
102
|
+
</Modal>
|
|
103
|
+
</React.Fragment>
|
|
84
104
|
);
|
|
85
105
|
}
|
|
86
106
|
}
|
|
@@ -91,31 +111,17 @@ class BasicWizardDemo extends React.Component {
|
|
|
91
111
|
```js isFullscreen
|
|
92
112
|
import React from 'react';
|
|
93
113
|
import {
|
|
94
|
-
Brand,
|
|
95
|
-
Breadcrumb,
|
|
96
|
-
BreadcrumbItem,
|
|
97
114
|
Nav,
|
|
98
115
|
NavItem,
|
|
99
116
|
NavList,
|
|
100
|
-
Page,
|
|
101
117
|
PageSection,
|
|
102
118
|
PageSectionTypes,
|
|
103
119
|
PageSectionVariants,
|
|
104
|
-
|
|
105
|
-
Progress,
|
|
106
|
-
SkipToContent,
|
|
107
|
-
Text,
|
|
108
|
-
TextContent,
|
|
109
|
-
Title,
|
|
110
|
-
Wizard,
|
|
111
|
-
Masthead,
|
|
112
|
-
PageToggleButton,
|
|
113
|
-
MastheadToggle,
|
|
114
|
-
MastheadMain,
|
|
115
|
-
MastheadBrand
|
|
120
|
+
Wizard
|
|
116
121
|
} from '@patternfly/react-core';
|
|
117
122
|
import imgBrand from './imgBrand.svg';
|
|
118
123
|
import BarsIcon from '@patternfly/react-icons/dist/js/icons/bars-icon';
|
|
124
|
+
import DashboardWrapper from '../examples/DashboardWrapper';
|
|
119
125
|
|
|
120
126
|
class FullPageWizard extends React.Component {
|
|
121
127
|
constructor(props) {
|
|
@@ -131,54 +137,6 @@ class FullPageWizard extends React.Component {
|
|
|
131
137
|
}
|
|
132
138
|
render() {
|
|
133
139
|
const { activeItem } = this.state;
|
|
134
|
-
const PageNav = (
|
|
135
|
-
<Nav onSelect={this.onNavSelect} aria-label="Nav">
|
|
136
|
-
<NavList>
|
|
137
|
-
<NavItem itemId={0} isActive={activeItem === 0}>
|
|
138
|
-
System Panel
|
|
139
|
-
</NavItem>
|
|
140
|
-
<NavItem itemId={1} isActive={activeItem === 1}>
|
|
141
|
-
Policy
|
|
142
|
-
</NavItem>
|
|
143
|
-
<NavItem itemId={2} isActive={activeItem === 2}>
|
|
144
|
-
Authentication
|
|
145
|
-
</NavItem>
|
|
146
|
-
<NavItem itemId={3} isActive={activeItem === 3}>
|
|
147
|
-
Network Services
|
|
148
|
-
</NavItem>
|
|
149
|
-
<NavItem itemId={4} isActive={activeItem === 4}>
|
|
150
|
-
Server
|
|
151
|
-
</NavItem>
|
|
152
|
-
</NavList>
|
|
153
|
-
</Nav>
|
|
154
|
-
);
|
|
155
|
-
const Header = (
|
|
156
|
-
<Masthead id="basic">
|
|
157
|
-
<MastheadToggle>
|
|
158
|
-
<PageToggleButton variant="plain" aria-label="Global navigation">
|
|
159
|
-
<BarsIcon />
|
|
160
|
-
</PageToggleButton>
|
|
161
|
-
</MastheadToggle>
|
|
162
|
-
<MastheadMain>
|
|
163
|
-
<MastheadBrand>
|
|
164
|
-
<Brand src={imgBrand} alt="Patternfly logo" />
|
|
165
|
-
</MastheadBrand>
|
|
166
|
-
</MastheadMain>
|
|
167
|
-
</Masthead>
|
|
168
|
-
);
|
|
169
|
-
const Sidebar = <PageSidebar nav={PageNav} />;
|
|
170
|
-
const pageId = 'main-content-page-layout-default-nav';
|
|
171
|
-
const PageSkipToContent = <SkipToContent href={`#${pageId}`}>Skip to content</SkipToContent>;
|
|
172
|
-
const PageBreadcrumb = (
|
|
173
|
-
<Breadcrumb>
|
|
174
|
-
<BreadcrumbItem>Section home</BreadcrumbItem>
|
|
175
|
-
<BreadcrumbItem to="#">Section title</BreadcrumbItem>
|
|
176
|
-
<BreadcrumbItem to="#">Section title</BreadcrumbItem>
|
|
177
|
-
<BreadcrumbItem to="#" isActive>
|
|
178
|
-
Section landing
|
|
179
|
-
</BreadcrumbItem>
|
|
180
|
-
</Breadcrumb>
|
|
181
|
-
);
|
|
182
140
|
|
|
183
141
|
const steps = [
|
|
184
142
|
{ id: 0, name: 'Information', component: <p>Step 1 content</p> },
|
|
@@ -206,24 +164,11 @@ class FullPageWizard extends React.Component {
|
|
|
206
164
|
|
|
207
165
|
return (
|
|
208
166
|
<React.Fragment>
|
|
209
|
-
<
|
|
210
|
-
header={Header}
|
|
211
|
-
sidebar={Sidebar}
|
|
212
|
-
isManagedSidebar
|
|
213
|
-
skipToContent={PageSkipToContent}
|
|
214
|
-
breadcrumb={PageBreadcrumb}
|
|
215
|
-
mainContainerId={pageId}
|
|
216
|
-
>
|
|
217
|
-
<PageSection variant={PageSectionVariants.light}>
|
|
218
|
-
<TextContent>
|
|
219
|
-
<Text component="h1">Main title</Text>
|
|
220
|
-
<Text component="p">A demo of a wizard in a page.</Text>
|
|
221
|
-
</TextContent>
|
|
222
|
-
</PageSection>
|
|
167
|
+
<DashboardWrapper hasPageTemplateTitle>
|
|
223
168
|
<PageSection type={PageSectionTypes.wizard} variant={PageSectionVariants.light}>
|
|
224
169
|
<Wizard navAriaLabel={`${title} steps`} mainAriaLabel={`${title} content`} steps={steps} />
|
|
225
170
|
</PageSection>
|
|
226
|
-
</
|
|
171
|
+
</DashboardWrapper>
|
|
227
172
|
</React.Fragment>
|
|
228
173
|
);
|
|
229
174
|
}
|