@patternfly/documentation-framework 6.51.7 → 6.51.9

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,22 @@
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.51.9 (2026-09-02)
7
+
8
+ **Note:** Version bump only for package @patternfly/documentation-framework
9
+
10
+
11
+
12
+
13
+
14
+ ## 6.51.8 (2026-09-01)
15
+
16
+ **Note:** Version bump only for package @patternfly/documentation-framework
17
+
18
+
19
+
20
+
21
+
6
22
  ## 6.51.7 (2026-08-13)
7
23
 
8
24
  **Note:** Version bump only for package @patternfly/documentation-framework
@@ -2,6 +2,10 @@
2
2
  --ws-code-editor--tooltip--MaxWidth: 16ch;
3
3
  }
4
4
 
5
+ .ws-heading.ws-example-heading {
6
+ margin-block-end: -0.5rem;
7
+ }
8
+
5
9
  .ws-code-editor:not(.ws-example-code-expanded) > .pf-v6-c-code-editor__header::before {
6
10
  --pf-v6-c-code-editor__header--before--BorderBottomWidth: 0;
7
11
  }
@@ -9,8 +9,7 @@ import {
9
9
  Label,
10
10
  Switch,
11
11
  Tooltip,
12
- Stack,
13
- StackItem,
12
+ Stack
14
13
  } from '@patternfly/react-core';
15
14
  import * as reactCoreModule from '@patternfly/react-core';
16
15
  import * as reactCoreNextModule from '@patternfly/react-core/next';
