@patternfly/documentation-framework 6.0.0-alpha.8 → 6.0.0-alpha.80
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 +1154 -0
- package/app.js +2 -5
- package/components/autoLinkHeader/autoLinkHeader.css +2 -2
- package/components/autoLinkHeader/autoLinkHeader.js +8 -19
- package/components/cssVariables/cssVariables.css +9 -11
- package/components/cssVariables/cssVariables.js +19 -32
- package/components/example/example.css +14 -58
- package/components/example/example.js +149 -78
- package/components/example/exampleToolbar.js +3 -2
- package/components/footer/footer.css +16 -16
- package/components/footer/footer.js +32 -32
- package/components/gdprBanner/gdprBanner.css +0 -3
- package/components/gdprBanner/gdprBanner.js +22 -16
- package/components/inlineAlert/inlineAlert.js +1 -1
- package/components/link/link.js +23 -18
- package/components/propsTable/propsTable.js +14 -10
- package/components/sectionGallery/TextSummary.js +5 -5
- package/components/sectionGallery/sectionDataListLayout.js +87 -41
- package/components/sectionGallery/sectionGallery.css +6 -39
- package/components/sectionGallery/sectionGalleryLayout.js +73 -23
- package/components/sectionGallery/sectionGalleryToolbar.js +47 -12
- package/components/sideNav/sideNav.js +3 -4
- package/components/tableOfContents/tableOfContents.css +26 -35
- package/components/tableOfContents/tableOfContents.js +58 -28
- package/layouts/sideNavLayout/sideNavLayout.css +1 -36
- package/layouts/sideNavLayout/sideNavLayout.js +188 -101
- package/package.json +12 -19
- package/pages/404/404.css +2 -2
- package/pages/404/index.js +23 -36
- package/routes.js +3 -1
- package/scripts/md/anchor-header.js +1 -1
- package/scripts/md/parseMD.js +20 -18
- package/scripts/md/styled-tags.js +22 -14
- package/scripts/webpack/webpack.base.config.js +7 -18
- package/scripts/writeScreenshots.js +2 -2
- package/templates/mdx.css +11 -288
- package/templates/mdx.js +40 -43
- package/templates/patternfly-docs/patternfly-docs.source.js +8 -8
- package/versions.json +42 -14
- package/components/sideNav/sideNav.css +0 -21
- package/pages/global-css-variables.md +0 -109
- package/pages/img/component-variable-mapping.png +0 -0
|
@@ -103,7 +103,7 @@ export const ExampleToolbar = ({
|
|
|
103
103
|
copyCode();
|
|
104
104
|
trackEvent('code_editor_control_click', 'click_event', 'COPY_CODE');
|
|
105
105
|
}}
|
|
106
|
-
variant="
|
|
106
|
+
variant="plain"
|
|
107
107
|
aria-label={copyAriaLabel}
|
|
108
108
|
className={editorControlProps.className}
|
|
109
109
|
>
|
|
@@ -124,7 +124,7 @@ export const ExampleToolbar = ({
|
|
|
124
124
|
>
|
|
125
125
|
<Button
|
|
126
126
|
aria-label={codesandboxAriaLabel}
|
|
127
|
-
variant="
|
|
127
|
+
variant="plain"
|
|
128
128
|
type="submit"
|
|
129
129
|
onClick={() => {
|
|
130
130
|
trackEvent('code_editor_control_click', 'click_event', 'CODESANDBOX_LINK');
|
|
@@ -218,6 +218,7 @@ export const ExampleToolbar = ({
|
|
|
218
218
|
onEditorDidMount={onEditorDidMount}
|
|
219
219
|
isReadOnly={isFullscreen}
|
|
220
220
|
className={`${isEditorOpen ? 'ws-example-code-expanded ' : ''}ws-code-editor`}
|
|
221
|
+
isHeaderPlain
|
|
221
222
|
/>
|
|
222
223
|
);
|
|
223
224
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
.ws-org-pfsite-l-footer.pf-
|
|
2
|
-
|
|
1
|
+
.ws-org-pfsite-l-footer.pf-v6-c-page__main-section {
|
|
2
|
+
/* font-family: var(--pf-v6-global--FontFamily--text); */
|
|
3
3
|
font-weight: 300;
|
|
4
4
|
background-color: #1a1a1a !important;
|
|
5
|
-
--pf-
|
|
6
|
-
--pf-
|
|
7
|
-
--pf-
|
|
8
|
-
--pf-
|
|
5
|
+
--pf-v6-c-page__main-section--PaddingTop: var(--pf-t--global--spacer--xl);
|
|
6
|
+
--pf-v6-c-page__main-section--PaddingRight: var(--pf-t--global--spacer--2xl);
|
|
7
|
+
--pf-v6-c-page__main-section--PaddingBottom: var(--pf-t--global--spacer--2xl);
|
|
8
|
+
--pf-v6-c-page__main-section--PaddingLeft: var(--pf-t--global--spacer--2xl);
|
|
9
9
|
/* Hide long overflowing tocs */
|
|
10
10
|
z-index: 1;
|
|
11
11
|
}
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
.ws-org-pfsite-l-footer-column .ws-org-pfsite-footer-menu-social-links a {
|
|
37
|
-
margin-right: var(--pf-
|
|
38
|
-
|
|
37
|
+
margin-right: var(--pf-t--global--spacer--md);
|
|
38
|
+
/* color: var(--pf-v6-global--Color--light-100) !important; */
|
|
39
39
|
}
|
|
40
40
|
.ws-org-pfsite-l-footer-column
|
|
41
41
|
.ws-org-pfsite-footer-menu-social-links
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
margin-right: 0;
|
|
44
44
|
}
|
|
45
45
|
.ws-org-pfsite-l-footer-column .ws-org-pfsite-footer-menu-social-links {
|
|
46
|
-
margin-top: var(--pf-
|
|
47
|
-
margin-bottom: var(--pf-
|
|
46
|
+
margin-top: var(--pf-t--global--spacer--md);
|
|
47
|
+
margin-bottom: var(--pf-t--global--spacer--md);
|
|
48
48
|
}
|
|
49
49
|
@media (max-width: 768px) {
|
|
50
50
|
.ws-org-pfsite-l-footer-column .ws-org-pfsite-footer-menu-social-links {
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
padding-right: 10px;
|
|
72
72
|
}
|
|
73
73
|
.ws-org-pfsite-l-footer .ws-org-pfsite-footer-menu-link {
|
|
74
|
-
|
|
74
|
+
/* color: var(--pf-v6-global--Color--light-100); */
|
|
75
75
|
font-size: 14px !important;
|
|
76
76
|
}
|
|
77
77
|
.ws-org-pfsite-l-footer .ws-org-pfsite-footer-menu-link:hover {
|
|
@@ -86,19 +86,19 @@
|
|
|
86
86
|
.ws-org-pfsite-l-footer-dark {
|
|
87
87
|
background: #151515 !important;
|
|
88
88
|
}
|
|
89
|
-
.pf-
|
|
89
|
+
.pf-v6-c-page .pf-v6-c-page__main-section.ws-org-pfsite-l-footer-dark {
|
|
90
90
|
/* Hide long overflowing tocs */
|
|
91
91
|
z-index: 1;
|
|
92
92
|
}
|
|
93
|
-
.pf-
|
|
93
|
+
.pf-v6-c-page__main-section.ws-org-pfsite-l-footer-dark > * {
|
|
94
94
|
font-weight: 300;
|
|
95
95
|
font-size: 12px;
|
|
96
96
|
color: #d2d2d2;
|
|
97
97
|
}
|
|
98
98
|
.ws-org-pfsite-l-footer-dark a {
|
|
99
|
-
padding-right: var(--pf-
|
|
100
|
-
padding-left: var(--pf-
|
|
101
|
-
|
|
99
|
+
padding-right: var(--pf-t--global--spacer--sm);
|
|
100
|
+
padding-left: var(--pf-t--global--spacer--sm);
|
|
101
|
+
/* border-right: var(--pf-v6-global--BorderWidth--sm) solid #d2d2d2; */
|
|
102
102
|
font-weight: 300;
|
|
103
103
|
color: #d2d2d2;
|
|
104
104
|
text-decoration: underline;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {Brand, Grid, GridItem, List, PageSection,
|
|
2
|
+
import {Brand, Grid, GridItem, List, PageSection, Content} from "@patternfly/react-core";
|
|
3
3
|
import {Link} from "@patternfly/documentation-framework/components";
|
|
4
4
|
import {GithubIcon, TwitterIcon} from "@patternfly/react-icons";
|
|
5
5
|
import redhatLogo from "./RHLogo.png";
|
|
@@ -13,15 +13,15 @@ export const Footer = () => (
|
|
|
13
13
|
sm={12}
|
|
14
14
|
md={6}
|
|
15
15
|
mdOffset={1}
|
|
16
|
-
className="pf-
|
|
16
|
+
className="pf-v6-u-mb-lg pf-v6-u-mb-0-on-sm"
|
|
17
17
|
>
|
|
18
|
-
<Grid className="pf-
|
|
18
|
+
<Grid className="pf-v6-u-py-xl">
|
|
19
19
|
<GridItem
|
|
20
20
|
sm={6}
|
|
21
21
|
md={4}
|
|
22
|
-
className="pf-
|
|
22
|
+
className="pf-v6-u-ml-md pf-v6-u-ml-0-on-md pf-v6-u-mb-xl pf-v6-u-mb-0-on-md"
|
|
23
23
|
>
|
|
24
|
-
<p className="pf-
|
|
24
|
+
<p className="pf-v6-c-title ws-org-pfsite-footer-menu-list-title">
|
|
25
25
|
QUICKLINKS
|
|
26
26
|
</p>
|
|
27
27
|
<nav aria-label="Quick Links">
|
|
@@ -29,17 +29,17 @@ export const Footer = () => (
|
|
|
29
29
|
<li className="ws-org-pfsite-footer-menu-list-item">
|
|
30
30
|
<Link
|
|
31
31
|
className="ws-org-pfsite-footer-menu-link"
|
|
32
|
-
to={"/get-started/about"}
|
|
33
|
-
aria-label="Get started with PatternFly
|
|
34
|
-
|
|
32
|
+
to={"/get-started/about-patternfly"}
|
|
33
|
+
aria-label="Get started with PatternFly"
|
|
34
|
+
>
|
|
35
35
|
Get started
|
|
36
36
|
</Link>
|
|
37
37
|
</li>
|
|
38
38
|
<li className="ws-org-pfsite-footer-menu-list-item">
|
|
39
39
|
<Link
|
|
40
40
|
className="ws-org-pfsite-footer-menu-link"
|
|
41
|
-
to="/components/
|
|
42
|
-
aria-label="PatternFly
|
|
41
|
+
to="/components/all-components"
|
|
42
|
+
aria-label="PatternFly components"
|
|
43
43
|
>
|
|
44
44
|
Components
|
|
45
45
|
</Link>
|
|
@@ -47,8 +47,8 @@ export const Footer = () => (
|
|
|
47
47
|
<li className="ws-org-pfsite-footer-menu-list-item">
|
|
48
48
|
<Link
|
|
49
49
|
className="ws-org-pfsite-footer-menu-link"
|
|
50
|
-
to="/layouts/
|
|
51
|
-
aria-label="PatternFly
|
|
50
|
+
to="/layouts/about-layouts"
|
|
51
|
+
aria-label="PatternFly layouts"
|
|
52
52
|
>
|
|
53
53
|
Layouts
|
|
54
54
|
</Link>
|
|
@@ -56,8 +56,8 @@ export const Footer = () => (
|
|
|
56
56
|
<li className="ws-org-pfsite-footer-menu-list-item">
|
|
57
57
|
<Link
|
|
58
58
|
className="ws-org-pfsite-footer-menu-link"
|
|
59
|
-
to="/design-foundations/
|
|
60
|
-
aria-label="PatternFly
|
|
59
|
+
to="/design-foundations/about-design-foundations"
|
|
60
|
+
aria-label="PatternFly styles"
|
|
61
61
|
>
|
|
62
62
|
Styles
|
|
63
63
|
</Link>
|
|
@@ -68,9 +68,9 @@ export const Footer = () => (
|
|
|
68
68
|
<GridItem
|
|
69
69
|
sm={6}
|
|
70
70
|
md={4}
|
|
71
|
-
className="pf-
|
|
71
|
+
className="pf-v6-u-mt-lg pf-v6-u-mt-0-on-sm pf-v6-u-ml-md pf-v6-u-ml-0-on-md pf-v6-u-mb-xl pf-v6-u-mb-0-on-md"
|
|
72
72
|
>
|
|
73
|
-
<p className="pf-
|
|
73
|
+
<p className="pf-v6-c-title ws-org-pfsite-footer-menu-list-title">
|
|
74
74
|
CONTRIBUTE
|
|
75
75
|
</p>
|
|
76
76
|
<nav aria-label="Contribute">
|
|
@@ -98,7 +98,7 @@ export const Footer = () => (
|
|
|
98
98
|
className="ws-org-pfsite-footer-menu-link"
|
|
99
99
|
to="https://github.com/patternfly/patternfly/blob/main/CODE_OF_CONDUCT.md"
|
|
100
100
|
target="top"
|
|
101
|
-
aria-label="PatternFly
|
|
101
|
+
aria-label="PatternFly Code of Conduct"
|
|
102
102
|
>
|
|
103
103
|
Code of Conduct
|
|
104
104
|
</Link>
|
|
@@ -109,7 +109,7 @@ export const Footer = () => (
|
|
|
109
109
|
<GridItem
|
|
110
110
|
sm={6}
|
|
111
111
|
md={4}
|
|
112
|
-
className="pf-
|
|
112
|
+
className="pf-v6-u-mt-lg pf-v6-u-mt-0-on-md pf-v6-u-ml-md pf-v6-u-ml-0-on-md"
|
|
113
113
|
>
|
|
114
114
|
<p className="ws-org-pfsite-footer-menu-list-title">
|
|
115
115
|
STAY IN TOUCH
|
|
@@ -121,7 +121,7 @@ export const Footer = () => (
|
|
|
121
121
|
className="ws-org-pfsite-footer-menu-link"
|
|
122
122
|
to="//join.slack.com/t/patternfly/shared_invite/zt-1npmqswgk-bF2R1E2rglV8jz5DNTezMQ"
|
|
123
123
|
target="top"
|
|
124
|
-
aria-label="Join the PatternFly
|
|
124
|
+
aria-label="Join the PatternFly Slack"
|
|
125
125
|
>
|
|
126
126
|
Slack
|
|
127
127
|
</Link>
|
|
@@ -139,9 +139,9 @@ export const Footer = () => (
|
|
|
139
139
|
<li className="ws-org-pfsite-footer-menu-list-item">
|
|
140
140
|
<Link
|
|
141
141
|
className="ws-org-pfsite-footer-menu-link"
|
|
142
|
-
to="
|
|
142
|
+
to="https://www.redhat.com/dynamic-form/instance/934b1674-bc8a-4a13-8c9d-d19abcceb263"
|
|
143
143
|
target="top"
|
|
144
|
-
aria-label="Join the PatternFly
|
|
144
|
+
aria-label="Join the PatternFly mailing list"
|
|
145
145
|
>
|
|
146
146
|
Mailing list
|
|
147
147
|
</Link>
|
|
@@ -151,7 +151,7 @@ export const Footer = () => (
|
|
|
151
151
|
className="ws-org-pfsite-footer-menu-link"
|
|
152
152
|
to="//medium.com/patternfly"
|
|
153
153
|
target="top"
|
|
154
|
-
aria-label="Read the PatternFly
|
|
154
|
+
aria-label="Read the PatternFly blog"
|
|
155
155
|
>
|
|
156
156
|
PatternFly Medium
|
|
157
157
|
</Link>
|
|
@@ -162,10 +162,10 @@ export const Footer = () => (
|
|
|
162
162
|
</Grid>
|
|
163
163
|
</GridItem>
|
|
164
164
|
<GridItem sm={12} md={4}>
|
|
165
|
-
<Grid className="pf-
|
|
166
|
-
<GridItem className="pf-
|
|
165
|
+
<Grid className="pf-v6-u-pt-xl ws-org-pfsite-l-footer-column">
|
|
166
|
+
<GridItem className="pf-v6-u-px-xl">
|
|
167
167
|
<Link
|
|
168
|
-
className="pf-
|
|
168
|
+
className="pf-v6-c-page__header-brand-link pf-v6-c-brand ws-org-pfsite-footer-menu-about-logo pf-v6-u-pb-md"
|
|
169
169
|
to="/"
|
|
170
170
|
>
|
|
171
171
|
<Brand
|
|
@@ -176,16 +176,16 @@ export const Footer = () => (
|
|
|
176
176
|
<source srcSet={logo} />
|
|
177
177
|
</Brand>
|
|
178
178
|
</Link>
|
|
179
|
-
<
|
|
179
|
+
<Content component="p" className="ws-org-pfsite-footer-menu-about-description">
|
|
180
180
|
PatternFly is an open source design system built to drive
|
|
181
181
|
consistency and unify teams. From documentation and components
|
|
182
182
|
to code examples and tutorials, PatternFly is a place where
|
|
183
183
|
design and development can thrive. We’re on a mission to help
|
|
184
184
|
teams build consistent, accessible, and scalable enterprise
|
|
185
185
|
product experiences—the open source way.
|
|
186
|
-
</
|
|
186
|
+
</Content>
|
|
187
187
|
</GridItem>
|
|
188
|
-
<GridItem className="ws-org-pfsite-footer-menu-social-links pf-
|
|
188
|
+
<GridItem className="ws-org-pfsite-footer-menu-social-links pf-v6-u-px-xl">
|
|
189
189
|
<Link
|
|
190
190
|
to="//github.com/patternfly"
|
|
191
191
|
target="top"
|
|
@@ -194,9 +194,9 @@ export const Footer = () => (
|
|
|
194
194
|
<GithubIcon />
|
|
195
195
|
</Link>
|
|
196
196
|
<Link
|
|
197
|
-
to="//
|
|
197
|
+
to="//x.com/patternfly"
|
|
198
198
|
target="top"
|
|
199
|
-
aria-label="Link to PatternFly
|
|
199
|
+
aria-label="Link to PatternFly X page"
|
|
200
200
|
>
|
|
201
201
|
<TwitterIcon />
|
|
202
202
|
</Link>
|
|
@@ -209,7 +209,7 @@ export const Footer = () => (
|
|
|
209
209
|
key="footer-2"
|
|
210
210
|
className="ws-org-pfsite-l-footer-dark pf-m-no-fill"
|
|
211
211
|
>
|
|
212
|
-
<Grid className="pf-
|
|
212
|
+
<Grid className="pf-v6-u-py-xl-on-sm pf-v6-u-py-0-on-md pf-v6-u-align-items-center">
|
|
213
213
|
<GridItem md={2} mdOffset={1}>
|
|
214
214
|
<Link
|
|
215
215
|
to="//www.redhat.com"
|
|
@@ -228,7 +228,7 @@ export const Footer = () => (
|
|
|
228
228
|
Copyright © 2014-{new Date().getFullYear()} Red Hat, Inc.
|
|
229
229
|
</span>
|
|
230
230
|
</GridItem>
|
|
231
|
-
<GridItem md={4} lg={5} className="pf-
|
|
231
|
+
<GridItem md={4} lg={5} className="pf-v6-u-ml-xl-on-xl">
|
|
232
232
|
<Link
|
|
233
233
|
to="//www.redhat.com/en/about/privacy-policy"
|
|
234
234
|
target="top"
|
|
@@ -1,31 +1,37 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Button } from '@patternfly/react-core';
|
|
2
|
+
import { Panel, PanelMain, PanelMainBody, Flex, FlexItem, Button } from '@patternfly/react-core';
|
|
3
3
|
import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon';
|
|
4
4
|
import './gdprBanner.css';
|
|
5
5
|
|
|
6
6
|
export const GdprBanner = () => {
|
|
7
7
|
const initialBannerOpen = typeof window !== 'undefined' && window.localStorage && !localStorage.getItem('gdpr-banner-closed');
|
|
8
8
|
const [ isBannerOpen, setBannerOpen ] = React.useState(initialBannerOpen);
|
|
9
|
-
|
|
9
|
+
|
|
10
10
|
const closeBanner = () => {
|
|
11
11
|
localStorage.setItem('gdpr-banner-closed', 'true');
|
|
12
12
|
setBannerOpen(false);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
return !isBannerOpen ? null : (
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
16
|
+
<Flex className="ws-gdpr-banner-container">
|
|
17
|
+
<Panel variant="bordered" className="pf-m-raised" id="ws-gdpr-banner">
|
|
18
|
+
<PanelMain>
|
|
19
|
+
<PanelMainBody>
|
|
20
|
+
<Flex flexWrap={{default: 'nowrap'}} alignItems={{default: 'alignItemsFlexStart'}}>
|
|
21
|
+
<FlexItem className="pf-v6-u-ml-xl">
|
|
22
|
+
We use cookies on our websites to deliver our online services.
|
|
23
|
+
Details about how we use cookies and how you may disable them are set out in our <a href="//www.redhat.com/en/about/privacy-policy">Privacy Statement</a>.
|
|
24
|
+
By using this website you agree to our use of cookies.
|
|
25
|
+
</FlexItem>
|
|
26
|
+
<FlexItem>
|
|
27
|
+
<Button variant="plain" aria-label="Close banner" onClick={closeBanner}>
|
|
28
|
+
<TimesIcon />
|
|
29
|
+
</Button>
|
|
30
|
+
</FlexItem>
|
|
31
|
+
</Flex>
|
|
32
|
+
</PanelMainBody>
|
|
33
|
+
</PanelMain>
|
|
34
|
+
</Panel>
|
|
35
|
+
</Flex>
|
|
30
36
|
);
|
|
31
37
|
}
|
package/components/link/link.js
CHANGED
|
@@ -2,16 +2,19 @@ import React from 'react';
|
|
|
2
2
|
import { Link as ReachLink, navigate } from '@reach/router';
|
|
3
3
|
import { getAsyncComponent } from '../../routes';
|
|
4
4
|
|
|
5
|
-
const Promiseany = (
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}).
|
|
5
|
+
const Promiseany = (
|
|
6
|
+
Promise.any ||
|
|
7
|
+
function ($) {
|
|
8
|
+
return new Promise(function (D, E, A, L) {
|
|
9
|
+
A = [];
|
|
10
|
+
L = $.map(function ($, i) {
|
|
11
|
+
return Promise.resolve($).then(D, function (O) {
|
|
12
|
+
return ((A[i] = O), --L) || E({ errors: A });
|
|
13
|
+
});
|
|
14
|
+
}).length;
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
).bind(Promise);
|
|
15
18
|
|
|
16
19
|
export const Link = ({
|
|
17
20
|
href,
|
|
@@ -23,7 +26,7 @@ export const Link = ({
|
|
|
23
26
|
let preloadPromise;
|
|
24
27
|
let url = href || to || '';
|
|
25
28
|
if (url.startsWith('#') && !onClick) {
|
|
26
|
-
onClick = ev => {
|
|
29
|
+
onClick = (ev) => {
|
|
27
30
|
ev.preventDefault(); // Don't use client-side routing
|
|
28
31
|
// Chrome does not jump until ALL network requests finish.
|
|
29
32
|
// We have to force it to...
|
|
@@ -37,8 +40,7 @@ export const Link = ({
|
|
|
37
40
|
}
|
|
38
41
|
if (url.includes('//') || url.startsWith('#')) {
|
|
39
42
|
return <a href={url} onClick={onClick} {...props} />;
|
|
40
|
-
}
|
|
41
|
-
else if (url.startsWith('/')) {
|
|
43
|
+
} else if (url.startsWith('/')) {
|
|
42
44
|
if (!process.env.PRERENDER) {
|
|
43
45
|
const Component = getAsyncComponent(url);
|
|
44
46
|
if (Component) {
|
|
@@ -48,14 +50,17 @@ export const Link = ({
|
|
|
48
50
|
onMouseOver();
|
|
49
51
|
};
|
|
50
52
|
// Wait up to an extra 500ms on click before showing 'Loading...'
|
|
51
|
-
props.onClick = ev => {
|
|
52
|
-
if (!(ev.ctrlKey || ev.metaKey)) {
|
|
53
|
+
props.onClick = (ev) => {
|
|
54
|
+
if (!(ev.ctrlKey || ev.metaKey)) {
|
|
55
|
+
// avoid disallowing cmnd/ctrl+click opening in new tab
|
|
53
56
|
ev.preventDefault();
|
|
54
|
-
document
|
|
57
|
+
document
|
|
58
|
+
.querySelector('.pf-v6-c-page__main-container')
|
|
59
|
+
.scrollTo({ top: 0 }); // scroll to top of page
|
|
55
60
|
if (typeof window !== 'undefined' && url !== location.pathname) {
|
|
56
61
|
Promiseany([
|
|
57
62
|
preloadPromise,
|
|
58
|
-
new Promise(res => setTimeout(res, 500))
|
|
63
|
+
new Promise((res) => setTimeout(res, 500)),
|
|
59
64
|
]).then(() => navigate(url));
|
|
60
65
|
}
|
|
61
66
|
}
|
|
@@ -65,4 +70,4 @@ export const Link = ({
|
|
|
65
70
|
}
|
|
66
71
|
|
|
67
72
|
return <ReachLink to={url} {...props} />;
|
|
68
|
-
}
|
|
73
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { Label } from "@patternfly/react-core";
|
|
3
3
|
import {
|
|
4
4
|
Table,
|
|
5
5
|
Caption,
|
|
@@ -17,10 +17,10 @@ import accessibleStyles from "@patternfly/react-styles/css/utilities/Accessibili
|
|
|
17
17
|
|
|
18
18
|
export const PropsTable = ({ title, description, rows, allPropComponents }) => (
|
|
19
19
|
<React.Fragment>
|
|
20
|
-
<AutoLinkHeader
|
|
21
|
-
<Table className="pf-
|
|
20
|
+
<AutoLinkHeader headingLevel="h3">{title}</AutoLinkHeader>
|
|
21
|
+
<Table className="pf-v6-u-mt-md pf-v6-u-mb-lg" variant="compact" aria-label={title} gridBreakPoint="grid-lg">
|
|
22
22
|
<Caption>
|
|
23
|
-
{description && <div className="pf-
|
|
23
|
+
{description && <div className="pf-v6-u-mb-md">{description}</div>}
|
|
24
24
|
<div>
|
|
25
25
|
<span className="ws-prop-required">*</span>required
|
|
26
26
|
</div>
|
|
@@ -62,12 +62,16 @@ export const PropsTable = ({ title, description, rows, allPropComponents }) => (
|
|
|
62
62
|
""
|
|
63
63
|
)}
|
|
64
64
|
{row.beta && (
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
65
|
+
<>
|
|
66
|
+
{" "}
|
|
67
|
+
<Label
|
|
68
|
+
key={`${row.name}-${idx}`}
|
|
69
|
+
color="blue"
|
|
70
|
+
isCompact
|
|
71
|
+
>
|
|
72
|
+
Beta
|
|
73
|
+
</Label>
|
|
74
|
+
</>
|
|
71
75
|
)}
|
|
72
76
|
</TableText>
|
|
73
77
|
</Td>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { convertToReactComponent } from "@patternfly/ast-helpers";
|
|
3
|
-
import {
|
|
3
|
+
import { Content } from "@patternfly/react-core";
|
|
4
4
|
|
|
5
5
|
// convert summary text from string to jsx, remove links
|
|
6
6
|
export const SummaryComponent = ({ id, itemsData }) => {
|
|
@@ -22,10 +22,10 @@ export const TextSummary = ({ id, itemsData }) => {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
return (
|
|
25
|
-
<
|
|
26
|
-
<
|
|
25
|
+
<Content>
|
|
26
|
+
<Content component="p">
|
|
27
27
|
<SummaryComponent id={id} itemsData={itemsData} />
|
|
28
|
-
</
|
|
29
|
-
</
|
|
28
|
+
</Content>
|
|
29
|
+
</Content>
|
|
30
30
|
)
|
|
31
31
|
};
|
|
@@ -1,51 +1,97 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
DataList,
|
|
4
|
+
DataListItem,
|
|
5
|
+
DataListItemRow,
|
|
6
|
+
DataListItemCells,
|
|
7
|
+
DataListCell,
|
|
8
|
+
Split,
|
|
9
|
+
SplitItem,
|
|
10
|
+
Content,
|
|
11
|
+
ContentVariants,
|
|
12
|
+
Label,
|
|
13
|
+
} from '@patternfly/react-core';
|
|
3
14
|
import { Link } from '../link/link';
|
|
4
15
|
import { TextSummary } from './TextSummary';
|
|
5
16
|
|
|
6
|
-
export const SectionDataListLayout = ({
|
|
17
|
+
export const SectionDataListLayout = ({
|
|
18
|
+
galleryItems,
|
|
19
|
+
layoutView,
|
|
20
|
+
hasListText,
|
|
21
|
+
hasListImages,
|
|
22
|
+
}) => {
|
|
7
23
|
if (layoutView !== 'list') {
|
|
8
24
|
return null;
|
|
9
25
|
}
|
|
10
|
-
|
|
26
|
+
|
|
11
27
|
return (
|
|
12
28
|
<DataList onSelectDataListItem={() => {}}>
|
|
13
|
-
{galleryItems.map(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
29
|
+
{galleryItems.map(
|
|
30
|
+
({
|
|
31
|
+
idx,
|
|
32
|
+
slug,
|
|
33
|
+
illustration,
|
|
34
|
+
itemName,
|
|
35
|
+
title,
|
|
36
|
+
isBeta,
|
|
37
|
+
isDeprecated,
|
|
38
|
+
isDemo,
|
|
39
|
+
id,
|
|
40
|
+
galleryItemsData,
|
|
41
|
+
}) => (
|
|
42
|
+
<Link to={slug} key={idx} className="ws-section-gallery-item">
|
|
43
|
+
<DataListItem>
|
|
44
|
+
<DataListItemRow>
|
|
45
|
+
<DataListItemCells
|
|
46
|
+
dataListCells={[
|
|
47
|
+
hasListImages && illustration && (
|
|
48
|
+
<DataListCell width={1} key="illustration">
|
|
49
|
+
<div>
|
|
50
|
+
<img
|
|
51
|
+
src={illustration}
|
|
52
|
+
alt={`${itemName} illustration`}
|
|
53
|
+
/>
|
|
54
|
+
</div>
|
|
55
|
+
</DataListCell>
|
|
56
|
+
),
|
|
57
|
+
<DataListCell width={5} key="text-description">
|
|
58
|
+
<Split className={hasListText ? 'pf-v6-u-mb-md' : null}>
|
|
59
|
+
<SplitItem isFilled>
|
|
60
|
+
<Content>
|
|
61
|
+
<Content component={ContentVariants.h2}>
|
|
62
|
+
<span>{title}</span>
|
|
63
|
+
</Content>
|
|
64
|
+
</Content>
|
|
65
|
+
</SplitItem>
|
|
66
|
+
<SplitItem>
|
|
67
|
+
{isBeta && (
|
|
68
|
+
<Label color="blue" isCompact>
|
|
69
|
+
Beta
|
|
70
|
+
</Label>
|
|
71
|
+
)}
|
|
72
|
+
{!isBeta && isDeprecated && (
|
|
73
|
+
<Label color="grey" isCompact>
|
|
74
|
+
Deprecated
|
|
75
|
+
</Label>
|
|
76
|
+
)}
|
|
77
|
+
{!isBeta && !isDeprecated && isDemo && (
|
|
78
|
+
<Label color="purple" isCompact>
|
|
79
|
+
Demo
|
|
80
|
+
</Label>
|
|
81
|
+
)}
|
|
82
|
+
</SplitItem>
|
|
83
|
+
</Split>
|
|
84
|
+
{hasListText && (
|
|
85
|
+
<TextSummary id={id} itemsData={galleryItemsData} />
|
|
86
|
+
)}
|
|
87
|
+
</DataListCell>,
|
|
88
|
+
]}
|
|
89
|
+
/>
|
|
90
|
+
</DataListItemRow>
|
|
91
|
+
</DataListItem>
|
|
92
|
+
</Link>
|
|
93
|
+
)
|
|
94
|
+
)}
|
|
49
95
|
</DataList>
|
|
50
|
-
)
|
|
96
|
+
);
|
|
51
97
|
};
|