@patternfly/documentation-framework 6.0.0-alpha.77 → 6.0.0-alpha.78
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 +11 -0
- package/layouts/sideNavLayout/sideNavLayout.js +21 -29
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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.78 (2024-08-19)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **docs:** update theme toggle icon colors ([#4203](https://github.com/patternfly/patternfly-org/issues/4203)) ([7979777](https://github.com/patternfly/patternfly-org/commit/79797771cecd9f0db801273567776d78417a0080))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# 6.0.0-alpha.77 (2024-08-09)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useEffect, useState, createContext } from
|
|
1
|
+
import React, { useEffect, useState, createContext } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
Button,
|
|
4
4
|
Page,
|
|
@@ -28,15 +28,15 @@ import {
|
|
|
28
28
|
ToggleGroup,
|
|
29
29
|
ToggleGroupItem,
|
|
30
30
|
MastheadLogo,
|
|
31
|
-
} from
|
|
32
|
-
import BarsIcon from
|
|
33
|
-
import GithubIcon from
|
|
34
|
-
import MoonIcon from
|
|
35
|
-
import SunIcon from
|
|
36
|
-
import { SideNav, TopNav, GdprBanner } from
|
|
37
|
-
import staticVersions from
|
|
38
|
-
import v5Logo from
|
|
39
|
-
import { Footer } from
|
|
31
|
+
} from '@patternfly/react-core';
|
|
32
|
+
import BarsIcon from '@patternfly/react-icons/dist/esm/icons/bars-icon';
|
|
33
|
+
import GithubIcon from '@patternfly/react-icons/dist/esm/icons/github-icon';
|
|
34
|
+
import MoonIcon from '@patternfly/react-icons/dist/esm/icons/moon-icon';
|
|
35
|
+
import SunIcon from '@patternfly/react-icons/dist/esm/icons/sun-icon';
|
|
36
|
+
import { SideNav, TopNav, GdprBanner } from '../../components';
|
|
37
|
+
import staticVersions from '../../versions.json';
|
|
38
|
+
import v5Logo from '../PF-HorizontalLogo-Reverse.svg';
|
|
39
|
+
import { Footer } from '@patternfly/documentation-framework/components';
|
|
40
40
|
|
|
41
41
|
export const RtlContext = createContext(false);
|
|
42
42
|
|
|
@@ -67,7 +67,7 @@ const HeaderTools = ({
|
|
|
67
67
|
<DropdownItem
|
|
68
68
|
itemId={version.name}
|
|
69
69
|
key={version.name}
|
|
70
|
-
to={isLatest ?
|
|
70
|
+
to={isLatest ? '/' : `/${version.name}`}
|
|
71
71
|
>
|
|
72
72
|
{`Current ${version.name}`}
|
|
73
73
|
</DropdownItem>
|
|
@@ -84,8 +84,8 @@ const HeaderTools = ({
|
|
|
84
84
|
const toggleDarkTheme = (_evt, selected) => {
|
|
85
85
|
const darkThemeToggleClicked = !selected === isDarkTheme;
|
|
86
86
|
document
|
|
87
|
-
.querySelector(
|
|
88
|
-
.classList.toggle(
|
|
87
|
+
.querySelector('html')
|
|
88
|
+
.classList.toggle('pf-v6-theme-dark', darkThemeToggleClicked);
|
|
89
89
|
setIsDarkTheme(darkThemeToggleClicked);
|
|
90
90
|
};
|
|
91
91
|
|
|
@@ -104,27 +104,19 @@ const HeaderTools = ({
|
|
|
104
104
|
<TopNav navItems={topNavItems} />
|
|
105
105
|
</ToolbarItem>
|
|
106
106
|
)}
|
|
107
|
-
<ToolbarGroup align={{ default:
|
|
107
|
+
<ToolbarGroup align={{ default: 'alignEnd' }}>
|
|
108
108
|
{hasDarkThemeSwitcher && (
|
|
109
109
|
<ToolbarItem>
|
|
110
110
|
<ToggleGroup aria-label="Dark theme toggle group">
|
|
111
111
|
<ToggleGroupItem
|
|
112
112
|
aria-label="light theme toggle"
|
|
113
|
-
icon={
|
|
114
|
-
<Icon size="md">
|
|
115
|
-
<SunIcon />
|
|
116
|
-
</Icon>
|
|
117
|
-
}
|
|
113
|
+
icon={<SunIcon />}
|
|
118
114
|
isSelected={!isDarkTheme}
|
|
119
115
|
onChange={toggleDarkTheme}
|
|
120
116
|
/>
|
|
121
117
|
<ToggleGroupItem
|
|
122
118
|
aria-label="dark theme toggle"
|
|
123
|
-
icon={
|
|
124
|
-
<Icon size="md">
|
|
125
|
-
<MoonIcon />
|
|
126
|
-
</Icon>
|
|
127
|
-
}
|
|
119
|
+
icon={<MoonIcon />}
|
|
128
120
|
isSelected={isDarkTheme}
|
|
129
121
|
onChange={toggleDarkTheme}
|
|
130
122
|
/>
|
|
@@ -135,7 +127,7 @@ const HeaderTools = ({
|
|
|
135
127
|
<ToolbarItem>
|
|
136
128
|
<Switch
|
|
137
129
|
id="ws-rtl-switch"
|
|
138
|
-
label={
|
|
130
|
+
label={'RTL'}
|
|
139
131
|
defaultChecked={isRTL}
|
|
140
132
|
onChange={() => setIsRTL((isRTL) => !isRTL)}
|
|
141
133
|
/>
|
|
@@ -268,7 +260,7 @@ export function attachDocSearch(algolia, inputSelector, timeout) {
|
|
|
268
260
|
hint: false,
|
|
269
261
|
appendTo: `.ws-global-search .pf-v6-c-text-input-group`,
|
|
270
262
|
},
|
|
271
|
-
debug: process.env.NODE_ENV !==
|
|
263
|
+
debug: process.env.NODE_ENV !== 'production',
|
|
272
264
|
...algolia,
|
|
273
265
|
});
|
|
274
266
|
} else {
|
|
@@ -295,11 +287,11 @@ export const SideNavLayout = ({
|
|
|
295
287
|
const [isRTL, setIsRTL] = useState(false);
|
|
296
288
|
|
|
297
289
|
useEffect(() => {
|
|
298
|
-
if (typeof window ===
|
|
290
|
+
if (typeof window === 'undefined') {
|
|
299
291
|
return;
|
|
300
292
|
}
|
|
301
293
|
if (hasVersionSwitcher && window.fetch) {
|
|
302
|
-
fetch(
|
|
294
|
+
fetch('/versions.json').then((res) => {
|
|
303
295
|
if (res.ok) {
|
|
304
296
|
res.json().then((json) => setVersions(json));
|
|
305
297
|
}
|
|
@@ -327,7 +319,7 @@ export const SideNavLayout = ({
|
|
|
327
319
|
{prnum ? (
|
|
328
320
|
`PR #${prnum}`
|
|
329
321
|
) : (
|
|
330
|
-
<MastheadLogo href={prurl ||
|
|
322
|
+
<MastheadLogo href={prurl || '/'}>
|
|
331
323
|
<svg height="40px" viewBox="0 0 679 158">
|
|
332
324
|
<title>PF-HorizontalLogo-Color</title>
|
|
333
325
|
<defs>
|
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.78",
|
|
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.67",
|
|
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": "25e5b756aba78d59b784bb9af8b12799e9b83713"
|
|
84
84
|
}
|