@patternfly/documentation-framework 6.19.0 → 6.20.0

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 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.20.0 (2025-08-28)
7
+
8
+
9
+ ### Features
10
+
11
+ * **theme:** Add high contrast switcher feature flag ([#4761](https://github.com/patternfly/patternfly-org/issues/4761)) ([94b1bf1](https://github.com/patternfly/patternfly-org/commit/94b1bf11fdf0f9daa230671b9ea6cb8258190db2))
12
+
13
+
14
+
15
+
16
+
6
17
  # 6.19.0 (2025-08-26)
7
18
 
8
19
 
@@ -84,6 +84,7 @@ export const ThemeSelector = ({ id }) => {
84
84
  return DesktopIcon;
85
85
  }
86
86
  };
87
+
87
88
  return (
88
89
  <Select
89
90
  id={id}
@@ -116,6 +117,7 @@ export const ThemeSelector = ({ id }) => {
116
117
  </SelectOption>
117
118
  </SelectList>
118
119
  </SelectGroup>
120
+ {process.env.hasHighContrastSwitcher && (<>
119
121
  <Divider />
120
122
  <SelectGroup label="High Contrast">
121
123
  <MenuSearch>
@@ -143,6 +145,8 @@ export const ThemeSelector = ({ id }) => {
143
145
  </MenuSearchInput>
144
146
  </MenuSearch>
145
147
  </SelectGroup>
148
+ </>
149
+ )}
146
150
  </Select>
147
151
  );
148
152
  };
package/hooks/useTheme.js CHANGED
@@ -39,7 +39,8 @@ class ThemeManager {
39
39
  if (!this.isBrowser) {
40
40
  return;
41
41
  }
42
- return localStorage.getItem(this.storageKey);
42
+ const storedValue = localStorage.getItem(this.storageKey);
43
+ return storedValue || this.defaultMode;
43
44
  }
44
45
 
45
46
  setStoredValue(value) {
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.19.0",
4
+ "version": "6.20.0",
5
5
  "author": "Red Hat",
6
6
  "license": "MIT",
7
7
  "bin": {
@@ -12,7 +12,7 @@
12
12
  "@babel/preset-env": "7.27.1",
13
13
  "@babel/preset-react": "^7.24.1",
14
14
  "@mdx-js/util": "1.6.16",
15
- "@patternfly/ast-helpers": "^1.4.0-alpha.266",
15
+ "@patternfly/ast-helpers": "^1.4.0-alpha.267",
16
16
  "@reach/router": "npm:@gatsbyjs/reach-router@1.3.9",
17
17
  "autoprefixer": "10.4.19",
18
18
  "babel-loader": "^9.1.3",
@@ -87,5 +87,5 @@
87
87
  "braces": ">=3.0.3",
88
88
  "ssri": ">=8.0.1"
89
89
  },
90
- "gitHead": "60954ecaf27cf8c2449a5284f3991bc3059870d7"
90
+ "gitHead": "1c8e427c1a63ea3973e2269a7c3f8df0a1696efb"
91
91
  }
@@ -13,6 +13,7 @@ module.exports = (_env, argv) => {
13
13
  hasVersionSwitcher = false,
14
14
  hasDesignGuidelines = false,
15
15
  hasThemeSwitcher = false,
16
+ hasHighContrastSwitcher = false,
16
17
  hasRTLSwitcher = false,
17
18
  componentsData = {},
18
19
  sideNavItems = [],
@@ -142,6 +143,7 @@ module.exports = (_env, argv) => {
142
143
  'process.env.hasVersionSwitcher': JSON.stringify(hasVersionSwitcher),
143
144
  'process.env.hasDesignGuidelines': JSON.stringify(hasDesignGuidelines),
144
145
  'process.env.hasThemeSwitcher': JSON.stringify(hasThemeSwitcher),
146
+ 'process.env.hasHighContrastSwitcher': JSON.stringify(hasHighContrastSwitcher),
145
147
  'process.env.hasRTLSwitcher': JSON.stringify(hasRTLSwitcher),
146
148
  'process.env.componentsData': JSON.stringify(componentsData),
147
149
  'process.env.sideNavItems': JSON.stringify(sideNavItems),