@patternfly/documentation-framework 6.26.1 → 6.26.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
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
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.26.3 (2025-10-09)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## 6.26.2 (2025-10-08)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* enable HC switcher, add beta label ([#4766](https://github.com/patternfly/patternfly-org/issues/4766)) ([bdcd2b8](https://github.com/patternfly/patternfly-org/commit/bdcd2b80a0939ae8362d8ebcd4d14f79ef0c1831))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## 6.26.1 (2025-10-08)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
@@ -7,8 +7,20 @@
|
|
|
7
7
|
transform: translate(calc(-100% - var(--pf-t--global--spacer--xs)), -50%);
|
|
8
8
|
opacity: 0;
|
|
9
9
|
position: absolute;
|
|
10
|
+
display: flex;
|
|
10
11
|
left: 0;
|
|
11
12
|
top: 50%;
|
|
13
|
+
background: none;
|
|
14
|
+
border: none;
|
|
15
|
+
padding: 0;
|
|
16
|
+
tab-index: -1;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.ws-heading-anchor::before {
|
|
20
|
+
content: '';
|
|
21
|
+
position: absolute;
|
|
22
|
+
inset: 0;
|
|
23
|
+
margin: calc(var(--pf-t--global--spacer--xs) * -1);
|
|
12
24
|
}
|
|
13
25
|
|
|
14
26
|
.ws-heading-anchor-icon {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Flex, FlexItem, Content } from '@patternfly/react-core';
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Flex, FlexItem, Content, Tooltip } from '@patternfly/react-core';
|
|
3
3
|
import LinkIcon from '@patternfly/react-icons/dist/esm/icons/link-icon';
|
|
4
|
-
import { Link } from '../link/link';
|
|
5
4
|
import { slugger } from '../../helpers/slugger';
|
|
6
5
|
import { css } from '@patternfly/react-styles';
|
|
7
6
|
|
|
@@ -13,6 +12,15 @@ export const AutoLinkHeader = ({
|
|
|
13
12
|
className
|
|
14
13
|
}) => {
|
|
15
14
|
const slug = id || slugger(children);
|
|
15
|
+
const [copied, setCopied] = useState(false);
|
|
16
|
+
|
|
17
|
+
const handleCopyUrl = (e) => {
|
|
18
|
+
e.preventDefault();
|
|
19
|
+
const url = `${window.location.origin}${window.location.pathname}#${slug}`;
|
|
20
|
+
navigator.clipboard.writeText(url).then(() => {
|
|
21
|
+
setCopied(true);
|
|
22
|
+
});
|
|
23
|
+
};
|
|
16
24
|
|
|
17
25
|
return (
|
|
18
26
|
<Flex alignItems={{ default: 'alignItemsCenter'}} spaceItems={{ default: "spaceItemsSm" }}>
|
|
@@ -24,9 +32,21 @@ export const AutoLinkHeader = ({
|
|
|
24
32
|
tabIndex={-1}
|
|
25
33
|
isEditorial
|
|
26
34
|
>
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
35
|
+
<Tooltip
|
|
36
|
+
content={copied ? "Link copied" : "Copy link to clipboard"}
|
|
37
|
+
exitDelay={copied ? 1600 : 300}
|
|
38
|
+
onTooltipHidden={() => setCopied(false)}
|
|
39
|
+
>
|
|
40
|
+
<button
|
|
41
|
+
onClick={handleCopyUrl}
|
|
42
|
+
className="ws-heading-anchor"
|
|
43
|
+
tabIndex="-1"
|
|
44
|
+
aria-hidden
|
|
45
|
+
aria-label={`Copy link to ${children}`}
|
|
46
|
+
>
|
|
47
|
+
<LinkIcon className="ws-heading-anchor-icon" />
|
|
48
|
+
</button>
|
|
49
|
+
</Tooltip>
|
|
30
50
|
{children}
|
|
31
51
|
</Content>
|
|
32
52
|
</FlexItem>
|
|
@@ -10,8 +10,12 @@ import {
|
|
|
10
10
|
ToggleGroup,
|
|
11
11
|
ToggleGroupItem,
|
|
12
12
|
Icon,
|
|
13
|
-
Divider
|
|
13
|
+
Divider,
|
|
14
|
+
Label,
|
|
15
|
+
Popover,
|
|
16
|
+
Button
|
|
14
17
|
} from '@patternfly/react-core';
|
|
18
|
+
import { HelpIcon, ExternalLinkAltIcon } from '@patternfly/react-icons';
|
|
15
19
|
import { useTheme, THEME_TYPES } from '../../hooks/useTheme';
|
|
16
20
|
|
|
17
21
|
const SunIcon = (
|
|
@@ -45,6 +49,47 @@ const DesktopIcon = (
|
|
|
45
49
|
</svg>
|
|
46
50
|
);
|
|
47
51
|
|
|
52
|
+
const ColorSchemeGroupLabel = () => {
|
|
53
|
+
return (
|
|
54
|
+
<div className="pf-v6-c-menu__group-title" id="theme-selector-color-scheme-title">
|
|
55
|
+
Color scheme
|
|
56
|
+
</div>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const HighContrastGroupLabel = () => {
|
|
61
|
+
const [isPopoverOpen, setIsPopoverOpen] = useState(false);
|
|
62
|
+
|
|
63
|
+
return (
|
|
64
|
+
<div className="pf-v6-c-menu__group-title">
|
|
65
|
+
High contrast{' '}
|
|
66
|
+
<Popover
|
|
67
|
+
onClick={(e) => e.stopPropagation()}
|
|
68
|
+
headerContent={"Under development"}
|
|
69
|
+
headerComponent="h1"
|
|
70
|
+
bodyContent={
|
|
71
|
+
"We are still working to add high contrast support across all PatternFly components and extensions. This beta allows you to preview our progress."
|
|
72
|
+
}
|
|
73
|
+
footerContent={
|
|
74
|
+
<Button icon={<ExternalLinkAltIcon />} component="a" isInline variant="link" href="/design-foundations/theming" target="_blank">
|
|
75
|
+
Learn more
|
|
76
|
+
</Button>
|
|
77
|
+
}
|
|
78
|
+
aria-label="More info about high contrast"
|
|
79
|
+
appendTo={() => document.body}
|
|
80
|
+
>
|
|
81
|
+
<Button
|
|
82
|
+
variant="plain"
|
|
83
|
+
hasNoPadding
|
|
84
|
+
icon={<HelpIcon />}
|
|
85
|
+
aria-label="High contrast help"
|
|
86
|
+
/>
|
|
87
|
+
</Popover>{' '}
|
|
88
|
+
<Label color="blue" isCompact>Beta</Label>
|
|
89
|
+
</div>
|
|
90
|
+
)
|
|
91
|
+
};
|
|
92
|
+
|
|
48
93
|
export const ThemeSelector = ({ id }) => {
|
|
49
94
|
const { mode: themeMode, setMode: setThemeMode, modes: colorModes } = useTheme(THEME_TYPES.COLOR);
|
|
50
95
|
const {
|
|
@@ -109,8 +154,8 @@ export const ThemeSelector = ({ id }) => {
|
|
|
109
154
|
preventOverflow: true
|
|
110
155
|
}}
|
|
111
156
|
>
|
|
112
|
-
<SelectGroup>
|
|
113
|
-
<SelectList aria-
|
|
157
|
+
<SelectGroup label={ColorSchemeGroupLabel}>
|
|
158
|
+
<SelectList aria-labelledby="theme-selector-color-scheme-title">
|
|
114
159
|
<SelectOption value={colorModes.SYSTEM} icon={DesktopIcon} description="Follow system preference">
|
|
115
160
|
System
|
|
116
161
|
</SelectOption>
|
|
@@ -124,7 +169,7 @@ export const ThemeSelector = ({ id }) => {
|
|
|
124
169
|
</SelectGroup>
|
|
125
170
|
{process.env.hasHighContrastSwitcher && (<>
|
|
126
171
|
<Divider />
|
|
127
|
-
<SelectGroup label=
|
|
172
|
+
<SelectGroup label={HighContrastGroupLabel}>
|
|
128
173
|
<MenuSearch>
|
|
129
174
|
<MenuSearchInput>
|
|
130
175
|
<ToggleGroup aria-label="High contrast theme switcher">
|
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.26.
|
|
4
|
+
"version": "6.26.3",
|
|
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.
|
|
15
|
+
"@patternfly/ast-helpers": "^1.4.0-alpha.288",
|
|
16
16
|
"@reach/router": "npm:@gatsbyjs/reach-router@1.3.9",
|
|
17
17
|
"autoprefixer": "10.4.19",
|
|
18
18
|
"babel-loader": "^9.1.3",
|
|
@@ -95,5 +95,5 @@
|
|
|
95
95
|
"http-cache-semantics": ">=4.1.1",
|
|
96
96
|
"nanoid": "3.3.8"
|
|
97
97
|
},
|
|
98
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "e82225dc040a0e72d930004a05587785ce5227a4"
|
|
99
99
|
}
|