@patternfly/documentation-framework 6.0.0-alpha.12 → 6.0.0-alpha.121

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.
Files changed (47) hide show
  1. package/CHANGELOG.md +1501 -0
  2. package/README.md +5 -76
  3. package/app.js +2 -5
  4. package/components/autoLinkHeader/autoLinkHeader.css +2 -2
  5. package/components/autoLinkHeader/autoLinkHeader.js +9 -19
  6. package/components/cssVariables/cssVariables.css +9 -11
  7. package/components/cssVariables/cssVariables.js +19 -32
  8. package/components/example/example.css +6 -50
  9. package/components/example/example.js +149 -78
  10. package/components/example/exampleToolbar.js +3 -2
  11. package/components/footer/RHLogoDark.png +0 -0
  12. package/components/footer/footer.css +31 -93
  13. package/components/footer/footer.js +167 -96
  14. package/components/gdprBanner/gdprBanner.css +0 -3
  15. package/components/gdprBanner/gdprBanner.js +22 -16
  16. package/components/inlineAlert/inlineAlert.js +1 -1
  17. package/components/link/link.js +23 -18
  18. package/components/propsTable/propsTable.js +14 -10
  19. package/components/sectionGallery/TextSummary.js +10 -10
  20. package/components/sectionGallery/sectionDataListLayout.js +89 -43
  21. package/components/sectionGallery/sectionGallery.css +3 -36
  22. package/components/sectionGallery/sectionGalleryLayout.js +73 -23
  23. package/components/sectionGallery/sectionGalleryToolbar.js +48 -12
  24. package/components/sectionGallery/sectionGalleryWrapper.js +69 -31
  25. package/components/sideNav/sideNav.js +2 -3
  26. package/components/tableOfContents/tableOfContents.css +21 -30
  27. package/components/tableOfContents/tableOfContents.js +58 -28
  28. package/layouts/sideNavLayout/sideNavLayout.css +0 -35
  29. package/layouts/sideNavLayout/sideNavLayout.js +177 -92
  30. package/package.json +14 -21
  31. package/pages/404/404.css +2 -2
  32. package/pages/404/index.js +23 -36
  33. package/routes.js +3 -1
  34. package/scripts/md/anchor-header.js +1 -1
  35. package/scripts/md/parseMD.js +23 -21
  36. package/scripts/md/styled-tags.js +22 -14
  37. package/scripts/md/typecheck.js +5 -0
  38. package/scripts/webpack/prerender.js +2 -1
  39. package/scripts/webpack/webpack.base.config.js +7 -18
  40. package/scripts/writeScreenshots.js +1 -1
  41. package/templates/mdx.css +11 -288
  42. package/templates/mdx.js +36 -39
  43. package/templates/patternfly-docs/patternfly-docs.source.js +8 -8
  44. package/versions.json +187 -17
  45. package/components/sideNav/sideNav.css +0 -21
  46. package/pages/global-css-variables.md +0 -109
  47. package/pages/img/component-variable-mapping.png +0 -0
