@patternfly/documentation-framework 6.15.2 → 6.15.3
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/components/example/example.js +12 -13
- package/layouts/sideNavLayout/sideNavLayout.js +12 -13
- 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.15.3 (2025-07-21)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **docs-framework:** updates to theme switcher menu/icons ([#4710](https://github.com/patternfly/patternfly-org/issues/4710)) ([a62b4c4](https://github.com/patternfly/patternfly-org/commit/a62b4c4262f592865b5d7144357c8e3dd2a39993))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## 6.15.2 (2025-07-21)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
Flex,
|
|
7
7
|
CodeBlockCode,
|
|
8
8
|
debounce,
|
|
9
|
+
Icon,
|
|
9
10
|
Label,
|
|
10
11
|
Switch,
|
|
11
12
|
Select,
|
|
@@ -23,9 +24,9 @@ import * as reactTableModule from '@patternfly/react-table';
|
|
|
23
24
|
import * as reactTableDeprecatedModule from '@patternfly/react-table/deprecated';
|
|
24
25
|
import { css } from '@patternfly/react-styles';
|
|
25
26
|
import { getParameters } from 'codesandbox/lib/api/define';
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
const SunIcon = <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" className="pf-v6-svg" fill="var(--pf-t--global--icon--color--regular)"><path d="M16 25c-4.963 0-9-4.038-9-9s4.037-9 9-9 9 4.038 9 9-4.037 9-9 9Zm0-16c-3.86 0-7 3.14-7 7s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7Zm0-4a1 1 0 0 1-1-1V1a1 1 0 1 1 2 0v3a1 1 0 0 1-1 1Zm0 27a1 1 0 0 1-1-1v-3a1 1 0 1 1 2 0v3a1 1 0 0 1-1 1ZM4 17H1a1 1 0 1 1 0-2h3a1 1 0 1 1 0 2Zm27 0h-3a1 1 0 1 1 0-2h3a1 1 0 1 1 0 2ZM5.394 27.606a1 1 0 0 1-.707-1.707l2.12-2.12a1 1 0 1 1 1.415 1.413L6.1 27.313a.997.997 0 0 1-.707.293ZM24.485 8.515a1 1 0 0 1-.707-1.707L25.9 4.686a1 1 0 1 1 1.415 1.415l-2.122 2.12a.997.997 0 0 1-.707.294Zm-16.97 0a.997.997 0 0 1-.707-.293L4.686 6.1a1 1 0 1 1 1.415-1.415l2.12 2.122a1 1 0 0 1-.706 1.707Zm19.091 19.091a.997.997 0 0 1-.707-.293l-2.12-2.12a1 1 0 1 1 1.413-1.415l2.122 2.121a1 1 0 0 1-.707 1.707Z"></path></svg>;
|
|
28
|
+
const MoonIcon = <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" className="pf-v6-svg" fill="var(--pf-t--global--icon--color--regular)"><path d="M16.457 30C8.485 30 2 23.515 2 15.543c0-5.93 3.715-11.345 9.243-13.476a.999.999 0 0 1 1.289 1.3 12.185 12.185 0 0 0-.843 4.487c0 6.869 5.588 12.457 12.457 12.457 1.56 0 3.07-.284 4.487-.844a.998.998 0 0 1 1.3 1.29C27.802 26.285 22.387 30 16.456 30ZM9.992 4.904C6.338 7.134 4 11.177 4 15.544 4 22.412 9.588 28 16.457 28c4.367 0 8.41-2.338 10.639-5.992a14.39 14.39 0 0 1-2.95.302c-7.971 0-14.457-6.485-14.457-14.456 0-1.003.102-1.989.303-2.95Z"></path></svg>;
|
|
29
|
+
const DesktopIcon = <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" className="pf-v6-svg" fill="var(--pf-t--global--icon--color--regular)"><path d="M23.94 16a1 1 0 0 1-.992-.876 6.957 6.957 0 0 0-6.069-6.062 1 1 0 1 1 .242-1.985 8.953 8.953 0 0 1 7.812 7.8A.999.999 0 0 1 23.94 16ZM16 5a1 1 0 0 1-1-1V1a1 1 0 1 1 2 0v3a1 1 0 0 1-1 1Zm0 27a1 1 0 0 1-1-1v-3a1 1 0 1 1 2 0v3a1 1 0 0 1-1 1ZM4 17H1a1 1 0 1 1 0-2h3a1 1 0 1 1 0 2Zm27 0h-3a1 1 0 1 1 0-2h3a1 1 0 1 1 0 2ZM5.394 27.606a1 1 0 0 1-.707-1.707l2.12-2.12a1 1 0 1 1 1.415 1.413L6.1 27.313a.997.997 0 0 1-.707.293ZM24.485 8.515a1 1 0 0 1-.707-1.707L25.9 4.686a1 1 0 1 1 1.415 1.415l-2.122 2.12a.997.997 0 0 1-.707.294Zm-16.97 0a.997.997 0 0 1-.707-.293L4.686 6.1a1 1 0 1 1 1.415-1.415l2.12 2.122a1 1 0 0 1-.706 1.707Zm19.091 19.091a.997.997 0 0 1-.707-.293l-2.12-2.12a1 1 0 1 1 1.413-1.415l2.122 2.121a1 1 0 0 1-.707 1.707ZM16 24.875c-4.894 0-8.875-3.981-8.875-8.875a8.879 8.879 0 0 1 5.227-8.088.876.876 0 0 1 1.153 1.163 6.945 6.945 0 0 0-.63 2.925A7.133 7.133 0 0 0 20 19.125a6.948 6.948 0 0 0 2.925-.63.876.876 0 0 1 1.163 1.154A8.88 8.88 0 0 1 16 24.875Zm-4.785-14.153A7.135 7.135 0 0 0 8.875 16 7.133 7.133 0 0 0 16 23.125a7.13 7.13 0 0 0 5.278-2.34c-.419.06-.845.09-1.278.09-4.894 0-8.875-3.981-8.875-8.875 0-.433.03-.86.09-1.278Z"></path></svg>;
|
|
29
30
|
import { ExampleToolbar } from './exampleToolbar.jsx';
|
|
30
31
|
import { AutoLinkHeader } from '../autoLinkHeader/autoLinkHeader';
|
|
31
32
|
import {
|
|
@@ -67,11 +68,11 @@ const FullScreenThemeSelector = () => {
|
|
|
67
68
|
const getThemeIcon = (mode) => {
|
|
68
69
|
switch (mode) {
|
|
69
70
|
case THEME_MODES.LIGHT:
|
|
70
|
-
return
|
|
71
|
+
return SunIcon;
|
|
71
72
|
case THEME_MODES.DARK:
|
|
72
|
-
return
|
|
73
|
+
return MoonIcon;
|
|
73
74
|
default:
|
|
74
|
-
return
|
|
75
|
+
return DesktopIcon;
|
|
75
76
|
}
|
|
76
77
|
};
|
|
77
78
|
|
|
@@ -87,32 +88,30 @@ const FullScreenThemeSelector = () => {
|
|
|
87
88
|
ref={toggleRef}
|
|
88
89
|
onClick={() => setIsThemeSelectOpen(!isThemeSelectOpen)}
|
|
89
90
|
isExpanded={isThemeSelectOpen}
|
|
90
|
-
icon={getThemeIcon(themeMode)}
|
|
91
|
+
icon={<Icon size="lg">{getThemeIcon(themeMode)}</Icon>}
|
|
91
92
|
aria-label={`Theme selection, current: ${getThemeDisplayText(themeMode)}`}
|
|
92
|
-
|
|
93
|
-
{getThemeDisplayText(themeMode)}
|
|
94
|
-
</MenuToggle>
|
|
93
|
+
/>
|
|
95
94
|
)}
|
|
96
95
|
shouldFocusToggleOnSelect
|
|
97
96
|
>
|
|
98
97
|
<SelectList>
|
|
99
98
|
<SelectOption
|
|
100
99
|
value={THEME_MODES.SYSTEM}
|
|
101
|
-
icon={
|
|
100
|
+
icon={DesktopIcon}
|
|
102
101
|
description="Follow system preference"
|
|
103
102
|
>
|
|
104
103
|
System
|
|
105
104
|
</SelectOption>
|
|
106
105
|
<SelectOption
|
|
107
106
|
value={THEME_MODES.LIGHT}
|
|
108
|
-
icon={
|
|
107
|
+
icon={SunIcon}
|
|
109
108
|
description="Always use light mode"
|
|
110
109
|
>
|
|
111
110
|
Light
|
|
112
111
|
</SelectOption>
|
|
113
112
|
<SelectOption
|
|
114
113
|
value={THEME_MODES.DARK}
|
|
115
|
-
icon={
|
|
114
|
+
icon={MoonIcon}
|
|
116
115
|
description="Always use dark mode"
|
|
117
116
|
>
|
|
118
117
|
Dark
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
DropdownGroup,
|
|
10
10
|
DropdownList,
|
|
11
11
|
Divider,
|
|
12
|
+
Icon,
|
|
12
13
|
Masthead,
|
|
13
14
|
MastheadToggle,
|
|
14
15
|
MastheadMain,
|
|
@@ -30,9 +31,9 @@ import {
|
|
|
30
31
|
} from '@patternfly/react-core';
|
|
31
32
|
import BarsIcon from '@patternfly/react-icons/dist/esm/icons/bars-icon';
|
|
32
33
|
import GithubIcon from '@patternfly/react-icons/dist/esm/icons/github-icon';
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
const SunIcon = <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" className="pf-v6-svg" fill="var(--pf-t--global--icon--color--regular)"><path d="M16 25c-4.963 0-9-4.038-9-9s4.037-9 9-9 9 4.038 9 9-4.037 9-9 9Zm0-16c-3.86 0-7 3.14-7 7s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7Zm0-4a1 1 0 0 1-1-1V1a1 1 0 1 1 2 0v3a1 1 0 0 1-1 1Zm0 27a1 1 0 0 1-1-1v-3a1 1 0 1 1 2 0v3a1 1 0 0 1-1 1ZM4 17H1a1 1 0 1 1 0-2h3a1 1 0 1 1 0 2Zm27 0h-3a1 1 0 1 1 0-2h3a1 1 0 1 1 0 2ZM5.394 27.606a1 1 0 0 1-.707-1.707l2.12-2.12a1 1 0 1 1 1.415 1.413L6.1 27.313a.997.997 0 0 1-.707.293ZM24.485 8.515a1 1 0 0 1-.707-1.707L25.9 4.686a1 1 0 1 1 1.415 1.415l-2.122 2.12a.997.997 0 0 1-.707.294Zm-16.97 0a.997.997 0 0 1-.707-.293L4.686 6.1a1 1 0 1 1 1.415-1.415l2.12 2.122a1 1 0 0 1-.706 1.707Zm19.091 19.091a.997.997 0 0 1-.707-.293l-2.12-2.12a1 1 0 1 1 1.413-1.415l2.122 2.121a1 1 0 0 1-.707 1.707Z"></path></svg>;
|
|
35
|
+
const MoonIcon = <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" className="pf-v6-svg" fill="var(--pf-t--global--icon--color--regular)"><path d="M16.457 30C8.485 30 2 23.515 2 15.543c0-5.93 3.715-11.345 9.243-13.476a.999.999 0 0 1 1.289 1.3 12.185 12.185 0 0 0-.843 4.487c0 6.869 5.588 12.457 12.457 12.457 1.56 0 3.07-.284 4.487-.844a.998.998 0 0 1 1.3 1.29C27.802 26.285 22.387 30 16.456 30ZM9.992 4.904C6.338 7.134 4 11.177 4 15.544 4 22.412 9.588 28 16.457 28c4.367 0 8.41-2.338 10.639-5.992a14.39 14.39 0 0 1-2.95.302c-7.971 0-14.457-6.485-14.457-14.456 0-1.003.102-1.989.303-2.95Z"></path></svg>;
|
|
36
|
+
const DesktopIcon = <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" className="pf-v6-svg" fill="var(--pf-t--global--icon--color--regular)"><path d="M23.94 16a1 1 0 0 1-.992-.876 6.957 6.957 0 0 0-6.069-6.062 1 1 0 1 1 .242-1.985 8.953 8.953 0 0 1 7.812 7.8A.999.999 0 0 1 23.94 16ZM16 5a1 1 0 0 1-1-1V1a1 1 0 1 1 2 0v3a1 1 0 0 1-1 1Zm0 27a1 1 0 0 1-1-1v-3a1 1 0 1 1 2 0v3a1 1 0 0 1-1 1ZM4 17H1a1 1 0 1 1 0-2h3a1 1 0 1 1 0 2Zm27 0h-3a1 1 0 1 1 0-2h3a1 1 0 1 1 0 2ZM5.394 27.606a1 1 0 0 1-.707-1.707l2.12-2.12a1 1 0 1 1 1.415 1.413L6.1 27.313a.997.997 0 0 1-.707.293ZM24.485 8.515a1 1 0 0 1-.707-1.707L25.9 4.686a1 1 0 1 1 1.415 1.415l-2.122 2.12a.997.997 0 0 1-.707.294Zm-16.97 0a.997.997 0 0 1-.707-.293L4.686 6.1a1 1 0 1 1 1.415-1.415l2.12 2.122a1 1 0 0 1-.706 1.707Zm19.091 19.091a.997.997 0 0 1-.707-.293l-2.12-2.12a1 1 0 1 1 1.413-1.415l2.122 2.121a1 1 0 0 1-.707 1.707ZM16 24.875c-4.894 0-8.875-3.981-8.875-8.875a8.879 8.879 0 0 1 5.227-8.088.876.876 0 0 1 1.153 1.163 6.945 6.945 0 0 0-.63 2.925A7.133 7.133 0 0 0 20 19.125a6.948 6.948 0 0 0 2.925-.63.876.876 0 0 1 1.163 1.154A8.88 8.88 0 0 1 16 24.875Zm-4.785-14.153A7.135 7.135 0 0 0 8.875 16 7.133 7.133 0 0 0 16 23.125a7.13 7.13 0 0 0 5.278-2.34c-.419.06-.845.09-1.278.09-4.894 0-8.875-3.981-8.875-8.875 0-.433.03-.86.09-1.278Z"></path></svg>;
|
|
36
37
|
import { SideNav, TopNav, GdprBanner } from '../../components';
|
|
37
38
|
import staticVersions from '../../versions.json';
|
|
38
39
|
import { Footer } from '@patternfly/documentation-framework/components';
|
|
@@ -94,11 +95,11 @@ const HeaderTools = ({
|
|
|
94
95
|
const getThemeIcon = (mode) => {
|
|
95
96
|
switch (mode) {
|
|
96
97
|
case THEME_MODES.LIGHT:
|
|
97
|
-
return
|
|
98
|
+
return SunIcon;
|
|
98
99
|
case THEME_MODES.DARK:
|
|
99
|
-
return
|
|
100
|
+
return MoonIcon;
|
|
100
101
|
default:
|
|
101
|
-
return
|
|
102
|
+
return DesktopIcon;
|
|
102
103
|
}
|
|
103
104
|
};
|
|
104
105
|
|
|
@@ -168,32 +169,30 @@ const HeaderTools = ({
|
|
|
168
169
|
ref={toggleRef}
|
|
169
170
|
onClick={() => setIsThemeSelectOpen(!isThemeSelectOpen)}
|
|
170
171
|
isExpanded={isThemeSelectOpen}
|
|
171
|
-
icon={getThemeIcon(themeMode)}
|
|
172
|
+
icon={<Icon size="lg">{getThemeIcon(themeMode)}</Icon>}
|
|
172
173
|
aria-label={`Theme selection, current: ${getThemeDisplayText(themeMode)}`}
|
|
173
|
-
|
|
174
|
-
{getThemeDisplayText(themeMode)}
|
|
175
|
-
</MenuToggle>
|
|
174
|
+
/>
|
|
176
175
|
)}
|
|
177
176
|
shouldFocusToggleOnSelect
|
|
178
177
|
>
|
|
179
178
|
<SelectList>
|
|
180
179
|
<SelectOption
|
|
181
180
|
value={THEME_MODES.SYSTEM}
|
|
182
|
-
icon={
|
|
181
|
+
icon={DesktopIcon}
|
|
183
182
|
description="Follow system preference"
|
|
184
183
|
>
|
|
185
184
|
System
|
|
186
185
|
</SelectOption>
|
|
187
186
|
<SelectOption
|
|
188
187
|
value={THEME_MODES.LIGHT}
|
|
189
|
-
icon={
|
|
188
|
+
icon={SunIcon}
|
|
190
189
|
description="Always use light mode"
|
|
191
190
|
>
|
|
192
191
|
Light
|
|
193
192
|
</SelectOption>
|
|
194
193
|
<SelectOption
|
|
195
194
|
value={THEME_MODES.DARK}
|
|
196
|
-
icon={
|
|
195
|
+
icon={MoonIcon}
|
|
197
196
|
description="Always use dark mode"
|
|
198
197
|
>
|
|
199
198
|
Dark
|
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.15.
|
|
4
|
+
"version": "6.15.3",
|
|
5
5
|
"author": "Red Hat",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"bin": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"@babel/preset-env": "^7.24.3",
|
|
13
13
|
"@babel/preset-react": "^7.24.1",
|
|
14
14
|
"@mdx-js/util": "1.6.16",
|
|
15
|
-
"@patternfly/ast-helpers": "^1.4.0-alpha.
|
|
15
|
+
"@patternfly/ast-helpers": "^1.4.0-alpha.249",
|
|
16
16
|
"@reach/router": "npm:@gatsbyjs/reach-router@1.3.9",
|
|
17
17
|
"autoprefixer": "9.8.6",
|
|
18
18
|
"babel-loader": "^9.1.3",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"react": "^17.0.0 || ^18.0.0",
|
|
80
80
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "da5c0cd0af2ad7eae959ecdacca48a87682211c1"
|
|
83
83
|
}
|