@patternfly/documentation-framework 6.0.16 → 6.1.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,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.1.0 (2024-12-09)
7
+
8
+
9
+ ### Features
10
+
11
+ * **ver:** update to 6.1 prerelease versions ([#4405](https://github.com/patternfly/patternfly-org/issues/4405)) ([8f9dd5e](https://github.com/patternfly/patternfly-org/commit/8f9dd5edc4c907f5b170e24a1d99d66a79c5eca5))
12
+
13
+
14
+
15
+
16
+
17
+ ## 6.0.17 (2024-12-09)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * packages/documentation-framework/package.json to reduce vulnerabilities ([#4406](https://github.com/patternfly/patternfly-org/issues/4406)) ([4629e41](https://github.com/patternfly/patternfly-org/commit/4629e41a3446cb9c99b4c671ea4d44bf9fb7f219))
23
+
24
+
25
+
26
+
27
+
6
28
  ## 6.0.16 (2024-12-04)
7
29
 
8
30
  **Note:** Version bump only for package @patternfly/documentation-framework
@@ -154,7 +154,7 @@ export const Footer = ({ isDarkTheme }) => (
154
154
  <ListItem className="ws-org-pfsite-footer-menu-list-item">
155
155
  <Link
156
156
  className="ws-org-pfsite-footer-menu-link"
157
- to="https://github.com/patternfly/patternfly/blob/main/CODE_OF_CONDUCT.md"
157
+ to="https://calendar.google.com/calendar/embed?src=patternflyteam%40gmail.com&ctz=America%2FNew_York"
158
158
  aria-label="Join PatternFly meetings"
159
159
  >
160
160
  Calendar
@@ -8,7 +8,7 @@ import {
8
8
  PageContextConsumer,
9
9
  capitalize,
10
10
  Flex,
11
- FlexItem,
11
+ FlexItem
12
12
  } from '@patternfly/react-core';
13
13
  import { css } from '@patternfly/react-styles';
14
14
  import { Location } from '@reach/router';
@@ -24,8 +24,7 @@ const getIsActive = (location, section, subsection = null) => {
24
24
  const defaultValue = 50;
25
25
 
26
26
  const NavItem = ({ text, href, isDeprecated, isBeta, isDemo }) => {
27
- const isMobileView =
28
- window.innerWidth < Number.parseInt(globalBreakpointXl.value, 10);
27
+ const isMobileView = window.innerWidth < Number.parseInt(globalBreakpointXl.value, 10);
29
28
  return (
30
29
  <PageContextConsumer key={href + text}>
31
30
  {({ onSidebarToggle, isSidebarOpen }) => (
@@ -39,11 +38,7 @@ const NavItem = ({ text, href, isDeprecated, isBeta, isDemo }) => {
39
38
  getProps={({ isCurrent, href, location }) => {
40
39
  const { pathname } = location;
41
40
  return {
42
- className: css(
43
- 'pf-v6-c-nav__link',
44
- (isCurrent || pathname.startsWith(href + '/')) &&
45
- 'pf-m-current'
46
- ),
41
+ className: css('pf-v6-c-nav__link', (isCurrent || pathname.startsWith(href + '/')) && 'pf-m-current')
47
42
  };
48
43
  }}
49
44
  tabIndex={isSidebarOpen ? undefined : -1}
@@ -77,17 +72,10 @@ const NavItem = ({ text, href, isDeprecated, isBeta, isDemo }) => {
77
72
  );
78
73
  };
79
74
 
80
- const ExpandableNav = ({
81
- groupedRoutes,
82
- location,
83
- section,
84
- subsection = null,
85
- }) => {
75
+ const ExpandableNav = ({ groupedRoutes, location, section, subsection = null }) => {
86
76
  const isActive = getIsActive(location, section, subsection);
87
77
  const isSubsection = subsection;
88
- const routes = isSubsection
89
- ? groupedRoutes[section][subsection]
90
- : groupedRoutes[section];
78
+ const routes = isSubsection ? groupedRoutes[section][subsection] : groupedRoutes[section];
91
79
  const currentSection = isSubsection ? subsection : section;
92
80
  const analyticsName = isSubsection ? `${section}/${subsection}` : section;
93
81
 
@@ -102,59 +90,39 @@ const ExpandableNav = ({
102
90
  event.stopPropagation();
103
91
  // Don't trigger for bubbled events from NavItems
104
92
  if (!event.target.href) {
105
- const isExpanded =
106
- event.currentTarget.classList.contains('pf-m-expanded');
93
+ const isExpanded = event.currentTarget.classList.contains('pf-m-expanded');
107
94
  // 1 === expand section, 0 === collapse section
108
- trackEvent(
109
- 'sidenav_section_click',
110
- 'click_event',
111
- analyticsName,
112
- isExpanded ? 0 : 1
113
- );
95
+ trackEvent('sidenav_section_click', 'click_event', analyticsName, isExpanded ? 0 : 1);
114
96
  }
115
97
  }}
116
98
  >
117
99
  {Object.entries(routes || {})
118
- .filter(
119
- ([id, navObj]) =>
120
- !Boolean(navObj.hideNavItem) && Object.entries(navObj).length > 0
121
- )
100
+ .filter(([id, navObj]) => !Boolean(navObj.hideNavItem) && Object.entries(navObj).length > 0)
122
101
  .map(
123
102
  ([
124
103
  id,
125
- {
126
- slug,
127
- isSubsection = false,
128
- sortValue = defaultValue,
129
- subsectionSortValue = defaultValue,
130
- sources,
131
- },
104
+ { slug, isSubsection = false, sortValue = defaultValue, subsectionSortValue = defaultValue, sources }
132
105
  ]) => ({
133
106
  text: id,
134
107
  href: slug,
135
108
  isSubsection,
136
109
  sortValue: isSubsection ? subsectionSortValue : sortValue,
137
- sources,
110
+ sources
138
111
  })
139
112
  )
140
- .sort(
141
- (
142
- { text: text1, sortValue: sortValue1 },
143
- { text: text2, sortValue: sortValue2 }
144
- ) => {
145
- if (sortValue1 === sortValue2) {
146
- return text1.localeCompare(text2);
147
- }
148
- return sortValue1 > sortValue2 ? 1 : -1;
113
+ .sort(({ text: text1, sortValue: sortValue1 }, { text: text2, sortValue: sortValue2 }) => {
114
+ if (sortValue1 === sortValue2) {
115
+ return text1.localeCompare(text2);
149
116
  }
150
- )
117
+ return sortValue1 > sortValue2 ? 1 : -1;
118
+ })
151
119
  .map((navObj) => {
152
120
  return navObj.isSubsection
153
121
  ? ExpandableNav({
154
122
  groupedRoutes,
155
123
  location,
156
124
  section,
157
- subsection: navObj.text,
125
+ subsection: navObj.text
158
126
  })
159
127
  : NavItem({
160
128
  ...navObj,
@@ -162,32 +130,17 @@ const ExpandableNav = ({
162
130
  navObj.href?.includes('components') &&
163
131
  navObj.sources.some(
164
132
  (source) =>
165
- (source.source === 'react-deprecated' ||
166
- source.source === 'html-deprecated') &&
167
- // TODO: remove hardcoded Tile when Core PR merges
168
- // https://github.com/patternfly/patternfly/pull/7178
169
- (source.id === 'Tile' ||
170
- !navObj.sources.some(
171
- (source) =>
172
- source.source === 'react' ||
173
- source.source === 'html'
174
- ))
133
+ (source.source === 'react-deprecated' || source.source === 'html-deprecated') &&
134
+ !navObj.sources.some((source) => source.source === 'react' || source.source === 'html')
175
135
  ),
176
136
  isBeta: navObj.sources.some(
177
- (source) =>
178
- source.beta &&
179
- source.source !== 'react-next' &&
180
- source.source !== 'react-templates'
137
+ (source) => source.beta && source.source !== 'react-next' && source.source !== 'react-templates'
181
138
  ),
182
139
  isDemo: navObj.sources.some(
183
140
  (source) =>
184
- (source.source === 'react-demos' ||
185
- source.source === 'html-demos') &&
186
- !navObj.sources.some(
187
- (source) =>
188
- source.source === 'react' || source.source === 'html'
189
- )
190
- ),
141
+ (source.source === 'react-demos' || source.source === 'html-demos') &&
142
+ !navObj.sources.some((source) => source.source === 'react' || source.source === 'html')
143
+ )
191
144
  });
192
145
  })}
193
146
  </NavExpandable>
@@ -203,8 +156,7 @@ export const SideNav = ({ groupedRoutes = {}, navItems = [] }) => {
203
156
  if (!overflowElement) {
204
157
  return;
205
158
  }
206
- const activeElements =
207
- overflowElement.getElementsByClassName('pf-m-current');
159
+ const activeElements = overflowElement.getElementsByClassName('pf-m-current');
208
160
  if (activeElements.length > 0) {
209
161
  const lastElement = activeElements[activeElements.length - 1];
210
162
  lastElement.scrollIntoView({ block: 'center' });
@@ -216,16 +168,11 @@ export const SideNav = ({ groupedRoutes = {}, navItems = [] }) => {
216
168
  <NavList className="ws-side-nav-list">
217
169
  {navItems.map(({ section, text, href }) =>
218
170
  section ? (
219
- <Location key={section}>
220
- {({ location }) =>
221
- ExpandableNav({ groupedRoutes, location, section })
222
- }
223
- </Location>
171
+ <Location key={section}>{({ location }) => ExpandableNav({ groupedRoutes, location, section })}</Location>
224
172
  ) : (
225
173
  NavItem({
226
- text:
227
- text || capitalize(href.replace(/\//g, '').replace(/-/g, ' ')),
228
- href: href,
174
+ text: text || capitalize(href.replace(/\//g, '').replace(/-/g, ' ')),
175
+ href: href
229
176
  })
230
177
  )
231
178
  )}
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.0.16",
4
+ "version": "6.1.0",
5
5
  "author": "Red Hat",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -13,7 +13,7 @@
13
13
  "@babel/preset-env": "^7.24.3",
14
14
  "@babel/preset-react": "^7.24.1",
15
15
  "@mdx-js/util": "1.6.16",
16
- "@patternfly/ast-helpers": "^1.4.0-alpha.132",
16
+ "@patternfly/ast-helpers": "^1.4.0-alpha.134",
17
17
  "@reach/router": "npm:@gatsbyjs/reach-router@1.3.9",
18
18
  "autoprefixer": "9.8.6",
19
19
  "babel-loader": "^9.1.3",
@@ -25,7 +25,7 @@
25
25
  "copy-webpack-plugin": "11.0.0",
26
26
  "css-loader": "6.7.3",
27
27
  "detab": "2.0.3",
28
- "express": "4.21.0",
28
+ "express": "4.21.2",
29
29
  "file-loader": "6.2.0",
30
30
  "file-saver": "1.3.8",
31
31
  "fs-extra": "9.0.1",
@@ -73,12 +73,12 @@
73
73
  "webpack-merge": "5.8.0"
74
74
  },
75
75
  "peerDependencies": {
76
- "@patternfly/patternfly": "^6.1.0-prerelease.2",
77
- "@patternfly/react-code-editor": "^6.0.0",
78
- "@patternfly/react-core": "^6.1.0-prerelease.2",
79
- "@patternfly/react-table": "^6.0.0",
76
+ "@patternfly/patternfly": "^6.1.0-prerelease.11",
77
+ "@patternfly/react-code-editor": "^6.1.0-prerelease.14",
78
+ "@patternfly/react-core": "^6.1.0-prerelease.14",
79
+ "@patternfly/react-table": "^6.1.0-prerelease.14",
80
80
  "react": "^17.0.0 || ^18.0.0",
81
81
  "react-dom": "^17.0.0 || ^18.0.0"
82
82
  },
83
- "gitHead": "6493439f89d03c8f33e7a5d14574582dde5a7b7b"
83
+ "gitHead": "e74707512d007deed2e1c5e65725a29f39f9c06f"
84
84
  }
package/templates/mdx.js CHANGED
@@ -13,19 +13,12 @@ import {
13
13
  Content,
14
14
  Label,
15
15
  Stack,
16
- StackItem,
16
+ StackItem
17
17
  } from '@patternfly/react-core';
18
18
  import { css } from '@patternfly/react-styles';
19
19
  import ExternalLinkAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon';
20
20
  import { Router, useLocation } from '@reach/router';
21
- import {
22
- CSSVariables,
23
- PropsTable,
24
- TableOfContents,
25
- Link,
26
- AutoLinkHeader,
27
- InlineAlert,
28
- } from '../components';
21
+ import { CSSVariables, PropsTable, TableOfContents, Link, AutoLinkHeader, InlineAlert } from '../components';
29
22
  import { capitalize, getTitle, slugger, trackEvent } from '../helpers';
30
23
  import './mdx.css';
31
24
  import { convertToReactComponent } from '@patternfly/ast-helpers';
@@ -41,22 +34,18 @@ const MDXChildTemplate = ({ Component, source, toc = [], index = 0, id }) => {
41
34
  deprecated,
42
35
  template,
43
36
  newImplementationLink,
44
- functionDocumentation = [],
37
+ functionDocumentation = []
45
38
  } = Component.getPageData();
46
39
  const cssVarsTitle = cssPrefix.length > 0 && 'CSS variables';
47
40
  const propsTitle = propComponents.length > 0 && 'Props';
48
41
  if (propsTitle && !toc.find((item) => item.text === propsTitle)) {
49
42
  toc.push({ text: propsTitle });
50
- toc.push(
51
- propComponents.map((propComponent) => ({ text: propComponent.name }))
52
- );
43
+ toc.push(propComponents.map((propComponent) => ({ text: propComponent.name })));
53
44
  }
54
45
  if (cssVarsTitle && !toc.find((item) => item.text === cssVarsTitle)) {
55
46
  toc.push({ text: cssVarsTitle });
56
47
  if (cssPrefix.length > 1) {
57
- toc.push(
58
- cssPrefix.map((cssPrefix) => ({ text: `Prefixed with '${cssPrefix}'` }))
59
- );
48
+ toc.push(cssPrefix.map((cssPrefix) => ({ text: `Prefixed with '${cssPrefix}'` })));
60
49
  }
61
50
  }
62
51
  // We don't add `id`s in anchor-header.js for items where id === slugger(text)
@@ -72,73 +61,42 @@ const MDXChildTemplate = ({ Component, source, toc = [], index = 0, id }) => {
72
61
  ensureID(toc);
73
62
  }
74
63
 
75
- const isComponentCodeDocs = [
76
- 'react',
77
- 'react-demos',
78
- 'html',
79
- 'html-demos',
80
- 'react-templates',
81
- ].includes(source);
64
+ const isComponentCodeDocs = ['react', 'react-demos', 'html', 'html-demos', 'react-templates'].includes(source);
82
65
 
83
66
  const InlineAlerts = (optIn ||
84
67
  beta ||
85
68
  deprecated ||
86
69
  source === 'react-deprecated' ||
87
70
  source === 'html-deprecated' ||
88
- // TODO: remove hardcoded Tile when Core PR merges
89
- // https://github.com/patternfly/patternfly/pull/7178
90
- id === 'Tile' ||
91
71
  template ||
92
72
  source === 'react-template') && (
93
73
  <StackItem>
94
74
  {optIn && <InlineAlert title="Opt-in feature">{optIn}</InlineAlert>}
95
75
  {beta && (
96
76
  <InlineAlert title="Beta feature">
97
- This beta component is currently under review and is still open for
98
- further evolution. It is available for use in product. Beta components
99
- are considered for promotion on a quarterly basis. Please join in and
100
- give us your feedback or submit any questions on the{' '}
101
- <a href="https://forum.patternfly.org/">PatternFly forum</a> or via{' '}
102
- <a
103
- href="//slack.patternfly.org/"
104
- target="_blank"
105
- rel="noopener noreferrer"
106
- >
77
+ This beta component is currently under review and is still open for further evolution. It is available for use
78
+ in product. Beta components are considered for promotion on a quarterly basis. Please join in and give us your
79
+ feedback or submit any questions on the <a href="https://forum.patternfly.org/">PatternFly forum</a> or via{' '}
80
+ <a href="//slack.patternfly.org/" target="_blank" rel="noopener noreferrer">
107
81
  Slack
108
82
  </a>
109
83
  . To learn more about the process, visit our{' '}
110
- <Link to="/get-started/about-patternfly#beta-components">
111
- about page
112
- </Link>{' '}
113
- or our{' '}
114
- <a href="https://github.com/patternfly/patternfly-org/tree/main/beta-component-promotion">
115
- Beta components
116
- </a>{' '}
84
+ <Link to="/get-started/about-patternfly#beta-components">about page</Link> or our{' '}
85
+ <a href="https://github.com/patternfly/patternfly-org/tree/main/beta-component-promotion">Beta components</a>{' '}
117
86
  page on GitHub.
118
87
  </InlineAlert>
119
88
  )}
120
- {(deprecated ||
121
- source === 'react-deprecated' ||
122
- source === 'html-deprecated' ||
123
- // TODO: remove hardcoded Tile when Core PR merges
124
- // https://github.com/patternfly/patternfly/pull/7178
125
- id === 'Tile') && (
89
+ {(deprecated || source === 'react-deprecated' || source === 'html-deprecated') && (
126
90
  <InlineAlert title="Deprecated feature" variant="warning">
127
- This component implementation has been deprecated in favor of a newer
128
- solution, and is no longer being maintained or enhanced.
91
+ This component implementation has been deprecated in favor of a newer solution, and is no longer being
92
+ maintained or enhanced.
129
93
  {newImplementationLink && (
130
94
  <React.Fragment>
131
- You can find the{' '}
132
- <Link to={newImplementationLink}>
133
- updated implementation here
134
- </Link>
135
- .
95
+ You can find the <Link to={newImplementationLink}>updated implementation here</Link>.
136
96
  </React.Fragment>
137
97
  )}{' '}
138
98
  To learn more about deprecated components, visit{' '}
139
- <Link to="/get-started/about-patternfly#deprecated-components">
140
- about PatternFly.
141
- </Link>
99
+ <Link to="/get-started/about-patternfly#deprecated-components">about PatternFly.</Link>
142
100
  </InlineAlert>
143
101
  )}
144
102
  {(template || source === 'react-template') && (
@@ -152,19 +110,12 @@ const MDXChildTemplate = ({ Component, source, toc = [], index = 0, id }) => {
152
110
  const ChildComponent = () => (
153
111
  <div className={source !== 'landing-pages' ? 'pf-v6-l-flex' : ''}>
154
112
  {toc.length > 1 && <TableOfContents items={toc} />}
155
- <Stack
156
- hasGutter
157
- style={{ ...(source !== 'landing-pages' && { maxWidth: '825px' }) }}
158
- >
113
+ <Stack hasGutter style={{ ...(source !== 'landing-pages' && { maxWidth: '825px' }) }}>
159
114
  {InlineAlerts}
160
115
  <Component />
161
116
  {functionDocumentation.length > 0 && (
162
117
  <StackItem>
163
- <AutoLinkHeader
164
- headingLevel="h2"
165
- className="pf-v6-c-content--h2"
166
- id="functions"
167
- >
118
+ <AutoLinkHeader headingLevel="h2" className="pf-v6-c-content--h2" id="functions">
168
119
  Functions
169
120
  </AutoLinkHeader>
170
121
  <FunctionsTable functionDescriptions={functionDocumentation} />
@@ -172,11 +123,7 @@ const MDXChildTemplate = ({ Component, source, toc = [], index = 0, id }) => {
172
123
  )}
173
124
  {propsTitle && (
174
125
  <StackItem>
175
- <AutoLinkHeader
176
- headingLevel="h2"
177
- className="pf-v6-c-content--h2"
178
- id="props"
179
- >
126
+ <AutoLinkHeader headingLevel="h2" className="pf-v6-c-content--h2" id="props">
180
127
  {propsTitle}
181
128
  </AutoLinkHeader>
182
129
  {propComponents.map((component) => (
@@ -192,19 +139,11 @@ const MDXChildTemplate = ({ Component, source, toc = [], index = 0, id }) => {
192
139
  )}
193
140
  {cssPrefix.length > 0 && (
194
141
  <StackItem>
195
- <AutoLinkHeader
196
- headingLevel="h2"
197
- className="pf-v6-c-content--h2"
198
- id="css-variables"
199
- >
142
+ <AutoLinkHeader headingLevel="h2" className="pf-v6-c-content--h2" id="css-variables">
200
143
  {cssVarsTitle}
201
144
  </AutoLinkHeader>
202
145
  {cssPrefix.map((prefix, index) => (
203
- <CSSVariables
204
- key={index}
205
- autoLinkHeader={cssPrefix.length > 1}
206
- prefix={prefix}
207
- />
146
+ <CSSVariables key={index} autoLinkHeader={cssPrefix.length > 1} prefix={prefix} />
208
147
  ))}
209
148
  </StackItem>
210
149
  )}
@@ -214,13 +153,7 @@ const MDXChildTemplate = ({ Component, source, toc = [], index = 0, id }) => {
214
153
  <a
215
154
  href={sourceLink}
216
155
  target="_blank"
217
- onClick={() =>
218
- trackEvent(
219
- 'view_source_click',
220
- 'click_event',
221
- source.toUpperCase()
222
- )
223
- }
156
+ onClick={() => trackEvent('view_source_click', 'click_event', source.toUpperCase())}
224
157
  >
225
158
  Edit this page on GitHub
226
159
  </a>
@@ -233,56 +166,28 @@ const MDXChildTemplate = ({ Component, source, toc = [], index = 0, id }) => {
233
166
  return <ChildComponent key={source} path={source} default={index === 0} />;
234
167
  };
235
168
 
236
- export const MDXTemplate = ({
237
- title,
238
- sources = [],
239
- path,
240
- id,
241
- componentsData,
242
- }) => {
169
+ export const MDXTemplate = ({ title, sources = [], path, id, componentsData }) => {
243
170
  const isDeprecated =
244
- sources.some(
245
- (source) =>
246
- source.source === 'react-deprecated' ||
247
- source.source === 'html-deprecated'
248
- ) &&
249
- !sources.some(
250
- (source) => source.source === 'react' || source.source === 'html'
251
- );
171
+ sources.some((source) => source.source === 'react-deprecated' || source.source === 'html-deprecated') &&
172
+ !sources.some((source) => source.source === 'react' || source.source === 'html');
252
173
  const isBeta = sources.some(
253
- (source) =>
254
- source.beta &&
255
- source.source !== 'react-next' &&
256
- source.source !== 'react-templates'
174
+ (source) => source.beta && source.source !== 'react-next' && source.source !== 'react-templates'
257
175
  );
258
176
  const isDemo =
259
- sources.some(
260
- (source) =>
261
- source.source === 'react-demos' || source.source === 'html-demos'
262
- ) &&
263
- !sources.some(
264
- (source) => source.source === 'react' || source.source === 'html'
265
- );
177
+ sources.some((source) => source.source === 'react-demos' || source.source === 'html-demos') &&
178
+ !sources.some((source) => source.source === 'react' || source.source === 'html');
266
179
  // Build obj mapping source names to text displayed on tabs
267
180
  const tabNames = sources.reduce((acc, curSrc) => {
268
181
  const { source, tabName } = curSrc;
269
182
  // use tabName for tab name if present, otherwise default to source
270
- const tabLinkText =
271
- tabName || capitalize(source.replace('html', 'HTML').replace(/-/g, ' '));
183
+ const tabLinkText = tabName || capitalize(source.replace('html', 'HTML').replace(/-/g, ' '));
272
184
  acc[source] = tabLinkText;
273
185
  return acc;
274
186
  }, {});
275
187
  const sourceKeys = Object.keys(tabNames);
276
188
  const isSinglePage = sourceKeys.length === 1;
277
189
 
278
- let isDevResources,
279
- isComponent,
280
- isExtension,
281
- isChart,
282
- isPattern,
283
- isLayout,
284
- isUtility,
285
- isUpgrade;
190
+ let isDevResources, isComponent, isExtension, isChart, isPattern, isLayout, isUtility, isUpgrade;
286
191
 
287
192
  const getSection = () => {
288
193
  return sources.some((source) => {
@@ -318,9 +223,7 @@ export const MDXTemplate = ({
318
223
  };
319
224
 
320
225
  // hide tab if it doesn't include the strings below
321
- const hideTabName = sourceKeys.some(
322
- (e) => e.includes('pages') || e.includes('training')
323
- );
226
+ const hideTabName = sourceKeys.some((e) => e.includes('pages') || e.includes('training'));
324
227
  const { pathname } = useLocation();
325
228
  let activeSource = pathname.replace(/\/$/, '').split('/').pop();
326
229
  // get summary text, convert to JSX to display above tabs on component pages
@@ -354,17 +257,12 @@ export const MDXTemplate = ({
354
257
  return 'pf-m-light-100';
355
258
  };
356
259
 
357
- const showTabs =
358
- (!isSinglePage && !hideTabName) || isComponent || isUtility || isPattern;
260
+ const showTabs = (!isSinglePage && !hideTabName) || isComponent || isUtility || isPattern;
359
261
 
360
262
  return (
361
263
  <React.Fragment>
362
264
  <PageGroup>
363
- <PageSection
364
- className={getClassName()}
365
- variant={!isSinglePage ? PageSectionVariants.light : ''}
366
- isWidthLimited
367
- >
265
+ <PageSection className={getClassName()} variant={!isSinglePage ? PageSectionVariants.light : ''} isWidthLimited>
368
266
  <Content isEditorial>
369
267
  <Flex alignItems={{ default: 'alignItemsCenter' }}>
370
268
  <FlexItem>
@@ -408,33 +306,17 @@ export const MDXTemplate = ({
408
306
  </Content>
409
307
  </PageSection>
410
308
  {showTabs && (
411
- <PageSection
412
- id="ws-sticky-nav-tabs"
413
- stickyOnBreakpoint={{ default: 'top' }}
414
- type="tabs"
415
- >
309
+ <PageSection id="ws-sticky-nav-tabs" stickyOnBreakpoint={{ default: 'top' }} type="tabs">
416
310
  <div className="pf-v6-c-tabs pf-m-page-insets pf-m-no-border-bottom">
417
311
  <ul className="pf-v6-c-tabs__list">
418
312
  {sourceKeys.map((source, index) => (
419
313
  <li
420
314
  key={source}
421
- className={css(
422
- 'pf-v6-c-tabs__item',
423
- activeSource === source && 'pf-m-current'
424
- )}
315
+ className={css('pf-v6-c-tabs__item', activeSource === source && 'pf-m-current')}
425
316
  // Send clicked tab name for analytics
426
- onClick={() =>
427
- trackEvent(
428
- 'tab_click',
429
- 'click_event',
430
- source.toUpperCase()
431
- )
432
- }
317
+ onClick={() => trackEvent('tab_click', 'click_event', source.toUpperCase())}
433
318
  >
434
- <Link
435
- className="pf-v6-c-tabs__link"
436
- to={`${path}${index === 0 ? '' : '/' + source}`}
437
- >
319
+ <Link className="pf-v6-c-tabs__link" to={`${path}${index === 0 ? '' : '/' + source}`}>
438
320
  {tabNames[source]}
439
321
  </Link>
440
322
  </li>
@@ -456,10 +338,7 @@ export const MDXTemplate = ({
456
338
  </Router>
457
339
  )}
458
340
  </PageSection>
459
- <BackToTop
460
- className="ws-back-to-top"
461
- scrollableSelector="#ws-page-main"
462
- />
341
+ <BackToTop className="ws-back-to-top" scrollableSelector="#ws-page-main" />
463
342
  </PageGroup>
464
343
  </React.Fragment>
465
344
  );
package/versions.json CHANGED
@@ -1,9 +1,34 @@
1
1
  {
2
2
  "Releases": [
3
3
  {
4
+ "name": "6.1.0",
5
+ "date": "2024-12-5",
6
+ "latest": true,
7
+ "versions": {
8
+ "@patternfly/patternfly": "6.1.0-prerelease.11",
9
+ "@patternfly/react-catalog-view-extension": "6.0.0",
10
+ "@patternfly/react-charts": "8.1.0-prerelease.17",
11
+ "@patternfly/react-code-editor": "6.1.0-prerelease.14",
12
+ "@patternfly/react-component-groups": "6.1.0-prerelease.3",
13
+ "@patternfly/react-core": "6.1.0-prerelease.14",
14
+ "@patternfly/react-drag-drop": "6.1.0-prerelease.14",
15
+ "@patternfly/react-icons": "6.1.0-prerelease.6",
16
+ "@patternfly/react-log-viewer": "6.1.0-prerelease.1",
17
+ "@patternfly/react-styles": "6.1.0-prerelease.5",
18
+ "@patternfly/react-table": "6.1.0-prerelease.14",
19
+ "@patternfly/react-tokens": "6.1.0-prerelease.5",
20
+ "@patternfly/react-topology": "6.1.0-prerelease.3",
21
+ "@patternfly/react-user-feedback": "6.0.0",
22
+ "@patternfly/react-console": "6.0.0",
23
+ "@patternfly/quickstarts": "6.1.0-prerelease.6",
24
+ "@patternfly/react-virtualized-extension": "6.0.0",
25
+ "@patternfly/react-templates": "6.1.0-prerelease.14",
26
+ "@patternfly/chatbot": "2.1.0-prerelease.26"
27
+ }
28
+ },{
4
29
  "name": "6.0.0",
5
30
  "date": "2024-10-30",
6
- "latest": true,
31
+ "hidden": true,
7
32
  "versions": {
8
33
  "@patternfly/patternfly": "6.0.0",
9
34
  "@patternfly/react-catalog-view-extension": "6.0.0",