@patternfly/documentation-framework 6.26.2 → 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,14 @@
|
|
|
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
|
+
|
|
6
14
|
## 6.26.2 (2025-10-08)
|
|
7
15
|
|
|
8
16
|
|
|
@@ -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>
|
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
|
}
|