@patternfly/documentation-framework 6.0.0-alpha.47 → 6.0.0-alpha.49
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/example/example.css +4 -48
- package/components/example/example.js +46 -43
- package/components/propsTable/propsTable.js +11 -7
- package/package.json +3 -3
- package/templates/mdx.js +17 -26
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.49 (2024-06-20)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* cleaning out example.css ([#4081](https://github.com/patternfly/patternfly-org/issues/4081)) ([c06d13d](https://github.com/patternfly/patternfly-org/commit/c06d13d63df648f64e1c07f4e0ddb24e845ef405))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# 6.0.0-alpha.48 (2024-06-18)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* add component groups alpha docs ([#4105](https://github.com/patternfly/patternfly-org/issues/4105)) ([f9c2be1](https://github.com/patternfly/patternfly-org/commit/f9c2be12f74dad69e390ba66af5cc34a350fa619))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
# 6.0.0-alpha.47 (2024-06-17)
|
|
7
29
|
|
|
8
30
|
|
|
@@ -2,19 +2,6 @@
|
|
|
2
2
|
--ws-code-editor--tooltip--MaxWidth: 16ch;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
.ws-example {
|
|
6
|
-
margin-top: var(--pf-t--global--spacer--lg);
|
|
7
|
-
margin-bottom: var(--pf-t--global--spacer--lg);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.ws-example > .ws-example-header {
|
|
11
|
-
padding: var(--pf-t--global--spacer--md);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.ws-example-header > .ws-example-heading:not(:last-child) {
|
|
15
|
-
margin-bottom: var(--pf-t--global--spacer--md);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
5
|
.ws-code-editor:not(.ws-example-code-expanded) > .pf-v6-c-code-editor__header::before {
|
|
19
6
|
--pf-v6-c-code-editor__header--before--BorderBottomWidth: 0;
|
|
20
7
|
}
|
|
@@ -30,27 +17,6 @@
|
|
|
30
17
|
--pf-v6-c-button--after--BorderWidth: 0;
|
|
31
18
|
}
|
|
32
19
|
|
|
33
|
-
.ws-preview {
|
|
34
|
-
padding: var(--pf-t--global--spacer--md);
|
|
35
|
-
/* background-color: var(--pf-v6-global--BackgroundColor--100); */
|
|
36
|
-
/* border-bottom: var(--pf-v6-global--BorderWidth--sm) solid var(--pf-v6-global--BorderColor--300); */
|
|
37
|
-
transition: width .2s ease-in-out;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.ws-core-c-page.ws-preview > .ws-preview-html,
|
|
41
|
-
.ws-react-c-page.ws-preview > .pf-v6-c-page {
|
|
42
|
-
overflow: hidden;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.ws-editor {
|
|
46
|
-
/* font-size: var(--pf-v6-global--FontSize--md); */
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.ws-editor .token.punctuation,
|
|
50
|
-
.ws-editor .token.operator {
|
|
51
|
-
/* color: var(--pf-v6-global--danger-color--100); */
|
|
52
|
-
}
|
|
53
|
-
|
|
54
20
|
.ws-preview__thumbnail-link {
|
|
55
21
|
position: relative;
|
|
56
22
|
line-height: 0;
|
|
@@ -100,14 +66,8 @@
|
|
|
100
66
|
color: rgba(255,255,255,.4);
|
|
101
67
|
}
|
|
102
68
|
|
|
103
|
-
.pf-v6-c-badge.ws-beta-badge {
|
|
104
|
-
/* --pf-v6-c-badge--m-unread--BackgroundColor: var(--pf-v6-global--BackgroundColor--100); */
|
|
105
|
-
/* --pf-v6-c-badge--m-unread--Color: var(--pf-v6-global--primary-color--100); */
|
|
106
|
-
/* border: var(--pf-v6-global--BorderWidth--sm) solid var(--pf-v6-global--primary-color--100); */
|
|
107
|
-
}
|
|
108
|
-
|
|
109
69
|
.ws-prop-required {
|
|
110
|
-
|
|
70
|
+
color: var(--pf-t--global--text--color--status--danger--default);
|
|
111
71
|
}
|
|
112
72
|
|
|
113
73
|
.ws-full-page-utils {
|
|
@@ -115,18 +75,14 @@
|
|
|
115
75
|
right: 0;
|
|
116
76
|
bottom: 0;
|
|
117
77
|
padding: var(--pf-t--global--spacer--lg);
|
|
118
|
-
|
|
78
|
+
z-index: var(--pf-t--global--z-index--2xl);
|
|
119
79
|
}
|
|
120
80
|
|
|
121
81
|
.ws-full-page-utils::before {
|
|
122
82
|
position: absolute;
|
|
123
83
|
inset: 0;
|
|
124
84
|
content: "";
|
|
125
|
-
|
|
85
|
+
background-color: var(--pf-t--global--background--color--floating--default);
|
|
126
86
|
opacity: 0.8;
|
|
127
|
-
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.pf-v6-theme-dark .ws-theme-switch-full-page::before {
|
|
131
|
-
/* background-color: var(--pf-v6-global--BackgroundColor--300); */
|
|
87
|
+
box-shadow: var(--pf-t--global--box-shadow--sm);
|
|
132
88
|
}
|
|
@@ -9,6 +9,8 @@ import {
|
|
|
9
9
|
Label,
|
|
10
10
|
Switch,
|
|
11
11
|
Tooltip,
|
|
12
|
+
Stack,
|
|
13
|
+
StackItem
|
|
12
14
|
} from '@patternfly/react-core';
|
|
13
15
|
import * as reactCoreModule from '@patternfly/react-core';
|
|
14
16
|
import * as reactCoreNextModule from '@patternfly/react-core/next';
|
|
@@ -152,7 +154,6 @@ export const Example = ({
|
|
|
152
154
|
livePreview = (
|
|
153
155
|
<div
|
|
154
156
|
className={css(
|
|
155
|
-
'ws-preview-html',
|
|
156
157
|
isFullscreenPreview && 'pf-v6-u-h-100'
|
|
157
158
|
)}
|
|
158
159
|
dangerouslySetInnerHTML={{ __html: editorCode }}
|
|
@@ -282,55 +283,57 @@ export const Example = ({
|
|
|
282
283
|
const metaText = hasMetaText && tooltips
|
|
283
284
|
|
|
284
285
|
return (
|
|
285
|
-
<
|
|
286
|
-
<
|
|
286
|
+
<Stack hasGutter>
|
|
287
|
+
<StackItem>
|
|
287
288
|
<AutoLinkHeader
|
|
288
289
|
metaText={metaText}
|
|
289
290
|
headingLevel="h3"
|
|
290
|
-
className="ws-example-heading"
|
|
291
291
|
>
|
|
292
292
|
{title}
|
|
293
293
|
</AutoLinkHeader>
|
|
294
294
|
{children}
|
|
295
|
-
</
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
<
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
295
|
+
</StackItem>
|
|
296
|
+
<StackItem>
|
|
297
|
+
{isFullscreen ? (
|
|
298
|
+
<div>
|
|
299
|
+
<a
|
|
300
|
+
className="ws-preview__thumbnail-link"
|
|
301
|
+
href={fullscreenLink}
|
|
302
|
+
target="_blank"
|
|
303
|
+
aria-label={`Open fullscreen ${title} example`}
|
|
304
|
+
>
|
|
305
|
+
<img
|
|
306
|
+
src={thumbnail.src}
|
|
307
|
+
width={thumbnail.width}
|
|
308
|
+
height={thumbnail.height}
|
|
309
|
+
alt={`${title} screenshot`}
|
|
310
|
+
/>
|
|
311
|
+
</a>
|
|
312
|
+
</div>
|
|
313
|
+
) : (
|
|
314
|
+
<div
|
|
315
|
+
id={previewId}
|
|
316
|
+
className={css(
|
|
317
|
+
className,
|
|
318
|
+
isRTL && 'pf-v6-m-dir-rtl'
|
|
319
|
+
)}
|
|
303
320
|
>
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
{livePreview}
|
|
322
|
-
</div>
|
|
323
|
-
)}
|
|
324
|
-
<ExampleToolbar
|
|
325
|
-
lang={lang}
|
|
326
|
-
isFullscreen={isFullscreen}
|
|
327
|
-
fullscreenLink={fullscreenLink}
|
|
328
|
-
originalCode={code}
|
|
329
|
-
code={editorCode}
|
|
330
|
-
setCode={debounce(setEditorCode, 300)}
|
|
331
|
-
codeBoxParams={codeBoxParams}
|
|
332
|
-
exampleTitle={title}
|
|
333
|
-
/>
|
|
334
|
-
</div>
|
|
321
|
+
{livePreview}
|
|
322
|
+
</div>
|
|
323
|
+
)}
|
|
324
|
+
</StackItem>
|
|
325
|
+
<StackItem>
|
|
326
|
+
<ExampleToolbar
|
|
327
|
+
lang={lang}
|
|
328
|
+
isFullscreen={isFullscreen}
|
|
329
|
+
fullscreenLink={fullscreenLink}
|
|
330
|
+
originalCode={code}
|
|
331
|
+
code={editorCode}
|
|
332
|
+
setCode={debounce(setEditorCode, 300)}
|
|
333
|
+
codeBoxParams={codeBoxParams}
|
|
334
|
+
exampleTitle={title}
|
|
335
|
+
/>
|
|
336
|
+
</StackItem>
|
|
337
|
+
</Stack>
|
|
335
338
|
);
|
|
336
339
|
};
|
|
@@ -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,
|
|
@@ -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>
|
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.49",
|
|
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.38",
|
|
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": "11e7cf09028ab556765ba853f4db8fad15738122"
|
|
84
84
|
}
|
package/templates/mdx.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { PageSection, Title, Tooltip, PageSectionVariants, Button, BackToTop, Flex, FlexItem, PageGroup, Page, Text, TextContent, Label } from '@patternfly/react-core';
|
|
2
|
+
import { PageSection, Title, Tooltip, PageSectionVariants, Button, BackToTop, Flex, FlexItem, PageGroup, Page, Text, TextContent, Label, Stack, StackItem } from '@patternfly/react-core';
|
|
3
3
|
import { css } from '@patternfly/react-styles';
|
|
4
4
|
import ExternalLinkAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon';
|
|
5
5
|
import { Router, useLocation } from '@reach/router';
|
|
@@ -52,18 +52,11 @@ const MDXChildTemplate = ({
|
|
|
52
52
|
}
|
|
53
53
|
ensureID(toc);
|
|
54
54
|
}
|
|
55
|
-
const innerContentWrapperClass = () => {
|
|
56
|
-
if (source === 'landing-pages') {
|
|
57
|
-
return 'landing-pages';
|
|
58
|
-
}
|
|
59
|
-
if (source === 'release-notes') {
|
|
60
|
-
return '';
|
|
61
|
-
}
|
|
62
|
-
return 'ws-mdx-content-content'
|
|
63
|
-
};
|
|
64
55
|
|
|
65
|
-
const
|
|
66
|
-
|
|
56
|
+
const isComponentCodeDocs = ['react', 'react-demos', 'html', 'html-demos', 'react-templates'].includes(source);
|
|
57
|
+
|
|
58
|
+
const InlineAlerts = (optIn || beta || deprecated || source === 'react-deprecated' || source === 'html-deprecated' || template || source === 'react-template') && (
|
|
59
|
+
<StackItem>
|
|
67
60
|
{optIn && (
|
|
68
61
|
<InlineAlert title="Opt-in feature">
|
|
69
62
|
{optIn}
|
|
@@ -90,28 +83,27 @@ const MDXChildTemplate = ({
|
|
|
90
83
|
{`This page showcases templates for the ${id.toLowerCase()} component. A template combines a component with logic that supports a specific use case, with a streamlined API that offers additional, limited customization.`}
|
|
91
84
|
</InlineAlert>
|
|
92
85
|
)}
|
|
93
|
-
</
|
|
86
|
+
</StackItem>
|
|
94
87
|
);
|
|
95
88
|
// Create dynamic component for @reach/router
|
|
96
89
|
const ChildComponent = () => (
|
|
97
|
-
<div className=
|
|
90
|
+
<div className={source !== 'landing-pages' ? 'pf-v6-l-flex' : ''}>
|
|
98
91
|
{toc.length > 1 && (
|
|
99
92
|
<TableOfContents items={toc} />
|
|
100
93
|
)}
|
|
101
|
-
<div>
|
|
102
|
-
|
|
103
|
-
{InlineAlerts}
|
|
94
|
+
<div className={isComponentCodeDocs && 'pf-v6-l-stack pf-m-gutter'} style={{...(source !== 'landing-pages' && {maxWidth: "825px"})}}>
|
|
95
|
+
{InlineAlerts}
|
|
104
96
|
<Component />
|
|
105
97
|
{functionDocumentation.length > 0 && (
|
|
106
|
-
<
|
|
98
|
+
<StackItem>
|
|
107
99
|
<AutoLinkHeader headingLevel="h2" className="pf-v6-c-content--h2" id="functions">
|
|
108
100
|
Functions
|
|
109
101
|
</AutoLinkHeader>
|
|
110
102
|
<FunctionsTable functionDescriptions={functionDocumentation}/>
|
|
111
|
-
</
|
|
103
|
+
</StackItem>
|
|
112
104
|
)}
|
|
113
105
|
{propsTitle && (
|
|
114
|
-
<
|
|
106
|
+
<StackItem>
|
|
115
107
|
<AutoLinkHeader headingLevel="h2" className="pf-v6-c-content--h2" id="props">
|
|
116
108
|
{propsTitle}
|
|
117
109
|
</AutoLinkHeader>
|
|
@@ -124,25 +116,24 @@ const MDXChildTemplate = ({
|
|
|
124
116
|
allPropComponents={propComponents}
|
|
125
117
|
/>
|
|
126
118
|
))}
|
|
127
|
-
</
|
|
119
|
+
</StackItem>
|
|
128
120
|
)}
|
|
129
121
|
{cssPrefix.length > 0 && (
|
|
130
|
-
<
|
|
122
|
+
<StackItem>
|
|
131
123
|
<AutoLinkHeader headingLevel="h2" className="pf-v6-c-content--h2" id="css-variables">
|
|
132
124
|
{cssVarsTitle}
|
|
133
125
|
</AutoLinkHeader>
|
|
134
126
|
{cssPrefix.map((prefix, index) => (
|
|
135
127
|
<CSSVariables key={index} autoLinkHeader={cssPrefix.length > 1} prefix={prefix} />
|
|
136
128
|
))}
|
|
137
|
-
</
|
|
129
|
+
</StackItem>
|
|
138
130
|
)}
|
|
139
131
|
{sourceLink && (
|
|
140
|
-
<
|
|
132
|
+
<StackItem>
|
|
141
133
|
<br />
|
|
142
134
|
<a href={sourceLink} target="_blank" onClick={() => trackEvent('view_source_click', 'click_event', source.toUpperCase())}>View source on GitHub</a>
|
|
143
|
-
</
|
|
135
|
+
</StackItem>
|
|
144
136
|
)}
|
|
145
|
-
</div>
|
|
146
137
|
</div>
|
|
147
138
|
</div>
|
|
148
139
|
);
|