@@ -1,35 +1,38 @@
1
1
  .ws-toc {
2
2
  align-self: flex-start;
3
3
  position: sticky;
4
- width: calc(100% + var(--pf-v6-c-page__main-section--PaddingLeft) + var(--pf-v6-c-page__main-section--PaddingRight));
5
- background-color: var(--pf-v6-global--BackgroundColor--200);
6
- z-index: 501;
4
+ width: calc(100% + var(--pf-v6-c-page__main-section--PaddingInlineStart) + var(--pf-v6-c-page__main-section--PaddingInlineEnd));
5
+ background-color: var(--pf-t--global--background--color--secondary--default);
6
+ z-index: 201;
7
7
  margin-block-start: calc(var(--pf-v6-c-page__main-section--PaddingTop) * -1);
8
- margin-block-end: var(--pf-v6-global--spacer--md);
9
- margin-inline-start: calc(var(--pf-v6-c-page__main-section--PaddingLeft) * -1);
10
- margin-inline-end: calc(var(--pf-v6-c-page__main-section--PaddingRight) * -2);
11
- padding-block-start: var(--pf-v6-global--spacer--md);
12
- padding-block-end: var(--pf-v6-global--spacer--md);
13
- padding-inline-start: var(--pf-v6-global--spacer--md);
8
+ margin-block-end: var(--pf-t--global--spacer--md);
9
+ margin-inline-start: calc(var(--pf-v6-c-page__main-section--PaddingInlineStart) * -1);
10
+ margin-inline-end: calc(var(--pf-v6-c-page__main-section--PaddingInlineEnd) * -2);
11
+ padding-block-start: var(--pf-t--global--spacer--md);
12
+ padding-block-end: var(--pf-t--global--spacer--md);
13
+ padding-inline-start: var(--pf-t--global--spacer--md);
14
14
  padding-inline-end: 0;
15
- box-shadow: var(--pf-v6-global--BoxShadow--lg-bottom);
15
+ box-shadow: var(--pf-t--global--box-shadow--lg--bottom);
16
16
  }
17
17
 
18
18
  .ws-toc.pf-m-expanded {
19
- box-shadow: var(--pf-v6-global--BoxShadow--sm-bottom)
19
+ box-shadow: var(--pf-t--global--box-shadow--sm--bottom)
20
+ }
21
+
22
+ .ws-toc .pf-v6-c-jump-links__toggle {
23
+ background-color: var(--pf-t--global--background--color--secondary--default);
20
24
  }
21
25
 
22
26
  /* Mobile jumplinks */
23
27
  @media (max-width: 1450px) {
24
28
  .ws-toc.pf-m-expanded .pf-v6-c-jump-links__main {
25
29
  max-height: 65vh;
26
- overflow: auto;
30
+ overflow-y:auto;
27
31
  }
28
32
 
29
33
  .ws-toc .pf-v6-c-jump-links__header {
30
34
  position: sticky;
31
35
  top: 0;
32
- background-color: var(--pf-v6-global--BackgroundColor--200);
33
36
  z-index: 2;
34
37
  }
35
38
  }
@@ -45,14 +48,14 @@
45
48
 
46
49
  @media (min-width: 1451px) {
47
50
  .ws-toc {
48
- width: 280px;
51
+ width: 260px;
49
52
  max-height: calc(100vh - 76px);
50
53
  overflow-y: auto;
51
54
  /* Hide TOC scrollbar IE, Edge & Firefox */
52
55
  -ms-overflow-style: none;
53
56
  scrollbar-width: none;
54
57
  order: 1;
55
- padding: 0 var(--pf-v6-global--spacer--lg) var(--pf-v6-global--spacer--lg) var(--pf-v6-global--spacer--2xl);
58
+ padding: 0 var(--pf-t--global--spacer--lg) var(--pf-t--global--spacer--lg) var(--pf-t--global--spacer--2xl);
56
59
  flex-grow: 1;
57
60
  background: none;
58
61
  margin: 0;
@@ -64,19 +67,7 @@
64
67
  }
65
68
  }
66
69
 
