@patternfly/documentation-framework 6.0.0-alpha.45 → 6.0.0-alpha.47
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 +22 -0
- package/components/autoLinkHeader/autoLinkHeader.css +1 -1
- package/components/autoLinkHeader/autoLinkHeader.js +5 -17
- package/components/cssVariables/cssVariables.js +1 -1
- package/components/example/example.js +33 -32
- package/components/propsTable/propsTable.js +1 -1
- package/layouts/sideNavLayout/sideNavLayout.js +2 -2
- package/package.json +6 -6
- package/scripts/md/anchor-header.js +1 -1
- package/templates/mdx.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
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.47 (2024-06-17)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **docs-framework:** Update AutoLinkHeader to use the Text component ([#4049](https://github.com/patternfly/patternfly-org/issues/4049)) ([3a9c9a0](https://github.com/patternfly/patternfly-org/commit/3a9c9a08ff373def8b751b947e70580dcbc9e6da))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# 6.0.0-alpha.46 (2024-06-17)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* lots of bumps ([#4103](https://github.com/patternfly/patternfly-org/issues/4103)) ([b0a146d](https://github.com/patternfly/patternfly-org/commit/b0a146dbd0fc16a65c5f1787c5b8308a8008e6ac))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
# 6.0.0-alpha.45 (2024-06-12)
|
|
7
29
|
|
|
8
30
|
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
@@ -1,23 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Flex, FlexItem, Text } from '@patternfly/react-core';
|
|
3
3
|
import LinkIcon from '@patternfly/react-icons/dist/esm/icons/link-icon';
|
|
4
4
|
import { Link } from '../link/link';
|
|
5
5
|
import { slugger } from '../../helpers/slugger';
|
|
6
6
|
import { css } from '@patternfly/react-styles';
|
|
7
7
|
|
|
8
|
-
// "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl"
|
|
9
|
-
const sizes = {
|
|
10
|
-
h1: '3xl',
|
|
11
|
-
h2: '2xl',
|
|
12
|
-
h3: 'xl',
|
|
13
|
-
h4: 'lg',
|
|
14
|
-
h5: 'md',
|
|
15
|
-
h6: 'sm'
|
|
16
|
-
}
|
|
17
|
-
|
|
18
8
|
export const AutoLinkHeader = ({
|
|
19
9
|
id,
|
|
20
|
-
size,
|
|
21
10
|
headingLevel,
|
|
22
11
|
children,
|
|
23
12
|
metaText,
|
|
@@ -28,10 +17,9 @@ export const AutoLinkHeader = ({
|
|
|
28
17
|
return (
|
|
29
18
|
<Flex alignItems={{ default: 'alignItemsCenter'}} spaceItems={{ default: "spaceItemsSm" }}>
|
|
30
19
|
<FlexItem>
|
|
31
|
-
<
|
|
20
|
+
<Text
|
|
32
21
|
id={slug}
|
|
33
|
-
|
|
34
|
-
headingLevel={headingLevel || size}
|
|
22
|
+
component={headingLevel}
|
|
35
23
|
className={css('ws-heading', className)}
|
|
36
24
|
tabIndex={-1}
|
|
37
25
|
>
|
|
@@ -39,9 +27,9 @@ export const AutoLinkHeader = ({
|
|
|
39
27
|
<LinkIcon className="ws-heading-anchor-icon" style={{ verticalAlign: 'middle' }} />
|
|
40
28
|
</Link>
|
|
41
29
|
{children}
|
|
42
|
-
</
|
|
30
|
+
</Text>
|
|
43
31
|
</FlexItem>
|
|
44
|
-
<FlexItem>{metaText}</FlexItem>
|
|
32
|
+
{metaText && <FlexItem>{metaText}</FlexItem>}
|
|
45
33
|
</Flex>
|
|
46
34
|
)
|
|
47
35
|
};
|
|
@@ -170,7 +170,7 @@ export class CSSVariables extends React.Component {
|
|
|
170
170
|
render() {
|
|
171
171
|
return (
|
|
172
172
|
<React.Fragment>
|
|
173
|
-
{this.props.autoLinkHeader && <AutoLinkHeader
|
|
173
|
+
{this.props.autoLinkHeader && <AutoLinkHeader headingLevel="h3" className="pf-v6-u-mt-lg pf-v6-u-mb-md">{`Prefixed with '${this.props.prefix}'`}</AutoLinkHeader>}
|
|
174
174
|
<CSSSearch getDebouncedFilteredRows={this.getDebouncedFilteredRows} />
|
|
175
175
|
<Table
|
|
176
176
|
variant="compact"
|
|
@@ -249,42 +249,43 @@ export const Example = ({
|
|
|
249
249
|
'/' +
|
|
250
250
|
slugger(title);
|
|
251
251
|
|
|
252
|
+
const hasMetaText = isBeta || isDemo || isDeprecated || false;
|
|
253
|
+
const tooltips = (<React.Fragment>
|
|
254
|
+
{isBeta && (
|
|
255
|
+
<Tooltip content="This beta component is currently under review and is still open for further evolution.">
|
|
256
|
+
<Button variant="plain" hasNoPadding>
|
|
257
|
+
<Label isCompact color="blue">
|
|
258
|
+
Beta
|
|
259
|
+
</Label>
|
|
260
|
+
</Button>
|
|
261
|
+
</Tooltip>
|
|
262
|
+
)}
|
|
263
|
+
{isDemo && (
|
|
264
|
+
<Tooltip content="Demos show how multiple components can be used in a single design.">
|
|
265
|
+
<Button variant="plain" hasNoPadding>
|
|
266
|
+
<Label isCompact color="purple">
|
|
267
|
+
Demo
|
|
268
|
+
</Label>
|
|
269
|
+
</Button>
|
|
270
|
+
</Tooltip>
|
|
271
|
+
)}
|
|
272
|
+
{isDeprecated && (
|
|
273
|
+
<Tooltip content="Deprecated components are available for use but are no longer being maintained or enhanced.">
|
|
274
|
+
<Button variant="plain" hasNoPadding>
|
|
275
|
+
<Label isCompact color="grey">
|
|
276
|
+
Deprecated
|
|
277
|
+
</Label>
|
|
278
|
+
</Button>
|
|
279
|
+
</Tooltip>
|
|
280
|
+
)}
|
|
281
|
+
</React.Fragment>);
|
|
282
|
+
const metaText = hasMetaText && tooltips
|
|
283
|
+
|
|
252
284
|
return (
|
|
253
285
|
<div className="ws-example">
|
|
254
286
|
<div className="ws-example-header">
|
|
255
287
|
<AutoLinkHeader
|
|
256
|
-
metaText={
|
|
257
|
-
<React.Fragment>
|
|
258
|
-
{isBeta && (
|
|
259
|
-
<Tooltip content="This beta component is currently under review and is still open for further evolution.">
|
|
260
|
-
<Button variant="plain" hasNoPadding>
|
|
261
|
-
<Label isCompact color="blue">
|
|
262
|
-
Beta
|
|
263
|
-
</Label>
|
|
264
|
-
</Button>
|
|
265
|
-
</Tooltip>
|
|
266
|
-
)}
|
|
267
|
-
{isDemo && (
|
|
268
|
-
<Tooltip content="Demos show how multiple components can be used in a single design.">
|
|
269
|
-
<Button variant="plain" hasNoPadding>
|
|
270
|
-
<Label isCompact color="purple">
|
|
271
|
-
Demo
|
|
272
|
-
</Label>
|
|
273
|
-
</Button>
|
|
274
|
-
</Tooltip>
|
|
275
|
-
)}
|
|
276
|
-
{isDeprecated && (
|
|
277
|
-
<Tooltip content="Deprecated components are available for use but are no longer being maintained or enhanced.">
|
|
278
|
-
<Button variant="plain" hasNoPadding>
|
|
279
|
-
<Label isCompact color="grey">
|
|
280
|
-
Deprecated
|
|
281
|
-
</Label>
|
|
282
|
-
</Button>
|
|
283
|
-
</Tooltip>
|
|
284
|
-
)}
|
|
285
|
-
</React.Fragment>
|
|
286
|
-
}
|
|
287
|
-
size="h4"
|
|
288
|
+
metaText={metaText}
|
|
288
289
|
headingLevel="h3"
|
|
289
290
|
className="ws-example-heading"
|
|
290
291
|
>
|
|
@@ -17,7 +17,7 @@ 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
|
|
20
|
+
<AutoLinkHeader headingLevel="h3">{title}</AutoLinkHeader>
|
|
21
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
23
|
{description && <div className="pf-v6-u-mb-md">{description}</div>}
|
|
@@ -273,7 +273,7 @@ export const SideNavLayout = ({ children, groupedRoutes, navOpen: navOpenProp })
|
|
|
273
273
|
</PageSidebar>
|
|
274
274
|
);
|
|
275
275
|
|
|
276
|
-
const
|
|
276
|
+
const masthead = (
|
|
277
277
|
<Masthead className="ws-masthead">
|
|
278
278
|
<MastheadToggle>
|
|
279
279
|
<PageToggleButton variant="plain" aria-label="Global navigation">
|
|
@@ -338,7 +338,7 @@ export const SideNavLayout = ({ children, groupedRoutes, navOpen: navOpenProp })
|
|
|
338
338
|
id="ws-page"
|
|
339
339
|
mainContainerId="ws-page-main"
|
|
340
340
|
mainComponent="div"
|
|
341
|
-
|
|
341
|
+
masthead={masthead}
|
|
342
342
|
sidebar={SideBar}
|
|
343
343
|
skipToContent={<SkipToContent href="#ws-page-main">Skip to content</SkipToContent>}
|
|
344
344
|
isManagedSidebar
|
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.47",
|
|
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.36",
|
|
17
17
|
"@reach/router": "npm:@gatsbyjs/reach-router@1.3.9",
|
|
18
18
|
"autoprefixer": "9.8.6",
|
|
19
19
|
"babel-loader": "^9.1.3",
|
|
@@ -74,11 +74,11 @@
|
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"@patternfly/patternfly": "6.0.0-alpha.139",
|
|
77
|
-
"@patternfly/react-code-editor": "6.0.0-alpha.
|
|
78
|
-
"@patternfly/react-core": "6.0.0-alpha.
|
|
79
|
-
"@patternfly/react-table": "6.0.0-alpha.
|
|
77
|
+
"@patternfly/react-code-editor": "6.0.0-alpha.69",
|
|
78
|
+
"@patternfly/react-core": "6.0.0-alpha.69",
|
|
79
|
+
"@patternfly/react-table": "6.0.0-alpha.69",
|
|
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": "dc491607328d5182bf4c16432b416ed415c9a74f"
|
|
84
84
|
}
|
|
@@ -42,7 +42,7 @@ function anchorHeader(tocCallback) {
|
|
|
42
42
|
// Add to TOC for indexing
|
|
43
43
|
addTOCItem(tocItem, node.tagName);
|
|
44
44
|
|
|
45
|
-
node.properties.
|
|
45
|
+
node.properties.headingLevel = node.tagName;
|
|
46
46
|
node.properties.className = node.properties.className || '';
|
|
47
47
|
node.properties.className += node.properties.className ? ' ' : '';
|
|
48
48
|
node.properties.className += `ws-title ws-${node.tagName}`;
|
package/templates/mdx.js
CHANGED
|
@@ -104,7 +104,7 @@ const MDXChildTemplate = ({
|
|
|
104
104
|
<Component />
|
|
105
105
|
{functionDocumentation.length > 0 && (
|
|
106
106
|
<React.Fragment>
|
|
107
|
-
<AutoLinkHeader
|
|
107
|
+
<AutoLinkHeader headingLevel="h2" className="pf-v6-c-content--h2" id="functions">
|
|
108
108
|
Functions
|
|
109
109
|
</AutoLinkHeader>
|
|
110
110
|
<FunctionsTable functionDescriptions={functionDocumentation}/>
|
|
@@ -112,7 +112,7 @@ const MDXChildTemplate = ({
|
|
|
112
112
|
)}
|
|
113
113
|
{propsTitle && (
|
|
114
114
|
<React.Fragment>
|
|
115
|
-
<AutoLinkHeader
|
|
115
|
+
<AutoLinkHeader headingLevel="h2" className="pf-v6-c-content--h2" id="props">
|
|
116
116
|
{propsTitle}
|
|
117
117
|
</AutoLinkHeader>
|
|
118
118
|
{propComponents.map(component => (
|
|
@@ -128,7 +128,7 @@ const MDXChildTemplate = ({
|
|
|
128
128
|
)}
|
|
129
129
|
{cssPrefix.length > 0 && (
|
|
130
130
|
<React.Fragment>
|
|
131
|
-
<AutoLinkHeader
|
|
131
|
+
<AutoLinkHeader headingLevel="h2" className="pf-v6-c-content--h2" id="css-variables">
|
|
132
132
|
{cssVarsTitle}
|
|
133
133
|
</AutoLinkHeader>
|
|
134
134
|
{cssPrefix.map((prefix, index) => (
|