@patternfly/documentation-framework 6.34.1 → 6.35.1
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 +22 -0
- package/components/example/example.css +38 -2
- package/components/example/example.js +82 -2
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
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.35.1 (2026-02-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **trainings:** updated trainings and fixed linked codesandboxes ([#4923](https://github.com/patternfly/patternfly-org/issues/4923)) ([e76918a](https://github.com/patternfly/patternfly-org/commit/e76918a7653d0106e396685e5b5a027925a47327))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# 6.35.0 (2026-02-06)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* allow full-page example utils to change position ([#4896](https://github.com/patternfly/patternfly-org/issues/4896)) ([d4b4ba3](https://github.com/patternfly/patternfly-org/commit/d4b4ba33277cd0c6173c0470502df3abfc810867))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
## 6.34.1 (2026-02-06)
|
|
7
29
|
|
|
8
30
|
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
@@ -72,12 +72,48 @@
|
|
|
72
72
|
|
|
73
73
|
.ws-full-page-utils {
|
|
74
74
|
position: fixed;
|
|
75
|
-
inset-inline-start: 0;
|
|
76
75
|
inset-block-end: 0;
|
|
77
|
-
padding: var(--pf-t--global--spacer--
|
|
76
|
+
padding: var(--pf-t--global--spacer--xl);
|
|
78
77
|
z-index: var(--pf-t--global--z-index--2xl);
|
|
79
78
|
}
|
|
80
79
|
|
|
80
|
+
.ws-full-page-utils-position-btn {
|
|
81
|
+
--ws-full-page-utils-btn--inset: var(--pf-t--global--spacer--xs);
|
|
82
|
+
position: absolute;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
:is(.ws-full-page-utils, .ws-full-page-utils-position-btn).pf-m-top-right {
|
|
86
|
+
top: var(--ws-full-page-utils-btn--inset, 0);
|
|
87
|
+
right: var(--ws-full-page-utils-btn--inset, 0);
|
|
88
|
+
bottom: auto;
|
|
89
|
+
left: auto;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
:is(.ws-full-page-utils, .ws-full-page-utils-position-btn).pf-m-bottom-right {
|
|
93
|
+
top: auto;
|
|
94
|
+
right: var(--ws-full-page-utils-btn--inset, 0);
|
|
95
|
+
bottom: var(--ws-full-page-utils-btn--inset, 0);
|
|
96
|
+
left: auto;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
:is(.ws-full-page-utils, .ws-full-page-utils-position-btn).pf-m-bottom-left {
|
|
100
|
+
top: auto;
|
|
101
|
+
right: auto;
|
|
102
|
+
bottom: var(--ws-full-page-utils-btn--inset, 0);
|
|
103
|
+
left: var(--ws-full-page-utils-btn--inset, 0);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
:is(.ws-full-page-utils, .ws-full-page-utils-position-btn).pf-m-top-left {
|
|
107
|
+
top: var(--ws-full-page-utils-btn--inset, 0);
|
|
108
|
+
right: auto;
|
|
109
|
+
bottom: auto;
|
|
110
|
+
left: var(--ws-full-page-utils-btn--inset, 0);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.ws-full-page-utils-position-btn.pf-m-clicked {
|
|
114
|
+
--pf-v6-c-button__icon--Color: var(--pf-t--global--text--color--regular);
|
|
115
|
+
}
|
|
116
|
+
|
|
81
117
|
.ws-full-page-utils::before {
|
|
82
118
|
position: absolute;
|
|
83
119
|
inset: 0;
|
|
@@ -34,6 +34,15 @@ import missingThumbnail from './missing-thumbnail.jpg';
|
|
|
34
34
|
import { RtlContext } from '../../layouts';
|
|
35
35
|
import { ThemeSelector } from '../themeSelector/themeSelector';
|
|
36
36
|
|
|
37
|
+
import RhUiArrowCircleDownRightIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-arrow-circle-down-right-icon';
|
|
38
|
+
import RhUiArrowCircleDownLeftIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-arrow-circle-down-left-icon';
|
|
39
|
+
import RhUiArrowCircleUpRightIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-arrow-circle-up-right-icon';
|
|
40
|
+
import RhUiArrowCircleUpLeftIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-arrow-circle-up-left-icon';
|
|
41
|
+
import RhUiArrowCircleDownRightFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-arrow-circle-down-right-fill-icon';
|
|
42
|
+
import RhUiArrowCircleDownLeftFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-arrow-circle-down-left-fill-icon';
|
|
43
|
+
import RhUiArrowCircleUpRightFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-arrow-circle-up-right-fill-icon';
|
|
44
|
+
import RhUiArrowCircleUpLeftFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-arrow-circle-up-left-fill-icon';
|
|
45
|
+
|
|
37
46
|
const errorComponent = (err) => <pre>{err.toString()}</pre>;
|
|
38
47
|
|
|
39
48
|
class ErrorBoundary extends React.Component {
|
|
@@ -137,8 +146,22 @@ export const Example = ({
|
|
|
137
146
|
}
|
|
138
147
|
|
|
139
148
|
const [editorCode, setEditorCode] = React.useState(code);
|
|
149
|
+
const isBrowser = typeof window !== 'undefined' && window.localStorage;
|
|
150
|
+
const [fullPageUtilsPosition, setFullPageUtilsPosition] = React.useState(() => {
|
|
151
|
+
if (isBrowser) {
|
|
152
|
+
return localStorage.getItem('fullPageUtilsPosition') || 'pf-m-bottom-left';
|
|
153
|
+
}
|
|
154
|
+
return 'pf-m-bottom-left';
|
|
155
|
+
});
|
|
140
156
|
const loc = useLocation();
|
|
141
157
|
const isRTL = useContext(RtlContext);
|
|
158
|
+
|
|
159
|
+
// Save fullPageUtilsPosition to localStorage when it changes
|
|
160
|
+
useEffect(() => {
|
|
161
|
+
if (isBrowser) {
|
|
162
|
+
localStorage.setItem('fullPageUtilsPosition', fullPageUtilsPosition);
|
|
163
|
+
}
|
|
164
|
+
}, [fullPageUtilsPosition]);
|
|
142
165
|
const scope = {
|
|
143
166
|
...liveContext,
|
|
144
167
|
// These 2 are in the bundle anyways for the site since we dogfood
|
|
@@ -186,15 +209,51 @@ export const Example = ({
|
|
|
186
209
|
const previewId = getExampleId(source, section[0], id, title);
|
|
187
210
|
const className = getExampleClassName(source, section[0], id);
|
|
188
211
|
|
|
212
|
+
// Four corner position button props
|
|
213
|
+
const fullPageUtilsPositionProps = {
|
|
214
|
+
topLeft: {
|
|
215
|
+
className: 'pf-m-top-left',
|
|
216
|
+
label: 'Move to the top left corner',
|
|
217
|
+
tooltipPosition: 'bottom-start',
|
|
218
|
+
icon: <RhUiArrowCircleUpLeftIcon />,
|
|
219
|
+
iconClicked: <RhUiArrowCircleUpLeftFillIcon />
|
|
220
|
+
},
|
|
221
|
+
topRight: {
|
|
222
|
+
className: 'pf-m-top-right',
|
|
223
|
+
label: 'Move to the top right corner',
|
|
224
|
+
tooltipPosition: 'bottom-end',
|
|
225
|
+
icon: <RhUiArrowCircleUpRightIcon />,
|
|
226
|
+
iconClicked: <RhUiArrowCircleUpRightFillIcon />
|
|
227
|
+
},
|
|
228
|
+
bottomLeft: {
|
|
229
|
+
className: 'pf-m-bottom-left',
|
|
230
|
+
label: 'Move to the bottom left corner',
|
|
231
|
+
tooltipPosition: 'top-start',
|
|
232
|
+
icon: <RhUiArrowCircleDownLeftIcon />,
|
|
233
|
+
iconClicked: <RhUiArrowCircleDownLeftFillIcon />
|
|
234
|
+
},
|
|
235
|
+
bottomRight: {
|
|
236
|
+
className: 'pf-m-bottom-right',
|
|
237
|
+
label: 'Move to the bottom right corner',
|
|
238
|
+
tooltipPosition: 'top-end',
|
|
239
|
+
icon: <RhUiArrowCircleDownRightIcon />,
|
|
240
|
+
iconClicked: <RhUiArrowCircleDownRightFillIcon />
|
|
241
|
+
}
|
|
242
|
+
};
|
|
243
|
+
|
|
189
244
|
if (isFullscreenPreview) {
|
|
245
|
+
const activeFullPageUtilsTooltipPosition = Object.values(fullPageUtilsPositionProps).find(
|
|
246
|
+
(props) => props.className === fullPageUtilsPosition
|
|
247
|
+
)?.tooltipPosition;
|
|
248
|
+
|
|
190
249
|
return (
|
|
191
250
|
<div id={previewId} className={css(className, 'pf-v6-u-h-100')}>
|
|
192
251
|
{livePreview}
|
|
193
252
|
{(hasThemeSwitcher || hasRTLSwitcher) && (
|
|
194
253
|
<Flex
|
|
195
254
|
direction={{ default: 'column' }}
|
|
196
|
-
gap={{ default: '
|
|
197
|
-
className=
|
|
255
|
+
gap={{ default: 'gapSm' }}
|
|
256
|
+
className={css('ws-full-page-utils', 'pf-v6-m-dir-ltr', fullPageUtilsPosition)}
|
|
198
257
|
>
|
|
199
258
|
{hasThemeSwitcher && <ThemeSelector id="ws-example-theme-select" />}
|
|
200
259
|
{hasRTLSwitcher && (
|
|
@@ -209,6 +268,27 @@ export const Example = ({
|
|
|
209
268
|
}}
|
|
210
269
|
/>
|
|
211
270
|
)}
|
|
271
|
+
{/* Four corner position buttons */}
|
|
272
|
+
{Object.entries(fullPageUtilsPositionProps).map(([key, utilsProps]) => (
|
|
273
|
+
<Tooltip
|
|
274
|
+
key={key}
|
|
275
|
+
content={utilsProps.label}
|
|
276
|
+
position={activeFullPageUtilsTooltipPosition || utilsProps.tooltipPosition}
|
|
277
|
+
enableFlip={false}
|
|
278
|
+
aria="none"
|
|
279
|
+
aria-live="off"
|
|
280
|
+
>
|
|
281
|
+
<Button
|
|
282
|
+
variant="plain"
|
|
283
|
+
size="sm"
|
|
284
|
+
className={css('ws-full-page-utils-position-btn', utilsProps.className)}
|
|
285
|
+
isClicked={fullPageUtilsPosition === utilsProps.className}
|
|
286
|
+
onClick={() => setFullPageUtilsPosition(utilsProps.className)}
|
|
287
|
+
aria-label={`${utilsProps.label}${fullPageUtilsPosition === utilsProps.className ? ', selected' : ''}`}
|
|
288
|
+
icon={fullPageUtilsPosition === utilsProps.className ? utilsProps.iconClicked : utilsProps.icon}
|
|
289
|
+
/>
|
|
290
|
+
</Tooltip>
|
|
291
|
+
))}
|
|
212
292
|
</Flex>
|
|
213
293
|
)}
|
|
214
294
|
</div>
|
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.
|
|
4
|
+
"version": "6.35.1",
|
|
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.341",
|
|
16
16
|
"@reach/router": "npm:@gatsbyjs/reach-router@1.3.9",
|
|
17
17
|
"@rspack/core": "^1.5.6",
|
|
18
18
|
"@rspack/dev-server": "^1.1.4",
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
"@patternfly/patternfly": "^6.5.0-prerelease.33",
|
|
72
72
|
"@patternfly/react-code-editor": "^6.5.0-prerelease.26",
|
|
73
73
|
"@patternfly/react-core": "^6.5.0-prerelease.24",
|
|
74
|
+
"@patternfly/react-icons": "^6.5.0-prerelease.11",
|
|
74
75
|
"@patternfly/react-table": "^6.5.0-prerelease.24",
|
|
75
76
|
"react": "^17.0.0 || ^18.0.0",
|
|
76
77
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
@@ -91,5 +92,5 @@
|
|
|
91
92
|
"http-cache-semantics": ">=4.1.1",
|
|
92
93
|
"nanoid": "3.3.8"
|
|
93
94
|
},
|
|
94
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "89b2ca9cc6eb24548ce7baaf58b4a2fe25a547c3"
|
|
95
96
|
}
|