67
- /* .ws-toc-link { */
68
- .ws-toc-item .pf-v6-c-jump-links__link {
69
- position: relative;
70
- display: block;
71
- color: var(--ws-toc-link--Color, var(--pf-v6-global--Color--300));
72
- font-size: var(--pf-v6-global--FontSize--sm);
73
- margin: -4px 0;
74
- }
75
-
76
- .ws-toc-sublist > .ws-toc-item:first-child .pf-v6-c-jump-links__link {
77
- margin-top: 0;
78
- }
79
-
80
- .ws-toc-item.pf-m-current .pf-v6-c-jump-links__link::before {
81
- z-index: 1;
70
+ .ws-toc-item .pf-m-link {
71
+ text-wrap: wrap;
72
+ text-align: left;
82
73
  }
@@ -1,5 +1,9 @@
1
1
  import React from 'react';
2
- import { JumpLinks, JumpLinksItem, JumpLinksList } from '@patternfly/react-core';
2
+ import {
3
+ JumpLinks,
4
+ JumpLinksItem,
5
+ JumpLinksList,
6
+ } from '@patternfly/react-core';
3
7
  import { trackEvent } from '../../helpers';
4
8
 
5
9
  export const TableOfContents = ({ items }) => {
@@ -9,15 +13,17 @@ export const TableOfContents = ({ items }) => {
9
13
  const [stickyNavHeight, setStickyNavHeight] = React.useState(0);
10
14
 
11
15
  React.useEffect(() => {
12
- if (document.getElementById("ws-sticky-nav-tabs")) {
13
- setStickyNavHeight(document.getElementById("ws-sticky-nav-tabs").offsetHeight);
16
+ if (document.getElementById('ws-sticky-nav-tabs')) {
17
+ setStickyNavHeight(
18
+ document.getElementById('ws-sticky-nav-tabs').offsetHeight
19
+ );
14
20
  }
15
- }, [])
21
+ }, []);
16
22
 
17
23
  const updateWidth = () => {
18
24
  const { innerWidth } = window;
19
25
  innerWidth !== width && setWidth(innerWidth);
20
- }
26
+ };
21
27
  let jumpLinksItems = [];
22
28
  let wasSublistRendered = false;
23
29
 
@@ -27,14 +33,20 @@ export const TableOfContents = ({ items }) => {
27
33
  <>
28
34
  {item.text}
29
35
  <JumpLinksList>
30
- {nextItemArr.map(curItem => (
36
+ {nextItemArr.map((curItem) => (
31
37
  <JumpLinksItem
32
38
  key={curItem.id}
33
39
  href={`#${curItem.id}`}
34
40
  className="ws-toc-item"
35
41
  onKeyDown={updateWidth}
36
42
  onMouseDown={updateWidth}
37
- onClick={() => trackEvent('jump_link_click', 'click_event', curItem.id.toUpperCase())}
43
+ onClick={() =>
44
+ trackEvent(
45
+ 'jump_link_click',
46
+ 'click_event',
47
+ curItem.id.toUpperCase()
48
+ )
49
+ }
38
50
  >
39
51
  {curItem.text}
40
52
  </JumpLinksItem>
@@ -42,7 +54,7 @@ export const TableOfContents = ({ items }) => {
42
54
  </JumpLinksList>
43
55
  </>
44
56
  );
45
- }
57
+ };
46
58
 
47
59
  const renderJumpLinksItems = () => {
48
60
  items.forEach((item, index) => {
@@ -53,18 +65,28 @@ export const TableOfContents = ({ items }) => {
53
65
  return;
54
66
  }
55
67
  if (!Array.isArray(nextItem) && Array.isArray(item)) {
56
- {item.map(curItem => jumpLinksItems.push(
57
- <JumpLinksItem
58
- key={curItem.id}
59
- href={`#${curItem.id}`}
60
- className="ws-toc-item"
61
- onKeyDown={updateWidth}
62
- onMouseDown={updateWidth}
63
- onClick={() => trackEvent('jump_link_click', 'click_event', curItem.id.toUpperCase())}
64
- >
65
- {curItem.text}
66
- </JumpLinksItem>
67
- ))}
68
+ {
69
+ item.map((curItem) =>
70
+ jumpLinksItems.push(
71
+ <JumpLinksItem
72
+ key={curItem.id}
73
+ href={`#${curItem.id}`}
74
+ className="ws-toc-item"
75
+ onKeyDown={updateWidth}
76
+ onMouseDown={updateWidth}
77
+ onClick={() =>
78
+ trackEvent(
79
+ 'jump_link_click',
80
+ 'click_event',
81
+ curItem.id.toUpperCase()
82
+ )
83
+ }
84
+ >
85
+ {curItem.text}
86
+ </JumpLinksItem>
87
+ )
88
+ );
89
+ }
68
90
  } else {
69
91
  jumpLinksItems.push(
70
92
  <JumpLinksItem
@@ -73,27 +95,35 @@ export const TableOfContents = ({ items }) => {
73
95
  className="ws-toc-item"
74
96
  onKeyDown={updateWidth}
75
97
  onMouseDown={updateWidth}
76
- onClick={() => trackEvent('jump_link_click', 'click_event', item.id.toUpperCase())}
98
+ onClick={() =>
99
+ trackEvent(
100
+ 'jump_link_click',
101
+ 'click_event',
102
+ item.id.toUpperCase()
103
+ )
104
+ }
77
105
  >
78
- { Array.isArray(nextItem) ? renderSublist(item, nextItem) : item.text }
106
+ {Array.isArray(nextItem)
107
+ ? renderSublist(item, nextItem)
108
+ : item.text}
79
109
  </JumpLinksItem>
80
110
  );
81
111
  }
82
- })
112
+ });
83
113
  return jumpLinksItems;
84
- }
114
+ };
85
115
 
86
116
  return (
87
117
  <JumpLinks
88
118
  label="Table of contents"
89
119
  isVertical
90
- scrollableSelector="#ws-page-main"
120
+ scrollableSelector=".pf-v6-c-page__main-container"
91
121
  className="ws-toc"
92
- style={{ 'top': stickyNavHeight }}
122
+ style={{ top: stickyNavHeight }}
93
123
  offset={width > 1450 ? 108 + stickyNavHeight : 148 + stickyNavHeight}
94
124
  expandable={{ default: 'expandable', '2xl': 'nonExpandable' }}
95
125
  >
96
- { renderJumpLinksItems() }
126
+ {renderJumpLinksItems()}
97
127
  </JumpLinks>
98
128
  );
99
- }
129
+ };
@@ -8,43 +8,8 @@
8
8
  flex: 1;
9
9
  }
10
10
 
11
- .ws-switcher-divider {
12
- padding: 0 var(--pf-v6-global--spacer--md);
13
- }
14
-
15
- @media (min-width: 1200px) {
16
- .ws-page-sidebar {
17
- box-shadow: none !important;
18
- }
19
- }
20
-
21
- .ws-page-sidebar > .pf-v6-c-page__sidebar-body {
22
- padding-top: var(--pf-v6-global--spacer--md);
23
- }
24
-
25
11
  /* Search */
26
12
  #algolia-autocomplete-listbox-0 {
27
13
  /* Fix search results overflowing page */
28
14
  min-width: 480px !important;
29
15
  }
30
- .ws-global-search.pf-v6-c-input-group {
31
- /* remove white background on dark Masthead */
32
- --pf-v6-c-input-group--BackgroundColor: none;
33
- }
34
-
35
- /* For tiny (200px) viewports */
36
- .ws-masthead .pf-v6-c-toolbar__item {
37
- min-width: 0;
38
- }
39
-
40
- .ws-masthead .pf-v6-c-switch {
41
- align-items: center;
42
- --pf-v6-c-switch__input--not-checked__label--Color: var(--pf-v6-global--Color--100);
43
- --pf-v6-c-switch__input--checked__label--Color: var(--pf-v6-global--Color--100);
44
- }
45
-
46
- .ws-masthead .pf-v6-c-toggle-group {
47
- --pf-v6-c-toggle-group__button--m-selected--BackgroundColor: var(--pf-v6-global--palette--blue-400);
48
- --pf-v6-c-toggle-group__button--focus--BackgroundColor: transparent;
49
- --pf-v6-c-toggle-group__button--hover--BackgroundColor: transparent;
50
- }