@patternfly/documentation-framework 6.0.0-alpha.16 → 6.0.0-alpha.18
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 +205 -0
- package/components/cssVariables/cssVariables.js +5 -5
- package/components/example/example.js +4 -4
- package/components/footer/footer.js +13 -13
- package/components/gdprBanner/gdprBanner.js +4 -4
- package/components/inlineAlert/inlineAlert.js +1 -1
- package/components/propsTable/propsTable.js +3 -3
- package/components/sectionGallery/sectionDataListLayout.js +3 -3
- package/components/sideNav/sideNav.js +1 -1
- package/layouts/sideNavLayout/sideNavLayout.js +14 -5
- package/package.json +7 -10
- package/routes.js +3 -1
- package/scripts/md/parseMD.js +2 -0
- package/scripts/webpack/webpack.base.config.js +0 -4
- package/scripts/writeScreenshots.js +1 -1
- package/templates/mdx.css +6 -1
- package/templates/mdx.js +7 -1
- package/versions.json +75 -1
- package/pages/global-css-variables.md +0 -109
- package/pages/img/component-variable-mapping.png +0 -0
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.0.0-alpha.18 (2024-03-29)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# 6.0.0-alpha.17 (2024-03-28)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
# 6.0.0-alpha.16 (2024-03-27)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
@@ -160,6 +176,195 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
160
176
|
|
|
161
177
|
* try a v6 release ([7d3150c](https://github.com/patternfly/patternfly-org/commit/7d3150c1195b013001720d1e5161cbb724a0d73b))
|
|
162
178
|
|
|
179
|
+
# Change Log
|
|
180
|
+
|
|
181
|
+
All notable changes to this project will be documented in this file.
|
|
182
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
183
|
+
|
|
184
|
+
# 5.8.0 (2024-03-20)
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
### Features
|
|
188
|
+
|
|
189
|
+
* **templates:** add templates package to versions.json ([#3902](https://github.com/patternfly/patternfly-org/issues/3902)) ([c7c727c](https://github.com/patternfly/patternfly-org/commit/c7c727c717d5cc3c031f4f3c52070ffc6164e5d6))
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
# 5.7.0 (2024-03-19)
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
### Features
|
|
199
|
+
|
|
200
|
+
* add pf 6 alpha banner to home page and version switcher ([#3896](https://github.com/patternfly/patternfly-org/issues/3896)) ([f7aaa22](https://github.com/patternfly/patternfly-org/commit/f7aaa22d12310aa62533de4169e1fa70a49a20d9))
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
# 5.6.0 (2024-03-13)
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
### Features
|
|
210
|
+
|
|
211
|
+
* **deps:** version bump and release notes for 5.2.2 patch release ([#3919](https://github.com/patternfly/patternfly-org/issues/3919)) ([94d3654](https://github.com/patternfly/patternfly-org/commit/94d3654768f42f2ae7b3c0734d1e5f211cd33ff6))
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
## 5.5.1 (2024-03-12)
|
|
218
|
+
|
|
219
|
+
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
# 5.5.0 (2024-03-08)
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
### Features
|
|
229
|
+
|
|
230
|
+
* **deps:** version bump for 5.2.1 release ([#3913](https://github.com/patternfly/patternfly-org/issues/3913)) ([46cc8b7](https://github.com/patternfly/patternfly-org/commit/46cc8b70e06b9bda61067beba57d928e428b73c5))
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
## 5.4.3 (2024-02-27)
|
|
237
|
+
|
|
238
|
+
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
## 5.4.2 (2024-02-14)
|
|
245
|
+
|
|
246
|
+
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
## 5.4.1 (2024-02-06)
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
### Bug Fixes
|
|
256
|
+
|
|
257
|
+
* Bump topology to 5.2.1 ([#3881](https://github.com/patternfly/patternfly-org/issues/3881)) ([af13c97](https://github.com/patternfly/patternfly-org/commit/af13c971384aaaa5bd87ce3e98dccee4b1214889))
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
# 5.4.0 (2024-02-03)
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
### Features
|
|
267
|
+
|
|
268
|
+
* release 5.3 ([#3878](https://github.com/patternfly/patternfly-org/issues/3878)) ([3d1d130](https://github.com/patternfly/patternfly-org/commit/3d1d130c63ac4421ed8a307cd6ef140fa6e1d6f2))
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
## 5.3.27 (2024-02-01)
|
|
275
|
+
|
|
276
|
+
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
## 5.3.26 (2024-02-01)
|
|
283
|
+
|
|
284
|
+
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
## 5.3.25 (2024-01-30)
|
|
291
|
+
|
|
292
|
+
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
## 5.3.24 (2024-01-30)
|
|
299
|
+
|
|
300
|
+
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
## 5.3.23 (2024-01-19)
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
### Bug Fixes
|
|
310
|
+
|
|
311
|
+
* avoid applying beta tags to nav items for next components ([#3868](https://github.com/patternfly/patternfly-org/issues/3868)) ([169c96f](https://github.com/patternfly/patternfly-org/commit/169c96f55b1bfdcb9859dbab27b88f5a180f48ba))
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
## 5.3.22 (2024-01-16)
|
|
318
|
+
|
|
319
|
+
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
## 5.3.21 (2024-01-16)
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
### Bug Fixes
|
|
329
|
+
|
|
330
|
+
* bump to latest release candidates ahead of 5.2 release ([#3862](https://github.com/patternfly/patternfly-org/issues/3862)) ([12eeb78](https://github.com/patternfly/patternfly-org/commit/12eeb782d32c4fa65f6aef64292f1e0d92f0d183))
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
## 5.3.20 (2024-01-15)
|
|
336
|
+
|
|
337
|
+
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
## 5.3.19 (2024-01-15)
|
|
341
|
+
|
|
342
|
+
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
## 5.3.18 (2024-01-12)
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
### Bug Fixes
|
|
349
|
+
|
|
350
|
+
* bump puppeteer to fix core ([#3860](https://github.com/patternfly/patternfly-org/issues/3860)) ([1695209](https://github.com/patternfly/patternfly-org/commit/169520944b7c3dccf69709e6e2075b9153fce059))
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
## 5.3.17 (2024-01-05)
|
|
354
|
+
|
|
355
|
+
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
## 5.3.16 (2024-01-03)
|
|
359
|
+
|
|
360
|
+
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
## 5.3.15 (2023-12-14)
|
|
365
|
+
|
|
366
|
+
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
367
|
+
|
|
163
368
|
|
|
164
369
|
|
|
165
370
|
|
|
@@ -62,7 +62,7 @@ const flattenList = files => {
|
|
|
62
62
|
export class CSSVariables extends React.Component {
|
|
63
63
|
constructor(props) {
|
|
64
64
|
super(props);
|
|
65
|
-
const prefixToken = props.prefix.replace("pf-
|
|
65
|
+
const prefixToken = props.prefix.replace("pf-v6-", "").replace(/-+/g, "_");
|
|
66
66
|
const applicableFiles = Object.entries(tokensModule)
|
|
67
67
|
.filter(([key, val]) => prefixToken === key)
|
|
68
68
|
.sort(([key1], [key2]) => key1.localeCompare(key2))
|
|
@@ -103,12 +103,12 @@ export class CSSVariables extends React.Component {
|
|
|
103
103
|
<div key={rowKey}>
|
|
104
104
|
<div
|
|
105
105
|
key={`${rowKey}_1`}
|
|
106
|
-
className="pf-
|
|
106
|
+
className="pf-v6-l-flex pf-m-space-items-sm"
|
|
107
107
|
>
|
|
108
108
|
{isColorRegex.test(value) && (
|
|
109
109
|
<div
|
|
110
110
|
key={`${rowKey}_2`}
|
|
111
|
-
className="pf-
|
|
111
|
+
className="pf-v6-l-flex pf-m-column pf-m-align-self-center"
|
|
112
112
|
>
|
|
113
113
|
<span
|
|
114
114
|
className="ws-color-box"
|
|
@@ -118,7 +118,7 @@ export class CSSVariables extends React.Component {
|
|
|
118
118
|
)}
|
|
119
119
|
<div
|
|
120
120
|
key={`${rowKey}_3`}
|
|
121
|
-
className="pf-
|
|
121
|
+
className="pf-v6-l-flex pf-m-column pf-m-align-self-center ws-td-text"
|
|
122
122
|
>
|
|
123
123
|
{value}
|
|
124
124
|
</div>
|
|
@@ -170,7 +170,7 @@ export class CSSVariables extends React.Component {
|
|
|
170
170
|
render() {
|
|
171
171
|
return (
|
|
172
172
|
<React.Fragment>
|
|
173
|
-
{this.props.autoLinkHeader && <AutoLinkHeader size="h3" className="pf-
|
|
173
|
+
{this.props.autoLinkHeader && <AutoLinkHeader size="h3" className="pf-v6-u-mt-lg pf-v6-u-mb-md">{`Prefixed with '${this.props.prefix}'`}</AutoLinkHeader>}
|
|
174
174
|
<CSSSearch getDebouncedFilteredRows={this.getDebouncedFilteredRows} />
|
|
175
175
|
<Table
|
|
176
176
|
variant="compact"
|
|
@@ -131,7 +131,7 @@ export const Example = ({
|
|
|
131
131
|
if (lang === 'html') {
|
|
132
132
|
livePreview = (
|
|
133
133
|
<div
|
|
134
|
-
className={css('ws-preview-html', isFullscreenPreview && 'pf-
|
|
134
|
+
className={css('ws-preview-html', isFullscreenPreview && 'pf-v6-u-h-100')}
|
|
135
135
|
dangerouslySetInnerHTML={{ __html: editorCode }}
|
|
136
136
|
/>
|
|
137
137
|
);
|
|
@@ -164,10 +164,10 @@ export const Example = ({
|
|
|
164
164
|
|
|
165
165
|
if (isFullscreenPreview) {
|
|
166
166
|
return (
|
|
167
|
-
<div id={previewId} className={css(className, 'pf-
|
|
167
|
+
<div id={previewId} className={css(className, 'pf-v6-u-h-100')}>
|
|
168
168
|
{livePreview}
|
|
169
169
|
{(hasDarkThemeSwitcher || hasRTLSwitcher) && (
|
|
170
|
-
<Flex direction={{ default: 'column' }} gap={{ default: 'gapLg' }} className="ws-full-page-utils pf-
|
|
170
|
+
<Flex direction={{ default: 'column' }} gap={{ default: 'gapLg' }} className="ws-full-page-utils pf-v6-m-dir-ltr ">
|
|
171
171
|
{hasDarkThemeSwitcher && (
|
|
172
172
|
<Switch id="ws-example-theme-switch" label="Dark theme" defaultChecked={false} onChange={() =>
|
|
173
173
|
document.querySelector('html').classList.toggle('pf-v5-theme-dark')} />
|
|
@@ -248,7 +248,7 @@ export const Example = ({
|
|
|
248
248
|
className={css(
|
|
249
249
|
className,
|
|
250
250
|
isFullscreen ? 'ws-preview-fullscreen' : 'ws-preview',
|
|
251
|
-
isRTL && 'pf-
|
|
251
|
+
isRTL && 'pf-v6-m-dir-rtl')
|
|
252
252
|
}
|
|
253
253
|
>
|
|
254
254
|
{livePreview}
|
|
@@ -13,15 +13,15 @@ export const Footer = () => (
|
|
|
13
13
|
sm={12}
|
|
14
14
|
md={6}
|
|
15
15
|
mdOffset={1}
|
|
16
|
-
className="pf-
|
|
16
|
+
className="pf-v6-u-mb-lg pf-v6-u-mb-0-on-sm"
|
|
17
17
|
>
|
|
18
|
-
<Grid className="pf-
|
|
18
|
+
<Grid className="pf-v6-u-py-xl">
|
|
19
19
|
<GridItem
|
|
20
20
|
sm={6}
|
|
21
21
|
md={4}
|
|
22
|
-
className="pf-
|
|
22
|
+
className="pf-v6-u-ml-md pf-v6-u-ml-0-on-md pf-v6-u-mb-xl pf-v6-u-mb-0-on-md"
|
|
23
23
|
>
|
|
24
|
-
<p className="pf-
|
|
24
|
+
<p className="pf-v6-c-title ws-org-pfsite-footer-menu-list-title">
|
|
25
25
|
QUICKLINKS
|
|
26
26
|
</p>
|
|
27
27
|
<nav aria-label="Quick Links">
|
|
@@ -68,9 +68,9 @@ export const Footer = () => (
|
|
|
68
68
|
<GridItem
|
|
69
69
|
sm={6}
|
|
70
70
|
md={4}
|
|
71
|
-
className="pf-
|
|
71
|
+
className="pf-v6-u-mt-lg pf-v6-u-mt-0-on-sm pf-v6-u-ml-md pf-v6-u-ml-0-on-md pf-v6-u-mb-xl pf-v6-u-mb-0-on-md"
|
|
72
72
|
>
|
|
73
|
-
<p className="pf-
|
|
73
|
+
<p className="pf-v6-c-title ws-org-pfsite-footer-menu-list-title">
|
|
74
74
|
CONTRIBUTE
|
|
75
75
|
</p>
|
|
76
76
|
<nav aria-label="Contribute">
|
|
@@ -109,7 +109,7 @@ export const Footer = () => (
|
|
|
109
109
|
<GridItem
|
|
110
110
|
sm={6}
|
|
111
111
|
md={4}
|
|
112
|
-
className="pf-
|
|
112
|
+
className="pf-v6-u-mt-lg pf-v6-u-mt-0-on-md pf-v6-u-ml-md pf-v6-u-ml-0-on-md"
|
|
113
113
|
>
|
|
114
114
|
<p className="ws-org-pfsite-footer-menu-list-title">
|
|
115
115
|
STAY IN TOUCH
|
|
@@ -162,10 +162,10 @@ export const Footer = () => (
|
|
|
162
162
|
</Grid>
|
|
163
163
|
</GridItem>
|
|
164
164
|
<GridItem sm={12} md={4}>
|
|
165
|
-
<Grid className="pf-
|
|
166
|
-
<GridItem className="pf-
|
|
165
|
+
<Grid className="pf-v6-u-pt-xl ws-org-pfsite-l-footer-column">
|
|
166
|
+
<GridItem className="pf-v6-u-px-xl">
|
|
167
167
|
<Link
|
|
168
|
-
className="pf-
|
|
168
|
+
className="pf-v6-c-page__header-brand-link pf-v6-c-brand ws-org-pfsite-footer-menu-about-logo pf-v6-u-pb-md"
|
|
169
169
|
to="/"
|
|
170
170
|
>
|
|
171
171
|
<Brand
|
|
@@ -185,7 +185,7 @@ export const Footer = () => (
|
|
|
185
185
|
product experiences—the open source way.
|
|
186
186
|
</Text>
|
|
187
187
|
</GridItem>
|
|
188
|
-
<GridItem className="ws-org-pfsite-footer-menu-social-links pf-
|
|
188
|
+
<GridItem className="ws-org-pfsite-footer-menu-social-links pf-v6-u-px-xl">
|
|
189
189
|
<Link
|
|
190
190
|
to="//github.com/patternfly"
|
|
191
191
|
target="top"
|
|
@@ -209,7 +209,7 @@ export const Footer = () => (
|
|
|
209
209
|
key="footer-2"
|
|
210
210
|
className="ws-org-pfsite-l-footer-dark pf-m-no-fill"
|
|
211
211
|
>
|
|
212
|
-
<Grid className="pf-
|
|
212
|
+
<Grid className="pf-v6-u-py-xl-on-sm pf-v6-u-py-0-on-md pf-v6-u-align-items-center">
|
|
213
213
|
<GridItem md={2} mdOffset={1}>
|
|
214
214
|
<Link
|
|
215
215
|
to="//www.redhat.com"
|
|
@@ -228,7 +228,7 @@ export const Footer = () => (
|
|
|
228
228
|
Copyright © 2014-{new Date().getFullYear()} Red Hat, Inc.
|
|
229
229
|
</span>
|
|
230
230
|
</GridItem>
|
|
231
|
-
<GridItem md={4} lg={5} className="pf-
|
|
231
|
+
<GridItem md={4} lg={5} className="pf-v6-u-ml-xl-on-xl">
|
|
232
232
|
<Link
|
|
233
233
|
to="//www.redhat.com/en/about/privacy-policy"
|
|
234
234
|
target="top"
|
|
@@ -6,16 +6,16 @@ import './gdprBanner.css';
|
|
|
6
6
|
export const GdprBanner = () => {
|
|
7
7
|
const initialBannerOpen = typeof window !== 'undefined' && window.localStorage && !localStorage.getItem('gdpr-banner-closed');
|
|
8
8
|
const [ isBannerOpen, setBannerOpen ] = React.useState(initialBannerOpen);
|
|
9
|
-
|
|
9
|
+
|
|
10
10
|
const closeBanner = () => {
|
|
11
11
|
localStorage.setItem('gdpr-banner-closed', 'true');
|
|
12
12
|
setBannerOpen(false);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
return !isBannerOpen ? null : (
|
|
16
|
-
<section aria-label="Cookies on PatternFly" className="ws-gdpr-banner-container pf-
|
|
17
|
-
<div id="ws-gdpr-banner" className="pf-
|
|
18
|
-
<p id="ws-gdpr-banner-text" className="pf-
|
|
16
|
+
<section aria-label="Cookies on PatternFly" className="ws-gdpr-banner-container pf-v6-l-flex">
|
|
17
|
+
<div id="ws-gdpr-banner" className="pf-v6-l-flex pf-v6-u-py-md pf-m-align-items-center">
|
|
18
|
+
<p id="ws-gdpr-banner-text" className="pf-v6-u-ml-xl">
|
|
19
19
|
We use cookies on our websites to deliver our online services.
|
|
20
20
|
Details about how we use cookies and how you may disable them are set out in our <a href="//www.redhat.com/en/about/privacy-policy">Privacy Statement</a>.
|
|
21
21
|
By using this website you agree to our use of cookies.
|
|
@@ -18,9 +18,9 @@ import accessibleStyles from "@patternfly/react-styles/css/utilities/Accessibili
|
|
|
18
18
|
export const PropsTable = ({ title, description, rows, allPropComponents }) => (
|
|
19
19
|
<React.Fragment>
|
|
20
20
|
<AutoLinkHeader size="h3">{title}</AutoLinkHeader>
|
|
21
|
-
<Table className="pf-
|
|
21
|
+
<Table className="pf-v6-u-mt-md pf-v6-u-mb-lg" variant="compact" aria-label={title} gridBreakPoint="grid-lg">
|
|
22
22
|
<Caption>
|
|
23
|
-
{description && <div className="pf-
|
|
23
|
+
{description && <div className="pf-v6-u-mb-md">{description}</div>}
|
|
24
24
|
<div>
|
|
25
25
|
<span className="ws-prop-required">*</span>required
|
|
26
26
|
</div>
|
|
@@ -64,7 +64,7 @@ export const PropsTable = ({ title, description, rows, allPropComponents }) => (
|
|
|
64
64
|
{row.beta && (
|
|
65
65
|
<Badge
|
|
66
66
|
key={`${row.name}-${idx}`}
|
|
67
|
-
className="ws-beta-badge pf-
|
|
67
|
+
className="ws-beta-badge pf-v6-u-ml-sm"
|
|
68
68
|
>
|
|
69
69
|
Beta
|
|
70
70
|
</Badge>
|
|
@@ -7,7 +7,7 @@ export const SectionDataListLayout = ({ galleryItems, layoutView, hasListText, h
|
|
|
7
7
|
if (layoutView !== 'list') {
|
|
8
8
|
return null;
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
return (
|
|
12
12
|
<DataList onSelectDataListItem={() => {}}>
|
|
13
13
|
{galleryItems.map(({ idx, slug, illustration, itemName, title, isBeta, isDeprecated, isDemo, id, galleryItemsData }) => (
|
|
@@ -23,7 +23,7 @@ export const SectionDataListLayout = ({ galleryItems, layoutView, hasListText, h
|
|
|
23
23
|
</DataListCell>
|
|
24
24
|
),
|
|
25
25
|
<DataListCell width={5} key="text-description">
|
|
26
|
-
<Split className={ hasListText ? "pf-
|
|
26
|
+
<Split className={ hasListText ? "pf-v6-u-mb-md" : null }>
|
|
27
27
|
<SplitItem isFilled>
|
|
28
28
|
<TextContent>
|
|
29
29
|
<Text component={TextVariants.h2}>
|
|
@@ -32,7 +32,7 @@ export const SectionDataListLayout = ({ galleryItems, layoutView, hasListText, h
|
|
|
32
32
|
</span>
|
|
33
33
|
</Text>
|
|
34
34
|
</TextContent>
|
|
35
|
-
</SplitItem>
|
|
35
|
+
</SplitItem>
|
|
36
36
|
<SplitItem>
|
|
37
37
|
{isBeta && (<Label color="blue" isCompact>Beta</Label>)}
|
|
38
38
|
{!isBeta && isDeprecated && (<Label color="grey" isCompact>Deprecated</Label>)}
|
|
@@ -96,7 +96,7 @@ const ExpandableNav = ({groupedRoutes, location, section, subsection = null}) =>
|
|
|
96
96
|
source.source === "react-deprecated" || source.source === "html-deprecated")
|
|
97
97
|
&& !navObj.sources.some(source => source.source === "react" || source.source === "html")
|
|
98
98
|
),
|
|
99
|
-
isBeta: navObj.sources.some(source => source.beta),
|
|
99
|
+
isBeta: navObj.sources.some(source => source.beta && source.source !== 'react-next'),
|
|
100
100
|
isDemo: navObj.sources.some(source => (
|
|
101
101
|
source.source === "react-demos" || source.source === "html-demos")
|
|
102
102
|
&& !navObj.sources.some(source => source.source === "react" || source.source === "html")
|
|
@@ -59,7 +59,7 @@ const HeaderTools = ({
|
|
|
59
59
|
|
|
60
60
|
const getDropdownItem = (version, isLatest = false) => (
|
|
61
61
|
<DropdownItem itemId={version.name} key={version.name} to={isLatest ? '/' : `/${version.name}`}>
|
|
62
|
-
{`
|
|
62
|
+
{`Current ${version.name}`}
|
|
63
63
|
</DropdownItem>
|
|
64
64
|
);
|
|
65
65
|
|
|
@@ -93,7 +93,7 @@ const HeaderTools = ({
|
|
|
93
93
|
</ToolbarItem>
|
|
94
94
|
)}
|
|
95
95
|
<ToolbarGroup
|
|
96
|
-
align={{ default: '
|
|
96
|
+
align={{ default: 'alignEnd' }}
|
|
97
97
|
spaceItems={{ default: 'spacerNone', md: 'spacerMd' }}
|
|
98
98
|
>
|
|
99
99
|
{hasDarkThemeSwitcher && (
|
|
@@ -163,12 +163,21 @@ const HeaderTools = ({
|
|
|
163
163
|
</DropdownList>
|
|
164
164
|
</DropdownGroup>
|
|
165
165
|
)}
|
|
166
|
-
<Divider key="
|
|
166
|
+
<Divider key="divider2" className="ws-switcher-divider"/>
|
|
167
167
|
<DropdownGroup key="Previous versions" label="Previous versions">
|
|
168
168
|
<DropdownList>
|
|
169
|
+
<DropdownItem
|
|
170
|
+
key="PatternFly 5"
|
|
171
|
+
className="ws-patternfly-versions"
|
|
172
|
+
isExternalLink
|
|
173
|
+
to="https://www.patternfly.org"
|
|
174
|
+
itemId="patternfly-5"
|
|
175
|
+
>
|
|
176
|
+
PatternFly 5
|
|
177
|
+
</DropdownItem>
|
|
169
178
|
<DropdownItem
|
|
170
179
|
key="PatternFly 4"
|
|
171
|
-
className="ws-patternfly-
|
|
180
|
+
className="ws-patternfly-versions"
|
|
172
181
|
isExternalLink
|
|
173
182
|
to="http://v4-archive.patternfly.org/v4/"
|
|
174
183
|
itemId="patternfly-4"
|
|
@@ -177,7 +186,7 @@ const HeaderTools = ({
|
|
|
177
186
|
</DropdownItem>
|
|
178
187
|
<DropdownItem
|
|
179
188
|
key="PatternFly 3"
|
|
180
|
-
className="ws-patternfly-
|
|
189
|
+
className="ws-patternfly-versions"
|
|
181
190
|
isExternalLink
|
|
182
191
|
to="https://pf3.patternfly.org/"
|
|
183
192
|
itemId="patternfly-3"
|
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.0-alpha.
|
|
4
|
+
"version": "6.0.0-alpha.18",
|
|
5
5
|
"author": "Red Hat",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"private": false,
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@babel/plugin-transform-react-jsx": "7.17.12",
|
|
18
18
|
"@babel/preset-env": "7.18.2",
|
|
19
19
|
"@mdx-js/util": "1.6.16",
|
|
20
|
-
"@patternfly/ast-helpers": "^1.4.0-alpha.
|
|
20
|
+
"@patternfly/ast-helpers": "^1.4.0-alpha.7",
|
|
21
21
|
"@reach/router": "npm:@gatsbyjs/reach-router@1.3.9",
|
|
22
22
|
"autoprefixer": "9.8.6",
|
|
23
23
|
"babel-loader": "9.1.2",
|
|
@@ -43,8 +43,6 @@
|
|
|
43
43
|
"mdast-util-to-hast": "9.1.1",
|
|
44
44
|
"mdurl": "1.0.1",
|
|
45
45
|
"mini-css-extract-plugin": "2.7.5",
|
|
46
|
-
"monaco-editor": "0.34.1",
|
|
47
|
-
"monaco-editor-webpack-plugin": "7.0.1",
|
|
48
46
|
"null-loader": "4.0.1",
|
|
49
47
|
"parse-entities": "2.0.0",
|
|
50
48
|
"path-browserify": "1.0.1",
|
|
@@ -54,7 +52,6 @@
|
|
|
54
52
|
"puppeteer": "19.11.1",
|
|
55
53
|
"puppeteer-cluster": "0.23.0",
|
|
56
54
|
"react-docgen": "5.3.1",
|
|
57
|
-
"react-monaco-editor": "^0.51.0",
|
|
58
55
|
"react-ssr-prepass": "1.5.0",
|
|
59
56
|
"remark-footnotes": "1.0.0",
|
|
60
57
|
"remark-frontmatter": "2.0.0",
|
|
@@ -80,12 +77,12 @@
|
|
|
80
77
|
"webpack-merge": "5.8.0"
|
|
81
78
|
},
|
|
82
79
|
"peerDependencies": {
|
|
83
|
-
"@patternfly/patternfly": "6.0.0-alpha.
|
|
84
|
-
"@patternfly/react-code-editor": "6.0.0-alpha.
|
|
85
|
-
"@patternfly/react-core": "6.0.0-alpha.
|
|
86
|
-
"@patternfly/react-table": "6.0.0-alpha.
|
|
80
|
+
"@patternfly/patternfly": "6.0.0-alpha.103",
|
|
81
|
+
"@patternfly/react-code-editor": "6.0.0-alpha.43",
|
|
82
|
+
"@patternfly/react-core": "6.0.0-alpha.43",
|
|
83
|
+
"@patternfly/react-table": "6.0.0-alpha.43",
|
|
87
84
|
"react": "^17.0.0 || ^18.0.0",
|
|
88
85
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
89
86
|
},
|
|
90
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "676e14597e9b1081ed1ce9df2772852145d130d3"
|
|
91
88
|
}
|
package/routes.js
CHANGED
package/scripts/md/parseMD.js
CHANGED
|
@@ -105,6 +105,7 @@ function toReactComponent(mdFilePath, source, buildMode) {
|
|
|
105
105
|
section: frontmatter.section || '',
|
|
106
106
|
subsection: frontmatter.subsection || '',
|
|
107
107
|
deprecated: frontmatter.deprecated || false,
|
|
108
|
+
template: frontmatter.template || false,
|
|
108
109
|
beta: frontmatter.beta || false,
|
|
109
110
|
demo: frontmatter.demo || false,
|
|
110
111
|
newImplementationLink: frontmatter.newImplementationLink || false,
|
|
@@ -295,6 +296,7 @@ function sourceMDFile(file, source, buildMode) {
|
|
|
295
296
|
...(pageData.hideNavItem && { hideNavItem: pageData.hideNavItem }),
|
|
296
297
|
...(pageData.beta && { beta: pageData.beta }),
|
|
297
298
|
...(pageData.deprecated && { deprecated: pageData.deprecated }),
|
|
299
|
+
...(pageData.template && { template: pageData.template }),
|
|
298
300
|
...(pageData.demo && { demo: pageData.demo }),
|
|
299
301
|
...(pageData.sortValue && { sortValue: pageData.sortValue }),
|
|
300
302
|
...(pageData.subsectionSortValue && { subsectionSortValue: pageData.subsectionSortValue })
|
|
@@ -2,7 +2,6 @@ const path = require('path');
|
|
|
2
2
|
const webpack = require('webpack');
|
|
3
3
|
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
|
4
4
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
5
|
-
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
|
|
6
5
|
|
|
7
6
|
module.exports = (_env, argv) => {
|
|
8
7
|
const {
|
|
@@ -156,9 +155,6 @@ module.exports = (_env, argv) => {
|
|
|
156
155
|
patterns: [
|
|
157
156
|
{ from: path.join(__dirname, '../../assets'), to: 'assets' }
|
|
158
157
|
]
|
|
159
|
-
}),
|
|
160
|
-
new MonacoWebpackPlugin({
|
|
161
|
-
globalAPI: true,
|
|
162
158
|
})
|
|
163
159
|
],
|
|
164
160
|
stats: 'minimal'
|
|
@@ -32,7 +32,7 @@ async function writeScreenshots({ urlPrefix, allRoutes, filterTerm }) {
|
|
|
32
32
|
concurrency: Cluster.CONCURRENCY_CONTEXT,
|
|
33
33
|
maxConcurrency: os.cpus().length,
|
|
34
34
|
puppeteerOptions: {
|
|
35
|
-
headless:
|
|
35
|
+
headless: 'new', // set to false for testing...
|
|
36
36
|
args: ["--no-sandbox", "--disable-setuid-sandbox"],
|
|
37
37
|
defaultViewport: {width: 1920, height: 1080}
|
|
38
38
|
}
|
package/templates/mdx.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#ws-page-content-router {
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
|
-
|
|
4
|
+
flex-shrink: 0;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.ws-release-notes-toc {
|
|
@@ -74,6 +74,11 @@
|
|
|
74
74
|
width: 100%;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
.ws-image {
|
|
78
|
+
text-align: center;
|
|
79
|
+
width: "600px";
|
|
80
|
+
}
|
|
81
|
+
|
|
77
82
|
.ws-table td > code,
|
|
78
83
|
.ws-table th > code,
|
|
79
84
|
.ws-table tr > code {
|
package/templates/mdx.js
CHANGED
|
@@ -23,6 +23,7 @@ const MDXChildTemplate = ({
|
|
|
23
23
|
optIn,
|
|
24
24
|
beta,
|
|
25
25
|
deprecated,
|
|
26
|
+
template,
|
|
26
27
|
newImplementationLink,
|
|
27
28
|
functionDocumentation = []
|
|
28
29
|
} = Component.getPageData();
|
|
@@ -84,6 +85,11 @@ const MDXChildTemplate = ({
|
|
|
84
85
|
{' '}To learn more about the process, visit our <Link to="/get-started/about#major-release-cadence">about page</Link>.
|
|
85
86
|
</InlineAlert>
|
|
86
87
|
)}
|
|
88
|
+
{(template || source === 'react-template') && (
|
|
89
|
+
<InlineAlert title="Templates" variant="info">
|
|
90
|
+
{`This page showcases templates for the ${id.toLowerCase()} component. A template combines a component with logic that supports a specific use case, with a streamlined API that offers additional, limited customization.`}
|
|
91
|
+
</InlineAlert>
|
|
92
|
+
)}
|
|
87
93
|
</React.Fragment>
|
|
88
94
|
);
|
|
89
95
|
// Create dynamic component for @reach/router
|
|
@@ -152,7 +158,7 @@ export const MDXTemplate = ({
|
|
|
152
158
|
componentsData
|
|
153
159
|
}) => {
|
|
154
160
|
const isDeprecated = sources.some(source => source.source === "react-deprecated" || source.source === "html-deprecated") && !sources.some(source => source.source === "react" || source.source === "html");
|
|
155
|
-
const isBeta = sources.some(source => source.beta)
|
|
161
|
+
const isBeta = sources.some(source => source.beta && source.source !== 'react-next')
|
|
156
162
|
const isDemo = sources.some(source => source.source === "react-demos" || source.source === "html-demos") && !sources.some(source => source.source === "react" || source.source === "html");
|
|
157
163
|
// Build obj mapping source names to text displayed on tabs
|
|
158
164
|
const tabNames = sources.reduce((acc, curSrc) => {
|
package/versions.json
CHANGED
|
@@ -18,10 +18,84 @@
|
|
|
18
18
|
"@patternfly/react-tokens": "5.1.0",
|
|
19
19
|
"@patternfly/react-topology": "5.1.0",
|
|
20
20
|
"@patternfly/quickstarts": "5.1.0",
|
|
21
|
-
"@patternfly/react-virtualized-extension": "5.1.0"
|
|
21
|
+
"@patternfly/react-virtualized-extension": "5.1.0",
|
|
22
|
+
"@patternfly/react-templates": "^1.0.0-alpha.0"
|
|
23
|
+
}
|
|
24
|
+
},{
|
|
25
|
+
"name": "5.2.2",
|
|
26
|
+
"date": "2024-03-12",
|
|
27
|
+
"hidden": true,
|
|
28
|
+
"versions": {
|
|
29
|
+
"@patternfly/patternfly": "5.2.1",
|
|
30
|
+
"@patternfly/react-charts": "7.2.2",
|
|
31
|
+
"@patternfly/react-code-editor": "5.2.2",
|
|
32
|
+
"@patternfly/react-core": "5.2.2",
|
|
33
|
+
"@patternfly/react-icons": "5.2.1",
|
|
34
|
+
"@patternfly/react-styles": "5.2.1",
|
|
35
|
+
"@patternfly/react-table": "5.2.2",
|
|
36
|
+
"@patternfly/react-drag-drop": "5.2.2",
|
|
37
|
+
"@patternfly/react-tokens": "5.2.1",
|
|
38
|
+
"@patternfly/react-catalog-view-extension": "5.0.0",
|
|
39
|
+
"@patternfly/react-component-groups": "5.1.0",
|
|
40
|
+
"@patternfly/react-console": "5.0.0",
|
|
41
|
+
"@patternfly/react-log-viewer": "5.2.0",
|
|
42
|
+
"@patternfly/react-topology": "5.2.1",
|
|
43
|
+
"@patternfly/react-user-feedback": "5.0.0",
|
|
44
|
+
"@patternfly/react-virtualized-extension": "5.0.0",
|
|
45
|
+
"@patternfly/quickstarts": "5.0.0",
|
|
46
|
+
"@patternfly/react-templates": "^1.0.0-alpha.0"
|
|
22
47
|
}
|
|
23
48
|
},
|
|
24
49
|
{
|
|
50
|
+
"name": "5.2.1",
|
|
51
|
+
"date": "2024-03-01",
|
|
52
|
+
"hidden": true,
|
|
53
|
+
"versions": {
|
|
54
|
+
"@patternfly/patternfly": "5.2.1",
|
|
55
|
+
"@patternfly/react-charts": "7.2.2",
|
|
56
|
+
"@patternfly/react-code-editor": "5.2.1",
|
|
57
|
+
"@patternfly/react-core": "5.2.1",
|
|
58
|
+
"@patternfly/react-icons": "5.2.1",
|
|
59
|
+
"@patternfly/react-styles": "5.2.1",
|
|
60
|
+
"@patternfly/react-table": "5.2.1",
|
|
61
|
+
"@patternfly/react-drag-drop": "5.2.1",
|
|
62
|
+
"@patternfly/react-tokens": "5.2.1",
|
|
63
|
+
"@patternfly/react-catalog-view-extension": "5.0.0",
|
|
64
|
+
"@patternfly/react-component-groups": "5.1.0",
|
|
65
|
+
"@patternfly/react-console": "5.0.0",
|
|
66
|
+
"@patternfly/react-log-viewer": "5.2.0",
|
|
67
|
+
"@patternfly/react-topology": "5.2.1",
|
|
68
|
+
"@patternfly/react-user-feedback": "5.0.0",
|
|
69
|
+
"@patternfly/react-virtualized-extension": "5.0.0",
|
|
70
|
+
"@patternfly/quickstarts": "5.0.0",
|
|
71
|
+
"@patternfly/react-templates": "^1.0.0-alpha.0"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "5.2.0",
|
|
76
|
+
"date": "2024-01-17",
|
|
77
|
+
"hidden": true,
|
|
78
|
+
"versions": {
|
|
79
|
+
"@patternfly/patternfly": "5.2.0",
|
|
80
|
+
"@patternfly/react-charts": "7.2.0",
|
|
81
|
+
"@patternfly/react-code-editor": "5.2.0",
|
|
82
|
+
"@patternfly/react-core": "5.2.0",
|
|
83
|
+
"@patternfly/react-icons": "5.2.0",
|
|
84
|
+
"@patternfly/react-styles": "5.2.0",
|
|
85
|
+
"@patternfly/react-table": "5.2.0",
|
|
86
|
+
"@patternfly/react-drag-drop": "5.2.0",
|
|
87
|
+
"@patternfly/react-tokens": "5.2.0",
|
|
88
|
+
"@patternfly/react-catalog-view-extension": "5.0.0",
|
|
89
|
+
"@patternfly/react-component-groups": "5.1.0",
|
|
90
|
+
"@patternfly/react-console": "5.0.0",
|
|
91
|
+
"@patternfly/react-log-viewer": "5.2.0",
|
|
92
|
+
"@patternfly/react-topology": "5.2.1",
|
|
93
|
+
"@patternfly/react-user-feedback": "5.0.0",
|
|
94
|
+
"@patternfly/react-virtualized-extension": "5.0.0",
|
|
95
|
+
"@patternfly/quickstarts": "5.0.0",
|
|
96
|
+
"@patternfly/react-templates": "^1.0.0-alpha.0"
|
|
97
|
+
}
|
|
98
|
+
},{
|
|
25
99
|
"name": "5.1.0",
|
|
26
100
|
"date": "2023-10-06",
|
|
27
101
|
"hidden": true,
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: Global CSS variables
|
|
3
|
-
section: developer-resources
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
import { CSSVariables } from '../components/cssVariables/cssVariables';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
## About CSS variables
|
|
10
|
-
|
|
11
|
-
The CSS variable system is a two-layer theming system where global variables inform component variables.
|
|
12
|
-
|
|
13
|
-
### Global variables
|
|
14
|
-
|
|
15
|
-
Global variables define and enforce global style elements (like values for color, spacing, and font size) across the entire system.
|
|
16
|
-
|
|
17
|
-
Global variables follow this formula:
|
|
18
|
-
|
|
19
|
-
`--pf-v6-global--concept--PropertyCamelCase--modifier--state`
|
|
20
|
-
|
|
21
|
-
Where...
|
|
22
|
-
|
|
23
|
-
- A `concept` is something like a `spacer` or `main-title`.
|
|
24
|
-
- A `PropertyCamelCase` is something like `BackgroundColor` or `FontSize`.
|
|
25
|
-
- A `modifier` is something like `sm` or `lg`.
|
|
26
|
-
- A `state` is something like `hover` or `expanded`.
|
|
27
|
-
|
|
28
|
-
Example:
|
|
29
|
-
- Note: global variables are scoped to `:root`
|
|
30
|
-
```css
|
|
31
|
-
:root {
|
|
32
|
-
/* Default & hovered link colors */
|
|
33
|
-
--pf-v6-global--link--Color: #06c;
|
|
34
|
-
--pf-v6-global--link--Color--hover: #004080;
|
|
35
|
-
}
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
<br/>
|
|
39
|
-
The [full list of global CSS variables](#global-css-variables) can be found below.
|
|
40
|
-
|
|
41
|
-
### Component variables
|
|
42
|
-
|
|
43
|
-
Component variables are used to define custom properties at the component-level. Component variables are always defined by global variables.
|
|
44
|
-
|
|
45
|
-
Component variables follow this formula:
|
|
46
|
-
|
|
47
|
-
`--pf-v6-c-block__element--modifier--state--breakpoint--['child'|tag|c-component]pseudo-element--PropertyCamelCase`
|
|
48
|
-
|
|
49
|
-
Where...
|
|
50
|
-
|
|
51
|
-
- `pf-v6-c-block` refers to the block, usually the component or layout name, like `pf-v6-c-alert`.
|
|
52
|
-
- `__element` refers to the element inside of the block, like `__title`.
|
|
53
|
-
- `modifier` is prefixed with`-m` and refers to a modifier class such as `.pf-m-danger`.
|
|
54
|
-
- `state` is something like `hover` or `active`.
|
|
55
|
-
- `breakpoint` is a media query breakpoint such as `sm` for `$pf-v6-global--breakpoint--xs`.
|
|
56
|
-
- `pseudo-element` is either `before` or `after`.
|
|
57
|
-
- `child`, `tag`, or `c-component` refers to a child element. It could be a tag or component name, like `svg` or `c-menu`, or it could use `child` to refer to any child element. If any modifiers, states, breakpoints, or pseudo-elements are on the child, include those after this portion of the name.
|
|
58
|
-
|
|
59
|
-
Example:
|
|
60
|
-
- Note: component variables are scoped to the top-level component selector
|
|
61
|
-
```css
|
|
62
|
-
.pf-v6-c-button {
|
|
63
|
-
/* Default, primary, and primary hovered button background colors */
|
|
64
|
-
--pf-v6-c-button--BackgroundColor: transparent;
|
|
65
|
-
--pf-v6-c-button--m-primary--BackgroundColor: var(--pf-v6-global--primary-color--100);
|
|
66
|
-
--pf-v6-c-button--m-primary--hover--BackgroundColor: var(--pf-v6-global--primary-color--200);
|
|
67
|
-
}
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
<br/>
|
|
71
|
-
Component variables are listed at the bottom of each component page (for example, [button css variables](/components/button#css-variables)).
|
|
72
|
-
|
|
73
|
-
Note that all component variables are declared at the top component level (for example, `.pf-v6-c-button`). The component variable table linked above also shows all usages of each variable and the values they evaluate to in each case - expand any component variable row to view the global variable it is mapped to.
|
|
74
|
-
|
|
75
|
-

|
|
76
|
-
|
|
77
|
-
### Breakpoint variables and class suffixes
|
|
78
|
-
|
|
79
|
-
PatternFly defines a number of standard breakpoints. These are always used as a `min-width` breakpoint; i.e. using the `-md` breakpoint would apply to everything at the `-md` width and wider. (There is one exception to this, which is in the responsive behavior of the [table component](/components/table).)
|
|
80
|
-
|
|
81
|
-
Breakpoint suffixes are used in utility classes and layouts as well as in many components as a way to apply class styles at a specified breakpoint. When available, `{-on-[breakpoint]}` will be shown as an available suffix for the class in the usage section of the documentation. The breakpoint suffix is optional and if not specified, the base class will be used. There are breakpoints for `sm`, `md`, `lg`, `xl`, and `2xl`, and the values for the corresponding breakpoints are defined below in the global variables `—pf-v6-global—breakpoint—[breakpoint]`.
|
|
82
|
-
|
|
83
|
-
### Using the variable system
|
|
84
|
-
|
|
85
|
-
PatternFly 4 styles provide a default starting point. You can use the variable system to make adjustments to that default styling. When you change one or more elements, you should package those values into a new SCSS stylesheet to replace the default styling.
|
|
86
|
-
|
|
87
|
-
Overrides to PatternFly variables should be made at the `:root` level for global variables or at the top-level component selector for component variables (for example, `.pf-v6-c-button`), as these overrides will cascade down to children elements accordingly.
|
|
88
|
-
|
|
89
|
-
Example:
|
|
90
|
-
- Change the global primary color to red, but keep the original primary blue color as the background for primary buttons.
|
|
91
|
-
```css
|
|
92
|
-
/* Override global primary color 100 to red */
|
|
93
|
-
:root {
|
|
94
|
-
--pf-v6-global--primary-color--100: var(--pf-v6-global--palette--red-400);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/* Override the above override for only the primary button background color */
|
|
98
|
-
.pf-v6-c-button {
|
|
99
|
-
--pf-v6-c-button--m-primary--BackgroundColor: var(--pf-v6-global--palette--blue-400);
|
|
100
|
-
}
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
## Global CSS variables
|
|
104
|
-
|
|
105
|
-
<CSSVariables prefix="patternfly_variables" selector=":where(:root)" hideSelectorColumn />
|
|
106
|
-
|
|
107
|
-
## Chart CSS variables
|
|
108
|
-
|
|
109
|
-
<CSSVariables prefix="patternfly_charts" hideSelectorColumn />
|
|
Binary file
|