@@ -117,8 +116,6 @@ export const Example = ({
117
116
  // absolute url to hosted file
118
117
  sourceLink = ''
119
118
  }) => {
120
-
121
-
122
119
  if (isFullscreenPreview) {
123
120
  isFullscreen = false;
124
121
  }
@@ -284,7 +281,9 @@ export const Example = ({
284
281
  className={css('ws-full-page-utils-position-btn', utilsProps.className)}
285
282
  isClicked={fullPageUtilsPosition === utilsProps.className}
286
283
  onClick={() => setFullPageUtilsPosition(utilsProps.className)}
287
- aria-label={`${utilsProps.label}${fullPageUtilsPosition === utilsProps.className ? ', selected' : ''}`}
284
+ aria-label={`${utilsProps.label}${
285
+ fullPageUtilsPosition === utilsProps.className ? ', selected' : ''
286
+ }`}
288
287
  icon={fullPageUtilsPosition === utilsProps.className ? utilsProps.iconClicked : utilsProps.icon}
289
288
  />
290
289
  </Tooltip>
@@ -303,7 +302,7 @@ export const Example = ({
303
302
  const fullscreenLink = (() => {
304
303
  const cleanPathname = loc.pathname.replace(/\/$/, '');
305
304
  const sourcePath = `/${source}`;
306
-
305
+
307
306
  // Check if the source is already at the end of the pathname to avoid duplication
308
307
  // Using endsWith instead of includes to prevent false positives (e.g., /react-console matching /react)
309
308
  if (cleanPathname.endsWith(sourcePath)) {
@@ -348,19 +347,19 @@ export const Example = ({
348
347
  const metaText = hasMetaText && tooltips;
349
348
 
350
349
  const thumbnailDimensions = {
351
- width: "800",
352
- height: "450"
353
- }
350
+ width: '800',
351
+ height: '450'
352
+ };
354
353
 
355
354
  return (
356
355
  <Stack hasGutter>
357
- <StackItem>
358
- <AutoLinkHeader metaText={metaText} headingLevel="h3">
356
+ <Stack hasGutter>
357
+ <AutoLinkHeader metaText={metaText} headingLevel="h3" className="ws-example-heading">
359
358
  {title}
360
359
  </AutoLinkHeader>
361
360
  {children}
362
- </StackItem>
363
- <StackItem>
361
+ </Stack>
362
+ <Stack hasGutter>
364
363
  {isFullscreen ? (
365
364
  <div>
366
365
  <a
@@ -369,7 +368,12 @@ export const Example = ({
369
368
  target="_blank"
370
369
  aria-label={`Open fullscreen ${title} example`}
371
370
  >
372
- <img src={thumbnail} width={thumbnailDimensions.width} height={thumbnailDimensions.height} alt={`${title} screenshot`} />
371
+ <img
372
+ src={thumbnail}
373
+ width={thumbnailDimensions.width}
374
+ height={thumbnailDimensions.height}
375
+ alt={`${title} screenshot`}
376
+ />
373
377
  </a>
374
378
  </div>
375
379
  ) : (
@@ -377,8 +381,8 @@ export const Example = ({
377
381
  {livePreview}
378
382
  </div>
379
383
  )}
380
- </StackItem>
381
- <StackItem>
384
+ </Stack>
385
+ <Stack hasGutter>
382
386
  <ExampleToolbar
383
387
  lang={lang}
384
388
  isFullscreen={isFullscreen}
@@ -389,7 +393,7 @@ export const Example = ({
389
393
  codeBoxParams={codeBoxParams}
390
394
  exampleTitle={title}
391
395
  />
392
- </StackItem>
396
+ </Stack>
393
397
  </Stack>
394
398
  );
395
399
  };
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.51.7",
4
+ "version": "6.51.9",
5
5
  "author": "Red Hat",
6
6
  "license": "MIT",
7
7
  "bin": {
@@ -92,5 +92,5 @@
92
92
  "http-cache-semantics": ">=4.1.1",
93
93
  "nanoid": "3.3.8"
94
94
  },
95
- "gitHead": "99ed097b432edeb050484dec6ee06f5bc853ec5d"
95
+ "gitHead": "a7c4848bb32a4d315b93cb82f5769a2795e69612"
96
96
  }
package/templates/mdx.css CHANGED
@@ -1,9 +1,15 @@
1
1
  @import './content-sources/ai-guidelines.css';
2
2
 
3
- p.pf-v6-c-content--p.ws-p {
3
+ /* Stack gutter already spaces direct children; don't also use paragraph margins. */
4
+ .pf-v6-l-stack.pf-m-gutter > p.pf-v6-c-content--p.ws-p {
4
5
  margin: 0;
5
6
  }
6
7
 
8
+ /* Stack gutter provides spacing before template section headings. */
9
+ .ws-example-page-wrapper.pf-m-gutter .ws-stack-section-heading {
10
+ margin-block-start: 0;
11
+ }
12
+
7
13
  .ws-code {
8
14
  display: inline-block;
9
15
  background-color: var(--pf-t--global--background--color--secondary--default);
@@ -30,4 +36,5 @@ p.pf-v6-c-content--p.ws-p {
30
36
  max-width: min(100%, 1200px);
31
37
  flex-grow: 1;
32
38
  min-width: 0;
39
+ gap: 2.5rem;
33
40
  }
package/templates/mdx.js CHANGED
@@ -87,8 +87,6 @@ const MDXChildTemplate = ({ Component, source, toc = [], index = 0, id }) => {
87
87
  ensureID(toc);
88
88
  }
89
89
 
90
- const isComponentCodeDocs = ['react', 'react-demos', 'html', 'html-demos', 'react-templates'].includes(source);
91
-
92
90
  const InlineAlerts = (optIn ||
93
91
  beta ||
94
92
  deprecated ||
@@ -134,14 +132,17 @@ const MDXChildTemplate = ({ Component, source, toc = [], index = 0, id }) => {
134
132
  );
135
133
  // Create dynamic component for @reach/router
136
134
  const ChildComponent = () => (
137
- <div className={source !== 'landing-pages' ? 'pf-v6-l-flex pf-v6-m-column pf-m-nowrap-on-2xl' : ''} data-content-source={source}>
135
+ <div
136
+ className={source !== 'landing-pages' ? 'pf-v6-l-flex pf-v6-m-column pf-m-nowrap-on-2xl' : ''}
137
+ data-content-source={source}
138
+ >
138
139
  {toc.length > 1 && <TableOfContents items={toc} />}
139
- <Stack hasGutter className={(source !== 'landing-pages' && 'ws-example-page-wrapper')}>
140
+ <Stack hasGutter className={source !== 'landing-pages' && 'ws-example-page-wrapper'}>
140
141
  {InlineAlerts}
141
142
  {source !== 'css-variables' && <Component />}
142
143
  {source !== 'css-variables' && functionDocumentation.length > 0 && (
143
144
  <StackItem>
144
- <AutoLinkHeader headingLevel="h2" className="pf-v6-c-content--h2" id="functions">
145
+ <AutoLinkHeader headingLevel="h2" className="pf-v6-c-content--h2 ws-stack-section-heading" id="functions">
145
146
  Functions
146
147
  </AutoLinkHeader>
147
148
  <FunctionsTable functionDescriptions={functionDocumentation} />
@@ -149,7 +150,7 @@ const MDXChildTemplate = ({ Component, source, toc = [], index = 0, id }) => {
149
150
  )}
150
151
  {source !== 'css-variables' && propsTitle && (
151
152
  <StackItem>
152
- <AutoLinkHeader headingLevel="h2" className="pf-v6-c-content--h2" id="props">
153
+ <AutoLinkHeader headingLevel="h2" className="pf-v6-c-content--h2 ws-stack-section-heading" id="props">
153
154
  {propsTitle}
154
155
  </AutoLinkHeader>
155
156
  {propComponents.map((component) => (
@@ -165,7 +166,7 @@ const MDXChildTemplate = ({ Component, source, toc = [], index = 0, id }) => {
165
166
  )}
166
167
  {source === 'css-variables' && cssPrefix.length > 0 && (
167
168
  <StackItem>
168
- <AutoLinkHeader headingLevel="h2" className="pf-v6-c-content--h2" id="css-variables">
169
+ <AutoLinkHeader headingLevel="h2" className="pf-v6-c-content--h2 ws-stack-section-heading" id="css-variables">
169
170
  {cssVarsTitle}
170
171
  </AutoLinkHeader>
171
172
  {cssPrefix.map((prefix, index) => (