@patternfly/documentation-framework 6.0.0-alpha.105 → 6.0.0-alpha.107
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 +19 -0
- package/components/autoLinkHeader/autoLinkHeader.js +1 -0
- package/components/footer/footer.js +8 -7
- package/components/sectionGallery/TextSummary.js +6 -6
- package/components/sectionGallery/sectionDataListLayout.js +7 -7
- package/components/sectionGallery/sectionGalleryToolbar.js +14 -14
- package/package.json +3 -3
- package/scripts/md/styled-tags.js +1 -1
- package/scripts/md/typecheck.js +4 -0
- package/templates/mdx.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# 6.0.0-alpha.107 (2024-10-01)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **site:** fix build for prerelease, use editorial content ([#4271](https://github.com/patternfly/patternfly-org/issues/4271)) ([154cca6](https://github.com/patternfly/patternfly-org/commit/154cca69e2d6f2b1aef48e983a131a39185f2028))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# 6.0.0-alpha.106 (2024-09-27)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
# 6.0.0-alpha.105 (2024-09-26)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
@@ -22,6 +22,7 @@ export const AutoLinkHeader = ({
|
|
|
22
22
|
component={headingLevel}
|
|
23
23
|
className={css('ws-heading', className)}
|
|
24
24
|
tabIndex={-1}
|
|
25
|
+
isEditorial
|
|
25
26
|
>
|
|
26
27
|
<Link href={`#${slug}`} className="ws-heading-anchor" tabIndex="-1" aria-hidden>
|
|
27
28
|
<LinkIcon className="ws-heading-anchor-icon" style={{ verticalAlign: 'middle' }} />
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from "react";
|
|
2
2
|
import {
|
|
3
3
|
Brand,
|
|
4
4
|
Grid,
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
ListItem,
|
|
8
8
|
PageSection,
|
|
9
9
|
Content,
|
|
10
|
-
} from
|
|
11
|
-
import { Link } from
|
|
12
|
-
import { GithubIcon, TwitterIcon } from
|
|
13
|
-
import redhatLogo from
|
|
14
|
-
import redhatLogoDark from
|
|
10
|
+
} from "@patternfly/react-core";
|
|
11
|
+
import { Link } from "@patternfly/documentation-framework/components";
|
|
12
|
+
import { GithubIcon, TwitterIcon } from "@patternfly/react-icons";
|
|
13
|
+
import redhatLogo from "./RHLogo.png";
|
|
14
|
+
import redhatLogoDark from "./RHLogoDark.png";
|
|
15
15
|
|
|
16
16
|
export const Footer = ({ isDarkTheme }) => (
|
|
17
17
|
<React.Fragment>
|
|
@@ -39,7 +39,7 @@ export const Footer = ({ isDarkTheme }) => (
|
|
|
39
39
|
<ListItem className="ws-org-pfsite-footer-menu-list-item">
|
|
40
40
|
<Link
|
|
41
41
|
className="ws-org-pfsite-footer-menu-link"
|
|
42
|
-
to={
|
|
42
|
+
to={"/get-started/about-patternfly"}
|
|
43
43
|
aria-label="Get started with PatternFly"
|
|
44
44
|
>
|
|
45
45
|
Get started
|
|
@@ -237,6 +237,7 @@ export const Footer = ({ isDarkTheme }) => (
|
|
|
237
237
|
<Content
|
|
238
238
|
component="p"
|
|
239
239
|
className="ws-org-pfsite-footer-menu-about-description"
|
|
240
|
+
isEditorial
|
|
240
241
|
>
|
|
241
242
|
PatternFly is an open source design system built to drive
|
|
242
243
|
consistency and unify teams. From documentation and components
|
|
@@ -4,17 +4,17 @@ 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 }) => {
|
|
7
|
-
const itemDasherized = id.split(
|
|
7
|
+
const itemDasherized = id.split(" ").join("-").toLowerCase();
|
|
8
8
|
const summary = itemsData?.[itemDasherized]?.summary;
|
|
9
9
|
if (!summary) {
|
|
10
10
|
return null;
|
|
11
11
|
}
|
|
12
12
|
// Remove anchor tags to avoid <a> in summary nested within <a> of Link card/datalistitem
|
|
13
|
-
const summaryNoLinks = summary.replace(/<Link[^>]*>([^<]+)<\/Link>/gm,
|
|
13
|
+
const summaryNoLinks = summary.replace(/<Link[^>]*>([^<]+)<\/Link>/gm, "$1");
|
|
14
14
|
const { code } = convertToReactComponent(`<>${summaryNoLinks}</>`);
|
|
15
|
-
const getSummaryComponent = new Function(
|
|
15
|
+
const getSummaryComponent = new Function("React", code);
|
|
16
16
|
return getSummaryComponent(React);
|
|
17
|
-
}
|
|
17
|
+
};
|
|
18
18
|
|
|
19
19
|
export const TextSummary = ({ id, itemsData }) => {
|
|
20
20
|
if (!id) {
|
|
@@ -22,10 +22,10 @@ export const TextSummary = ({ id, itemsData }) => {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
return (
|
|
25
|
-
<Content>
|
|
25
|
+
<Content isEditorial>
|
|
26
26
|
<Content component="p">
|
|
27
27
|
<SummaryComponent id={id} itemsData={itemsData} />
|
|
28
28
|
</Content>
|
|
29
29
|
</Content>
|
|
30
|
-
)
|
|
30
|
+
);
|
|
31
31
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from "react";
|
|
2
2
|
import {
|
|
3
3
|
DataList,
|
|
4
4
|
DataListItem,
|
|
@@ -10,9 +10,9 @@ import {
|
|
|
10
10
|
Content,
|
|
11
11
|
ContentVariants,
|
|
12
12
|
Label,
|
|
13
|
-
} from
|
|
14
|
-
import { Link } from
|
|
15
|
-
import { TextSummary } from
|
|
13
|
+
} from "@patternfly/react-core";
|
|
14
|
+
import { Link } from "../link/link";
|
|
15
|
+
import { TextSummary } from "./TextSummary";
|
|
16
16
|
|
|
17
17
|
export const SectionDataListLayout = ({
|
|
18
18
|
galleryItems,
|
|
@@ -20,7 +20,7 @@ export const SectionDataListLayout = ({
|
|
|
20
20
|
hasListText,
|
|
21
21
|
hasListImages,
|
|
22
22
|
}) => {
|
|
23
|
-
if (layoutView !==
|
|
23
|
+
if (layoutView !== "list") {
|
|
24
24
|
return null;
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -55,9 +55,9 @@ export const SectionDataListLayout = ({
|
|
|
55
55
|
</DataListCell>
|
|
56
56
|
),
|
|
57
57
|
<DataListCell width={5} key="text-description">
|
|
58
|
-
<Split className={hasListText ?
|
|
58
|
+
<Split className={hasListText ? "pf-v6-u-mb-md" : null}>
|
|
59
59
|
<SplitItem isFilled>
|
|
60
|
-
<Content>
|
|
60
|
+
<Content isEditorial>
|
|
61
61
|
<Content component={ContentVariants.h2}>
|
|
62
62
|
<span>{title}</span>
|
|
63
63
|
</Content>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from "react";
|
|
2
2
|
import {
|
|
3
3
|
Button,
|
|
4
4
|
SearchInput,
|
|
@@ -10,9 +10,9 @@ import {
|
|
|
10
10
|
ContentVariants,
|
|
11
11
|
ToggleGroup,
|
|
12
12
|
ToggleGroupItem,
|
|
13
|
-
} from
|
|
14
|
-
import ListIcon from
|
|
15
|
-
import ThIcon from
|
|
13
|
+
} from "@patternfly/react-core";
|
|
14
|
+
import ListIcon from "@patternfly/react-icons/dist/esm/icons/list-icon";
|
|
15
|
+
import ThIcon from "@patternfly/react-icons/dist/esm/icons/th-icon";
|
|
16
16
|
|
|
17
17
|
export const SectionGalleryToolbar = ({
|
|
18
18
|
galleryItems,
|
|
@@ -20,8 +20,8 @@ export const SectionGalleryToolbar = ({
|
|
|
20
20
|
setSearchTerm,
|
|
21
21
|
layoutView,
|
|
22
22
|
setLayoutView,
|
|
23
|
-
placeholderText =
|
|
24
|
-
countText =
|
|
23
|
+
placeholderText = "Search by name",
|
|
24
|
+
countText = " items",
|
|
25
25
|
}) => (
|
|
26
26
|
<Toolbar isSticky>
|
|
27
27
|
<ToolbarContent>
|
|
@@ -35,7 +35,7 @@ export const SectionGalleryToolbar = ({
|
|
|
35
35
|
</ToolbarItem>
|
|
36
36
|
{searchTerm && (
|
|
37
37
|
<ToolbarItem>
|
|
38
|
-
<Button variant="link" onClick={() => setSearchTerm(
|
|
38
|
+
<Button variant="link" onClick={() => setSearchTerm("")}>
|
|
39
39
|
Reset
|
|
40
40
|
</Button>
|
|
41
41
|
</ToolbarItem>
|
|
@@ -46,25 +46,25 @@ export const SectionGalleryToolbar = ({
|
|
|
46
46
|
<ToggleGroupItem
|
|
47
47
|
icon={<ThIcon />}
|
|
48
48
|
aria-label="grid icon button"
|
|
49
|
-
isSelected={layoutView ===
|
|
50
|
-
onChange={() => setLayoutView(
|
|
49
|
+
isSelected={layoutView === "grid"}
|
|
50
|
+
onChange={() => setLayoutView("grid")}
|
|
51
51
|
></ToggleGroupItem>
|
|
52
52
|
<ToggleGroupItem
|
|
53
53
|
icon={<ListIcon />}
|
|
54
54
|
aria-label="list icon button"
|
|
55
|
-
isSelected={layoutView ===
|
|
56
|
-
onChange={() => setLayoutView(
|
|
55
|
+
isSelected={layoutView === "list"}
|
|
56
|
+
onChange={() => setLayoutView("list")}
|
|
57
57
|
></ToggleGroupItem>
|
|
58
58
|
</ToggleGroup>
|
|
59
59
|
</ToolbarItem>
|
|
60
60
|
</ToolbarGroup>
|
|
61
61
|
<ToolbarItem
|
|
62
62
|
variant="pagination"
|
|
63
|
-
gap={{ default:
|
|
64
|
-
style={{
|
|
63
|
+
gap={{ default: "gapMd", md: "gapNone" }}
|
|
64
|
+
style={{ "--pf-v6-c-toolbar__item--MinWidth": "max-content" }}
|
|
65
65
|
className="pf-m-align-self-center"
|
|
66
66
|
>
|
|
67
|
-
<Content component={ContentVariants.small}>
|
|
67
|
+
<Content isEditorial component={ContentVariants.small}>
|
|
68
68
|
{galleryItems.length}
|
|
69
69
|
{countText}
|
|
70
70
|
</Content>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/documentation-framework",
|
|
3
3
|
"description": "A framework to build documentation for PatternFly.",
|
|
4
|
-
"version": "6.0.0-alpha.
|
|
4
|
+
"version": "6.0.0-alpha.107",
|
|
5
5
|
"author": "Red Hat",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"private": false,
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"@babel/preset-env": "^7.24.3",
|
|
14
14
|
"@babel/preset-react": "^7.24.1",
|
|
15
15
|
"@mdx-js/util": "1.6.16",
|
|
16
|
-
"@patternfly/ast-helpers": "^1.4.0-alpha.
|
|
16
|
+
"@patternfly/ast-helpers": "^1.4.0-alpha.96",
|
|
17
17
|
"@reach/router": "npm:@gatsbyjs/reach-router@1.3.9",
|
|
18
18
|
"autoprefixer": "9.8.6",
|
|
19
19
|
"babel-loader": "^9.1.3",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"react": "^17.0.0 || ^18.0.0",
|
|
81
81
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "32f58f603d7cb3aebcd6801e6cc2935ef4810d13"
|
|
84
84
|
}
|
|
@@ -26,7 +26,7 @@ function styledTags() {
|
|
|
26
26
|
node.properties.className = node.properties.className || '';
|
|
27
27
|
|
|
28
28
|
if (contentStyledMdTags.includes(node.tagName)) {
|
|
29
|
-
node.properties.className += `pf-v6-c-content--${node.tagName}`;
|
|
29
|
+
node.properties.className += `pf-v6-c-content--${node.tagName} pf-m-editorial`;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
if (styledMdTags.includes(node.tagName)) {
|
package/scripts/md/typecheck.js
CHANGED
|
@@ -37,7 +37,11 @@ const reactStyles = globSync(path.join(reactStylesDir, 'css/**/*.d.ts'))
|
|
|
37
37
|
const defaultImports = [
|
|
38
38
|
'react',
|
|
39
39
|
'@reach/router',
|
|
40
|
+
'@patternfly/react-charts/echarts',
|
|
40
41
|
'@patternfly/react-charts/next',
|
|
42
|
+
'@patternfly/react-charts/next/echarts',
|
|
43
|
+
'@patternfly/react-charts/next/victory',
|
|
44
|
+
'@patternfly/react-charts/victory',
|
|
41
45
|
'@patternfly/react-core/next',
|
|
42
46
|
'@patternfly/react-core/deprecated',
|
|
43
47
|
'@patternfly/react-table/deprecated',
|
package/templates/mdx.js
CHANGED
|
@@ -249,7 +249,7 @@ export const MDXTemplate = ({
|
|
|
249
249
|
variant={!isSinglePage ? PageSectionVariants.light : ""}
|
|
250
250
|
isWidthLimited
|
|
251
251
|
>
|
|
252
|
-
<Content>
|
|
252
|
+
<Content isEditorial>
|
|
253
253
|
<Flex alignItems={{ default: 'alignItemsCenter'}}>
|
|
254
254
|
<FlexItem>
|
|
255
255
|
<Title headingLevel='h1' size='4xl' id="ws-page-title">
|