@patternfly/documentation-framework 6.0.0-alpha.6 → 6.0.0-alpha.61
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 +991 -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 +29 -29
- package/components/gdprBanner/gdprBanner.css +0 -3
- package/components/gdprBanner/gdprBanner.js +24 -17
- package/components/inlineAlert/inlineAlert.js +1 -1
- package/components/propsTable/propsTable.js +14 -10
- package/components/sectionGallery/sectionDataListLayout.js +88 -41
- package/components/sectionGallery/sectionGallery.css +4 -42
- 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 +23 -36
- package/layouts/sideNavLayout/sideNavLayout.css +1 -36
- package/layouts/sideNavLayout/sideNavLayout.js +60 -38
- 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 +38 -41
- 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
|
@@ -1,41 +1,91 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Gallery,
|
|
4
|
+
GalleryItem,
|
|
5
|
+
Card,
|
|
6
|
+
CardHeader,
|
|
7
|
+
CardTitle,
|
|
8
|
+
CardBody,
|
|
9
|
+
CardFooter,
|
|
10
|
+
Label,
|
|
11
|
+
} from '@patternfly/react-core';
|
|
12
|
+
import { navigate } from '@reach/router';
|
|
13
|
+
import { TextSummary } from './TextSummary';
|
|
5
14
|
|
|
6
|
-
export const SectionGalleryLayout = ({
|
|
15
|
+
export const SectionGalleryLayout = ({
|
|
16
|
+
galleryItems,
|
|
17
|
+
layoutView,
|
|
18
|
+
hasGridText,
|
|
19
|
+
hasGridImages,
|
|
20
|
+
}) => {
|
|
7
21
|
if (layoutView !== 'grid') {
|
|
8
22
|
return null;
|
|
9
23
|
}
|
|
10
24
|
|
|
11
25
|
return (
|
|
12
26
|
<Gallery hasGutter>
|
|
13
|
-
{galleryItems.map(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
27
|
+
{galleryItems.map(
|
|
28
|
+
({
|
|
29
|
+
idx,
|
|
30
|
+
slug,
|
|
31
|
+
id,
|
|
32
|
+
itemName,
|
|
33
|
+
illustration,
|
|
34
|
+
isBeta,
|
|
35
|
+
isDeprecated,
|
|
36
|
+
isDemo,
|
|
37
|
+
title,
|
|
38
|
+
galleryItemsData,
|
|
39
|
+
}) => (
|
|
40
|
+
<GalleryItem span={4} key={idx}>
|
|
41
|
+
<Card id={id} key={idx} isClickable>
|
|
42
|
+
<CardHeader
|
|
43
|
+
selectableActions={{
|
|
44
|
+
onClickAction: (e) => {
|
|
45
|
+
e.preventDefault();
|
|
46
|
+
document.getElementById('ws-page-main').scrollIntoView();
|
|
47
|
+
navigate(slug);
|
|
48
|
+
},
|
|
49
|
+
selectableActionId: `${id}-input`,
|
|
50
|
+
selectableActionAriaLabelledby: id,
|
|
51
|
+
name: `clickable-card-${idx}`,
|
|
52
|
+
}}
|
|
53
|
+
>
|
|
54
|
+
<CardTitle>{title}</CardTitle>
|
|
55
|
+
</CardHeader>
|
|
22
56
|
{(hasGridImages || hasGridText) && (
|
|
23
57
|
<CardBody>
|
|
24
|
-
{
|
|
25
|
-
|
|
58
|
+
{hasGridImages && illustration && (
|
|
59
|
+
<img src={illustration} alt={`${itemName} illustration`} />
|
|
60
|
+
)}
|
|
61
|
+
{hasGridText && (
|
|
62
|
+
<TextSummary id={id} itemsData={galleryItemsData} />
|
|
63
|
+
)}
|
|
26
64
|
</CardBody>
|
|
27
65
|
)}
|
|
28
66
|
{(isBeta || isDeprecated || isDemo) && (
|
|
29
67
|
<CardFooter>
|
|
30
|
-
{isBeta && (
|
|
31
|
-
|
|
32
|
-
|
|
68
|
+
{isBeta && (
|
|
69
|
+
<Label color="blue" isCompact>
|
|
70
|
+
Beta
|
|
71
|
+
</Label>
|
|
72
|
+
)}
|
|
73
|
+
{!isBeta && isDeprecated && (
|
|
74
|
+
<Label color="grey" isCompact>
|
|
75
|
+
Deprecated
|
|
76
|
+
</Label>
|
|
77
|
+
)}
|
|
78
|
+
{!isBeta && !isDeprecated && isDemo && (
|
|
79
|
+
<Label color="purple" isCompact>
|
|
80
|
+
Demo
|
|
81
|
+
</Label>
|
|
82
|
+
)}
|
|
33
83
|
</CardFooter>
|
|
34
84
|
)}
|
|
35
85
|
</Card>
|
|
36
|
-
</
|
|
37
|
-
|
|
38
|
-
)
|
|
86
|
+
</GalleryItem>
|
|
87
|
+
)
|
|
88
|
+
)}
|
|
39
89
|
</Gallery>
|
|
40
|
-
)
|
|
90
|
+
);
|
|
41
91
|
};
|
|
@@ -1,7 +1,18 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
SearchInput,
|
|
5
|
+
Toolbar,
|
|
6
|
+
ToolbarContent,
|
|
7
|
+
ToolbarGroup,
|
|
8
|
+
ToolbarItem,
|
|
9
|
+
Text,
|
|
10
|
+
TextVariants,
|
|
11
|
+
ToggleGroup,
|
|
12
|
+
ToggleGroupItem,
|
|
13
|
+
} from '@patternfly/react-core';
|
|
3
14
|
import ListIcon from '@patternfly/react-icons/dist/esm/icons/list-icon';
|
|
4
|
-
import ThIcon from'@patternfly/react-icons/dist/esm/icons/th-icon';
|
|
15
|
+
import ThIcon from '@patternfly/react-icons/dist/esm/icons/th-icon';
|
|
5
16
|
|
|
6
17
|
export const SectionGalleryToolbar = ({
|
|
7
18
|
galleryItems,
|
|
@@ -9,29 +20,53 @@ export const SectionGalleryToolbar = ({
|
|
|
9
20
|
setSearchTerm,
|
|
10
21
|
layoutView,
|
|
11
22
|
setLayoutView,
|
|
12
|
-
placeholderText =
|
|
13
|
-
countText=
|
|
23
|
+
placeholderText = 'Search by name',
|
|
24
|
+
countText = ' items',
|
|
14
25
|
}) => (
|
|
15
26
|
<Toolbar isSticky>
|
|
16
27
|
<ToolbarContent>
|
|
17
|
-
<ToolbarItem
|
|
18
|
-
<SearchInput
|
|
28
|
+
<ToolbarItem>
|
|
29
|
+
<SearchInput
|
|
30
|
+
onClear={false}
|
|
31
|
+
value={searchTerm}
|
|
32
|
+
placeholder={placeholderText}
|
|
33
|
+
onChange={(_evt, val) => setSearchTerm(val)}
|
|
34
|
+
/>
|
|
19
35
|
</ToolbarItem>
|
|
20
36
|
{searchTerm && (
|
|
21
37
|
<ToolbarItem>
|
|
22
|
-
<Button variant="link" onClick={() => setSearchTerm('')}>
|
|
38
|
+
<Button variant="link" onClick={() => setSearchTerm('')}>
|
|
39
|
+
Reset
|
|
40
|
+
</Button>
|
|
23
41
|
</ToolbarItem>
|
|
24
42
|
)}
|
|
25
43
|
<ToolbarGroup variant="icon-button-group">
|
|
26
44
|
<ToolbarItem>
|
|
27
45
|
<ToggleGroup>
|
|
28
|
-
<ToggleGroupItem
|
|
29
|
-
|
|
46
|
+
<ToggleGroupItem
|
|
47
|
+
icon={<ThIcon />}
|
|
48
|
+
aria-label="grid icon button"
|
|
49
|
+
isSelected={layoutView === 'grid'}
|
|
50
|
+
onChange={() => setLayoutView('grid')}
|
|
51
|
+
></ToggleGroupItem>
|
|
52
|
+
<ToggleGroupItem
|
|
53
|
+
icon={<ListIcon />}
|
|
54
|
+
aria-label="list icon button"
|
|
55
|
+
isSelected={layoutView === 'list'}
|
|
56
|
+
onChange={() => setLayoutView('list')}
|
|
57
|
+
></ToggleGroupItem>
|
|
30
58
|
</ToggleGroup>
|
|
31
59
|
</ToolbarItem>
|
|
32
60
|
</ToolbarGroup>
|
|
33
|
-
<ToolbarItem
|
|
34
|
-
|
|
61
|
+
<ToolbarItem
|
|
62
|
+
variant="pagination"
|
|
63
|
+
spacer={{ default: 'spacerMd', md: 'spacerNone' }}
|
|
64
|
+
style={{ '--pf-v6-c-toolbar__item--MinWidth': 'max-content' }}
|
|
65
|
+
>
|
|
66
|
+
<Text component={TextVariants.small}>
|
|
67
|
+
{galleryItems.length}
|
|
68
|
+
{countText}
|
|
69
|
+
</Text>
|
|
35
70
|
</ToolbarItem>
|
|
36
71
|
</ToolbarContent>
|
|
37
72
|
</Toolbar>
|
|
@@ -19,14 +19,14 @@ const NavItem = ({ text, href, isDeprecated, isBeta, isDemo }) => {
|
|
|
19
19
|
return (
|
|
20
20
|
<PageContextConsumer key={href + text}>
|
|
21
21
|
{({onSidebarToggle, isSidebarOpen }) => (
|
|
22
|
-
<li key={href + text} className="pf-
|
|
22
|
+
<li key={href + text} className="pf-v6-c-nav__item" onClick={() => isMobileView && onSidebarToggle && onSidebarToggle()}>
|
|
23
23
|
<Link
|
|
24
24
|
to={href}
|
|
25
25
|
getProps={({ isCurrent, href, location }) => {
|
|
26
26
|
const { pathname } = location;
|
|
27
27
|
return {
|
|
28
28
|
className: css(
|
|
29
|
-
'pf-
|
|
29
|
+
'pf-v6-c-nav__link',
|
|
30
30
|
(isCurrent || pathname.startsWith(href + '/')) && 'pf-m-current'
|
|
31
31
|
)
|
|
32
32
|
}}
|
|
@@ -67,7 +67,6 @@ const ExpandableNav = ({groupedRoutes, location, section, subsection = null}) =>
|
|
|
67
67
|
key={capitalize(currentSection.replace(/-/g, ' '))}
|
|
68
68
|
isActive={isActive}
|
|
69
69
|
isExpanded={isActive}
|
|
70
|
-
className="ws-side-nav-group"
|
|
71
70
|
onClick={(event) => {
|
|
72
71
|
// Don't bubble click event up, avoids subsection triggering duplicate analtics
|
|
73
72
|
event.stopPropagation();
|
|
@@ -96,7 +95,7 @@ const ExpandableNav = ({groupedRoutes, location, section, subsection = null}) =>
|
|
|
96
95
|
source.source === "react-deprecated" || source.source === "html-deprecated")
|
|
97
96
|
&& !navObj.sources.some(source => source.source === "react" || source.source === "html")
|
|
98
97
|
),
|
|
99
|
-
isBeta: navObj.sources.some(source => source.beta),
|
|
98
|
+
isBeta: navObj.sources.some(source => source.beta && source.source !== 'react-next' && source.source !== 'react-templates'),
|
|
100
99
|
isDemo: navObj.sources.some(source => (
|
|
101
100
|
source.source === "react-demos" || source.source === "html-demos")
|
|
102
101
|
&& !navObj.sources.some(source => source.source === "react" || source.source === "html")
|
|
@@ -1,45 +1,48 @@
|
|
|
1
1
|
.ws-toc {
|
|
2
2
|
align-self: flex-start;
|
|
3
3
|
position: sticky;
|
|
4
|
-
width: calc(100% + var(--pf-
|
|
5
|
-
background-color: var(--pf-
|
|
6
|
-
z-index:
|
|
7
|
-
margin-block-start: calc(var(--pf-
|
|
8
|
-
margin-block-end: var(--pf-
|
|
9
|
-
margin-inline-start: calc(var(--pf-
|
|
10
|
-
margin-inline-end: calc(var(--pf-
|
|
11
|
-
padding-block-start: var(--pf-
|
|
12
|
-
padding-block-end: var(--pf-
|
|
13
|
-
padding-inline-start: var(--pf-
|
|
4
|
+
width: calc(100% + var(--pf-v6-c-page__main-section--PaddingInlineStart) + var(--pf-v6-c-page__main-section--PaddingInlineEnd));
|
|
5
|
+
background-color: var(--pf-t--global--background--color--secondary--default);
|
|
6
|
+
z-index: 201;
|
|
7
|
+
margin-block-start: calc(var(--pf-v6-c-page__main-section--PaddingTop) * -1);
|
|
8
|
+
margin-block-end: var(--pf-t--global--spacer--md);
|
|
9
|
+
margin-inline-start: calc(var(--pf-v6-c-page__main-section--PaddingInlineStart) * -1);
|
|
10
|
+
margin-inline-end: calc(var(--pf-v6-c-page__main-section--PaddingInlineEnd) * -2);
|
|
11
|
+
padding-block-start: var(--pf-t--global--spacer--md);
|
|
12
|
+
padding-block-end: var(--pf-t--global--spacer--md);
|
|
13
|
+
padding-inline-start: var(--pf-t--global--spacer--md);
|
|
14
14
|
padding-inline-end: 0;
|
|
15
|
-
box-shadow: var(--pf-
|
|
15
|
+
box-shadow: var(--pf-t--global--box-shadow--lg--bottom);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
.ws-toc.pf-m-expanded {
|
|
19
|
-
box-shadow: var(--pf-
|
|
19
|
+
box-shadow: var(--pf-t--global--box-shadow--sm--bottom)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.ws-toc .pf-v6-c-jump-links__toggle {
|
|
23
|
+
background-color: var(--pf-t--global--background--color--secondary--default);
|
|
20
24
|
}
|
|
21
25
|
|
|
22
26
|
/* Mobile jumplinks */
|
|
23
27
|
@media (max-width: 1450px) {
|
|
24
|
-
.ws-toc.pf-m-expanded .pf-
|
|
28
|
+
.ws-toc.pf-m-expanded .pf-v6-c-jump-links__main {
|
|
25
29
|
max-height: 65vh;
|
|
26
|
-
overflow:
|
|
30
|
+
overflow-y:auto;
|
|
27
31
|
}
|
|
28
|
-
|
|
29
|
-
.ws-toc .pf-
|
|
32
|
+
|
|
33
|
+
.ws-toc .pf-v6-c-jump-links__header {
|
|
30
34
|
position: sticky;
|
|
31
35
|
top: 0;
|
|
32
|
-
background-color: var(--pf-v5-global--BackgroundColor--200);
|
|
33
36
|
z-index: 2;
|
|
34
37
|
}
|
|
35
38
|
}
|
|
36
39
|
|
|
37
|
-
.ws-toc .pf-
|
|
40
|
+
.ws-toc .pf-v6-c-jump-links__main {
|
|
38
41
|
scrollbar-width: none;
|
|
39
42
|
}
|
|
40
43
|
|
|
41
44
|
/* Hide TOC scrollbar Chrome, Safari & Opera */
|
|
42
|
-
.ws-toc .pf-
|
|
45
|
+
.ws-toc .pf-v6-c-jump-links__main::-webkit-scrollbar {
|
|
43
46
|
display: none;
|
|
44
47
|
}
|
|
45
48
|
|
|
@@ -52,7 +55,7 @@
|
|
|
52
55
|
-ms-overflow-style: none;
|
|
53
56
|
scrollbar-width: none;
|
|
54
57
|
order: 1;
|
|
55
|
-
padding: 0 var(--pf-
|
|
58
|
+
padding: 0 var(--pf-t--global--spacer--lg) var(--pf-t--global--spacer--lg) var(--pf-t--global--spacer--2xl);
|
|
56
59
|
flex-grow: 1;
|
|
57
60
|
background: none;
|
|
58
61
|
margin: 0;
|
|
@@ -64,19 +67,3 @@
|
|
|
64
67
|
}
|
|
65
68
|
}
|
|
66
69
|
|
|
67
|
-
/* .ws-toc-link { */
|
|
68
|
-
.ws-toc-item .pf-v5-c-jump-links__link {
|
|
69
|
-
position: relative;
|
|
70
|
-
display: block;
|
|
71
|
-
color: var(--ws-toc-link--Color, var(--pf-v5-global--Color--300));
|
|
72
|
-
font-size: var(--pf-v5-global--FontSize--sm);
|
|
73
|
-
margin: -4px 0;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.ws-toc-sublist > .ws-toc-item:first-child .pf-v5-c-jump-links__link {
|
|
77
|
-
margin-top: 0;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.ws-toc-item.pf-m-current .pf-v5-c-jump-links__link::before {
|
|
81
|
-
z-index: 1;
|
|
82
|
-
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Page layout */
|
|
2
|
-
/* tells .pf-
|
|
2
|
+
/* tells .pf-v6-c-page to consume the available space left over from the banners/footers */
|
|
3
3
|
#ws-router {
|
|
4
4
|
display: flex;
|
|
5
5
|
flex-direction: column;
|
|
@@ -8,43 +8,8 @@
|
|
|
8
8
|
flex: 1;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
.ws-switcher-divider {
|
|
12
|
-
padding: 0 var(--pf-v5-global--spacer--md);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@media (min-width: 1200px) {
|
|
16
|
-
.ws-page-sidebar {
|
|
17
|
-
box-shadow: none !important;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.ws-page-sidebar > .pf-v5-c-page__sidebar-body {
|
|
22
|
-
padding-top: var(--pf-v5-global--spacer--md);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
11
|
/* Search */
|
|
26
12
|
#algolia-autocomplete-listbox-0 {
|
|
27
13
|
/* Fix search results overflowing page */
|
|
28
14
|
min-width: 480px !important;
|
|
29
15
|
}
|
|
30
|
-
.ws-global-search.pf-v5-c-input-group {
|
|
31
|
-
/* remove white background on dark Masthead */
|
|
32
|
-
--pf-v5-c-input-group--BackgroundColor: none;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/* For tiny (200px) viewports */
|
|
36
|
-
.ws-masthead .pf-v5-c-toolbar__item {
|
|
37
|
-
min-width: 0;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.ws-masthead .pf-v5-c-switch {
|
|
41
|
-
align-items: center;
|
|
42
|
-
--pf-v5-c-switch__input--not-checked__label--Color: var(--pf-v5-global--Color--100);
|
|
43
|
-
--pf-v5-c-switch__input--checked__label--Color: var(--pf-v5-global--Color--100);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.ws-masthead .pf-v5-c-toggle-group {
|
|
47
|
-
--pf-v5-c-toggle-group__button--m-selected--BackgroundColor: var(--pf-v5-global--palette--blue-400);
|
|
48
|
-
--pf-v5-c-toggle-group__button--focus--BackgroundColor: transparent;
|
|
49
|
-
--pf-v5-c-toggle-group__button--hover--BackgroundColor: transparent;
|
|
50
|
-
}
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
ToolbarItem,
|
|
25
25
|
SkipToContent,
|
|
26
26
|
Switch,
|
|
27
|
-
SearchInput,
|
|
27
|
+
// SearchInput,
|
|
28
28
|
ToggleGroup,
|
|
29
29
|
ToggleGroupItem
|
|
30
30
|
} from '@patternfly/react-core';
|
|
@@ -35,6 +35,7 @@ import SunIcon from '@patternfly/react-icons/dist/esm/icons/sun-icon';
|
|
|
35
35
|
import { SideNav, TopNav, GdprBanner } from '../../components';
|
|
36
36
|
import staticVersions from '../../versions.json';
|
|
37
37
|
import v5Logo from '../PF-HorizontalLogo-Reverse.svg';
|
|
38
|
+
import { Footer } from '@patternfly/documentation-framework/components';
|
|
38
39
|
|
|
39
40
|
export const RtlContext = createContext(false);
|
|
40
41
|
|
|
@@ -51,38 +52,38 @@ const HeaderTools = ({
|
|
|
51
52
|
const initialVersion = staticVersions.Releases.find(release => release.latest);
|
|
52
53
|
const latestVersion = versions.Releases.find(version => version.latest);
|
|
53
54
|
const previousReleases = Object.values(versions.Releases).filter(version => !version.hidden && !version.latest);
|
|
54
|
-
const hasSearch = algolia;
|
|
55
|
+
// const hasSearch = algolia;
|
|
55
56
|
const [isDropdownOpen, setDropdownOpen] = useState(false);
|
|
56
|
-
const [searchValue, setSearchValue] = React.useState('');
|
|
57
|
-
const [isSearchExpanded, setIsSearchExpanded] = React.useState(false);
|
|
57
|
+
// const [searchValue, setSearchValue] = React.useState('');
|
|
58
|
+
// const [isSearchExpanded, setIsSearchExpanded] = React.useState(false);
|
|
58
59
|
const [isDarkTheme, setIsDarkTheme] = React.useState(false);
|
|
59
60
|
|
|
60
61
|
const getDropdownItem = (version, isLatest = false) => (
|
|
61
62
|
<DropdownItem itemId={version.name} key={version.name} to={isLatest ? '/' : `/${version.name}`}>
|
|
62
|
-
{`
|
|
63
|
+
{`Current ${version.name}`}
|
|
63
64
|
</DropdownItem>
|
|
64
65
|
);
|
|
65
66
|
|
|
66
|
-
const onChange = (_evt, value) => {
|
|
67
|
-
|
|
68
|
-
};
|
|
67
|
+
// const onChange = (_evt, value) => {
|
|
68
|
+
// setSearchValue(value);
|
|
69
|
+
// };
|
|
69
70
|
|
|
70
|
-
const onToggleExpand = (_evt, isSearchExpanded) => {
|
|
71
|
-
|
|
72
|
-
};
|
|
71
|
+
// const onToggleExpand = (_evt, isSearchExpanded) => {
|
|
72
|
+
// setIsSearchExpanded(!isSearchExpanded);
|
|
73
|
+
// };
|
|
73
74
|
|
|
74
75
|
const toggleDarkTheme = (_evt, selected) => {
|
|
75
76
|
const darkThemeToggleClicked = !selected === isDarkTheme
|
|
76
|
-
document.querySelector('html').classList.toggle('pf-
|
|
77
|
+
document.querySelector('html').classList.toggle('pf-v6-theme-dark', darkThemeToggleClicked);
|
|
77
78
|
setIsDarkTheme(darkThemeToggleClicked);
|
|
78
79
|
};
|
|
79
80
|
|
|
80
|
-
useEffect(() => {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}, [isSearchExpanded])
|
|
81
|
+
// useEffect(() => {
|
|
82
|
+
// // reattach algolia to input each time search is expanded
|
|
83
|
+
// if (hasSearch && isSearchExpanded) {
|
|
84
|
+
// attachDocSearch(algolia, '.ws-global-search .pf-v6-c-text-input-group__text-input', 1000);
|
|
85
|
+
// }
|
|
86
|
+
// }, [isSearchExpanded])
|
|
86
87
|
|
|
87
88
|
return (
|
|
88
89
|
<Toolbar isFullHeight>
|
|
@@ -93,8 +94,7 @@ const HeaderTools = ({
|
|
|
93
94
|
</ToolbarItem>
|
|
94
95
|
)}
|
|
95
96
|
<ToolbarGroup
|
|
96
|
-
align={{ default: '
|
|
97
|
-
spaceItems={{ default: 'spacerNone', md: 'spacerMd' }}
|
|
97
|
+
align={{ default: 'alignEnd' }}
|
|
98
98
|
>
|
|
99
99
|
{hasDarkThemeSwitcher && (
|
|
100
100
|
<ToolbarItem>
|
|
@@ -109,7 +109,7 @@ const HeaderTools = ({
|
|
|
109
109
|
<Switch id="ws-rtl-switch" label={'RTL'} defaultChecked={isRTL} onChange={() => setIsRTL(isRTL => !isRTL)} />
|
|
110
110
|
</ToolbarItem>
|
|
111
111
|
)}
|
|
112
|
-
{hasSearch && (
|
|
112
|
+
{/* {hasSearch && (
|
|
113
113
|
<ToolbarItem>
|
|
114
114
|
<SearchInput
|
|
115
115
|
className="ws-global-search"
|
|
@@ -120,7 +120,7 @@ const HeaderTools = ({
|
|
|
120
120
|
expandableInput={{ isExpanded: isSearchExpanded, onToggleExpand, toggleAriaLabel: 'Expandable search input toggle' }}
|
|
121
121
|
/>
|
|
122
122
|
</ToolbarItem>
|
|
123
|
-
)}
|
|
123
|
+
)} */}
|
|
124
124
|
<ToolbarItem>
|
|
125
125
|
<Button
|
|
126
126
|
component="a"
|
|
@@ -145,7 +145,7 @@ const HeaderTools = ({
|
|
|
145
145
|
onClick={() => setDropdownOpen(!isDropdownOpen)}
|
|
146
146
|
isExpanded={isDropdownOpen}
|
|
147
147
|
>
|
|
148
|
-
|
|
148
|
+
Current alphas
|
|
149
149
|
</MenuToggle>
|
|
150
150
|
)}
|
|
151
151
|
>
|
|
@@ -163,12 +163,35 @@ const HeaderTools = ({
|
|
|
163
163
|
</DropdownList>
|
|
164
164
|
</DropdownGroup>
|
|
165
165
|
)}
|
|
166
|
-
<Divider key="
|
|
166
|
+
<Divider key="divider1"/>
|
|
167
|
+
<DropdownGroup key="Alpha preview version" label="Alpha preview version">
|
|
168
|
+
<DropdownList>
|
|
169
|
+
<DropdownItem
|
|
170
|
+
key="PatternFly 6"
|
|
171
|
+
className="ws-patternfly-versions"
|
|
172
|
+
isExternalLink
|
|
173
|
+
to="https://staging-v6.patternfly.org/"
|
|
174
|
+
itemId="patternfly-6"
|
|
175
|
+
>
|
|
176
|
+
PatternFly 6
|
|
177
|
+
</DropdownItem>
|
|
178
|
+
</DropdownList>
|
|
179
|
+
</DropdownGroup>
|
|
180
|
+
<Divider key="divider2"/>
|
|
167
181
|
<DropdownGroup key="Previous versions" label="Previous versions">
|
|
168
182
|
<DropdownList>
|
|
183
|
+
<DropdownItem
|
|
184
|
+
key="PatternFly 5"
|
|
185
|
+
className="ws-patternfly-versions"
|
|
186
|
+
isExternalLink
|
|
187
|
+
to="https://www.patternfly.org"
|
|
188
|
+
itemId="patternfly-5"
|
|
189
|
+
>
|
|
190
|
+
PatternFly 5
|
|
191
|
+
</DropdownItem>
|
|
169
192
|
<DropdownItem
|
|
170
193
|
key="PatternFly 4"
|
|
171
|
-
className="ws-patternfly-
|
|
194
|
+
className="ws-patternfly-versions"
|
|
172
195
|
isExternalLink
|
|
173
196
|
to="http://v4-archive.patternfly.org/v4/"
|
|
174
197
|
itemId="patternfly-4"
|
|
@@ -177,7 +200,7 @@ const HeaderTools = ({
|
|
|
177
200
|
</DropdownItem>
|
|
178
201
|
<DropdownItem
|
|
179
202
|
key="PatternFly 3"
|
|
180
|
-
className="ws-patternfly-
|
|
203
|
+
className="ws-patternfly-versions"
|
|
181
204
|
isExternalLink
|
|
182
205
|
to="https://pf3.patternfly.org/"
|
|
183
206
|
itemId="patternfly-3"
|
|
@@ -201,7 +224,7 @@ export function attachDocSearch(algolia, inputSelector, timeout) {
|
|
|
201
224
|
inputSelector,
|
|
202
225
|
autocompleteOptions: {
|
|
203
226
|
hint: false,
|
|
204
|
-
appendTo: `.ws-global-search .pf-
|
|
227
|
+
appendTo: `.ws-global-search .pf-v6-c-text-input-group`,
|
|
205
228
|
},
|
|
206
229
|
debug: process.env.NODE_ENV !== 'production',
|
|
207
230
|
...algolia
|
|
@@ -240,18 +263,15 @@ export const SideNavLayout = ({ children, groupedRoutes, navOpen: navOpenProp })
|
|
|
240
263
|
}, []);
|
|
241
264
|
|
|
242
265
|
const SideBar = (
|
|
243
|
-
<PageSidebar
|
|
244
|
-
className="ws-page-sidebar"
|
|
245
|
-
theme="light"
|
|
246
|
-
>
|
|
266
|
+
<PageSidebar>
|
|
247
267
|
<PageSidebarBody>
|
|
248
268
|
<SideNav navItems={sideNavItems} groupedRoutes={groupedRoutes} />
|
|
249
269
|
</PageSidebarBody>
|
|
250
270
|
</PageSidebar>
|
|
251
271
|
);
|
|
252
272
|
|
|
253
|
-
const
|
|
254
|
-
<Masthead
|
|
273
|
+
const masthead = (
|
|
274
|
+
<Masthead>
|
|
255
275
|
<MastheadToggle>
|
|
256
276
|
<PageToggleButton variant="plain" aria-label="Global navigation">
|
|
257
277
|
<BarsIcon />
|
|
@@ -263,7 +283,7 @@ export const SideNavLayout = ({ children, groupedRoutes, navOpen: navOpenProp })
|
|
|
263
283
|
<svg height="40px" viewBox="0 0 679 158">
|
|
264
284
|
<title>PF-HorizontalLogo-Color</title>
|
|
265
285
|
<defs>
|
|
266
|
-
<linearGradient x1="68%" y1="2.25860997e-13%" x2="32%" y2="100%" id="linearGradient-
|
|
286
|
+
<linearGradient x1="68%" y1="2.25860997e-13%" x2="32%" y2="100%" id="linearGradient-website-masthead">
|
|
267
287
|
<stop stopColor="#2B9AF3" offset="0%"></stop>
|
|
268
288
|
<stop stopColor="#73BCF7" stopOpacity="0.502212631" offset="100%"></stop>
|
|
269
289
|
</linearGradient>
|
|
@@ -282,9 +302,9 @@ export const SideNavLayout = ({ children, groupedRoutes, navOpen: navOpenProp })
|
|
|
282
302
|
<path d="M429.21,84.69 C428.07,84.69 426.96,84.645 425.88,84.555 C424.8,84.465 423.9,84.33 423.18,84.15 L423.18,71.73 C424.38,71.97 425.88,72.09 427.68,72.09 C432.36,72.09 435.51,70.05 437.13,65.97 L437.13,65.88 L418.86,17.64 L434.97,17.64 L445.5,47.61 L457.74,17.64 L473.49,17.64 L452.16,67.68 C450.42,71.82 448.5,75.135 446.4,77.625 C444.3,80.115 441.87,81.915 439.11,83.025 C436.35,84.135 433.05,84.69 429.21,84.69 Z"></path>
|
|
283
303
|
</g>
|
|
284
304
|
<g transform="translate(0.000000, 0.000000)">
|
|
285
|
-
<path d="M61.826087,0 L158,0 L158,96.173913 L147.695652,96.173913 C100.271201,96.173913 61.826087,57.7287992 61.826087,10.3043478 L61.826087,0 L61.826087,0 Z" fill=
|
|
286
|
-
<path d="M158,3.43478261 L65.2608696,158 L138,158 C149.045695,158 158,149.045695 158,138 L158,3.43478261 L158,3.43478261 Z" fill="url(#linearGradient-
|
|
287
|
-
<path d="M123.652174,-30.9130435 L30.9130435,123.652174 L103.652174,123.652174 C114.697869,123.652174 123.652174,114.697869 123.652174,103.652174 L123.652174,-30.9130435 L123.652174,-30.9130435 Z" fill="url(#linearGradient-
|
|
305
|
+
<path d="M61.826087,0 L158,0 L158,96.173913 L147.695652,96.173913 C100.271201,96.173913 61.826087,57.7287992 61.826087,10.3043478 L61.826087,0 L61.826087,0 Z" fill='var(--pf-t--color--blue--50)'></path>
|
|
306
|
+
<path d="M158,3.43478261 L65.2608696,158 L138,158 C149.045695,158 158,149.045695 158,138 L158,3.43478261 L158,3.43478261 Z" fill="url(#linearGradient-website-masthead)"></path>
|
|
307
|
+
<path d="M123.652174,-30.9130435 L30.9130435,123.652174 L103.652174,123.652174 C114.697869,123.652174 123.652174,114.697869 123.652174,103.652174 L123.652174,-30.9130435 L123.652174,-30.9130435 Z" fill="url(#linearGradient-website-masthead)" transform="translate(77.282609, 46.369565) scale(1, -1) rotate(90.000000) translate(-77.282609, -46.369565) "></path>
|
|
288
308
|
</g>
|
|
289
309
|
</g>
|
|
290
310
|
</svg>
|
|
@@ -314,13 +334,15 @@ export const SideNavLayout = ({ children, groupedRoutes, navOpen: navOpenProp })
|
|
|
314
334
|
<Page
|
|
315
335
|
id="ws-page"
|
|
316
336
|
mainContainerId="ws-page-main"
|
|
317
|
-
|
|
337
|
+
mainComponent="div"
|
|
338
|
+
masthead={masthead}
|
|
318
339
|
sidebar={SideBar}
|
|
319
340
|
skipToContent={<SkipToContent href="#ws-page-main">Skip to content</SkipToContent>}
|
|
320
341
|
isManagedSidebar
|
|
321
342
|
defaultManagedSidebarIsOpen={navOpenProp}
|
|
322
343
|
>
|
|
323
344
|
{children}
|
|
345
|
+
{process.env.hasFooter && <Footer />}
|
|
324
346
|
</Page>
|
|
325
347
|
<div id="ws-page-banners">
|
|
326
348
|
{hasGdprBanner && <GdprBanner />}
|