@patternfly/documentation-framework 2.0.0-alpha.6 → 2.0.0-alpha.60

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 (55) hide show
  1. package/CHANGELOG.md +504 -0
  2. package/app.js +12 -12
  3. package/components/autoLinkHeader/autoLinkHeader.css +2 -2
  4. package/components/autoLinkHeader/autoLinkHeader.js +18 -13
  5. package/components/cssVariables/cssSearch.js +3 -4
  6. package/components/cssVariables/cssVariables.css +4 -4
  7. package/components/cssVariables/cssVariables.js +83 -84
  8. package/components/example/example.css +29 -29
  9. package/components/example/example.js +34 -6
  10. package/components/footer/footer.css +16 -16
  11. package/components/footer/footer.js +13 -13
  12. package/components/functionsTable/functionsTable.js +57 -0
  13. package/components/gdprBanner/gdprBanner.css +2 -2
  14. package/components/gdprBanner/gdprBanner.js +3 -3
  15. package/components/inlineAlert/inlineAlert.js +1 -1
  16. package/components/propsTable/propsTable.js +85 -79
  17. package/components/sectionGallery/TextSummary.js +31 -0
  18. package/components/sectionGallery/sectionDataListLayout.js +49 -0
  19. package/components/sectionGallery/sectionGallery.css +53 -0
  20. package/components/sectionGallery/sectionGallery.js +76 -0
  21. package/components/sectionGallery/sectionGalleryLayout.js +39 -0
  22. package/components/sectionGallery/sectionGalleryToolbar.js +38 -0
  23. package/components/sectionGallery/sectionGalleryWrapper.js +105 -0
  24. package/components/sideNav/sideNav.css +12 -12
  25. package/components/sideNav/sideNav.js +41 -13
  26. package/components/tableOfContents/tableOfContents.css +17 -17
  27. package/helpers/codesandbox.js +2 -2
  28. package/helpers/getTitle.js +2 -2
  29. package/layouts/sideNavLayout/sideNavLayout.css +7 -11
  30. package/layouts/sideNavLayout/sideNavLayout.js +57 -40
  31. package/package.json +28 -25
  32. package/pages/404/404.css +2 -2
  33. package/pages/404/index.js +1 -1
  34. package/pages/global-css-variables.md +16 -16
  35. package/routes.js +20 -8
  36. package/scripts/cli/build.js +6 -0
  37. package/scripts/cli/cli.js +2 -0
  38. package/scripts/cli/generate.js +2 -2
  39. package/scripts/cli/start.js +6 -8
  40. package/scripts/md/parseMD.js +46 -11
  41. package/scripts/md/styled-tags.js +8 -4
  42. package/scripts/tsDocgen.js +119 -91
  43. package/scripts/typeDocGen.js +209 -0
  44. package/scripts/webpack/webpack.base.config.js +34 -32
  45. package/scripts/webpack/webpack.client.config.js +11 -8
  46. package/scripts/webpack/webpack.server.config.js +8 -5
  47. package/scripts/writeScreenshots.js +3 -3
  48. package/templates/html.ejs +2 -4
  49. package/templates/mdx.css +156 -161
  50. package/templates/mdx.js +122 -51
  51. package/templates/patternfly-docs/content/extensions/extension/design-guidelines/design-guidelines.md +2 -0
  52. package/templates/patternfly-docs/content/extensions/extension/examples/basic.md +2 -0
  53. package/versions.json +29 -9
  54. package/components/topNav/topNav.css +0 -30
  55. package/pages/red-hat-font.md +0 -40
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Link } from '../link/link';
3
- import { Nav, NavList, NavExpandable, PageContextConsumer, capitalize } from '@patternfly/react-core';
3
+ import { Label, Nav, NavList, NavExpandable, PageContextConsumer, capitalize, Flex, FlexItem } from '@patternfly/react-core';
4
4
  import { css } from '@patternfly/react-styles';
5
5
  import { Location } from '@reach/router';
6
6
  import { makeSlug } from '../../helpers';
@@ -12,26 +12,39 @@ const getIsActive = (location, section, subsection = null) => {
12
12
  return location.pathname.startsWith(`${process.env.pathPrefix}${slug}`);
13
13
  }
14
14
 
15
- const NavItem = ({ text, href }) => {
15
+ const defaultValue = 50;
16
+
17
+ const NavItem = ({ text, href, isDeprecated, isBeta, isDemo }) => {
16
18
  const isMobileView = window.innerWidth < Number.parseInt(globalBreakpointXl.value, 10);
17
19
  return (
18
20
  <PageContextConsumer key={href + text}>
19
21
  {({onNavToggle, isNavOpen }) => (
20
- <li key={href + text} className="pf-c-nav__item" onClick={() => isMobileView && onNavToggle()}>
22
+ <li key={href + text} className="pf-v5-c-nav__item" onClick={() => isMobileView && onNavToggle && onNavToggle()}>
21
23
  <Link
22
24
  to={href}
23
25
  getProps={({ isCurrent, href, location }) => {
24
26
  const { pathname } = location;
25
27
  return {
26
28
  className: css(
27
- 'pf-c-nav__link',
29
+ 'pf-v5-c-nav__link',
28
30
  (isCurrent || pathname.startsWith(href + '/')) && 'pf-m-current'
29
31
  )
30
32
  }}
31
33
  }
32
34
  tabIndex={isNavOpen ? undefined : -1}
33
35
  >
34
- {text}
36
+ <Flex spaceItems={{ default: 'spaceItemsSm'}}>
37
+ <FlexItem>{text}</FlexItem>
38
+ {(isBeta || isDemo || isDeprecated) && (
39
+ <FlexItem>
40
+ {isBeta && (<Label color="blue" isCompact>Beta</Label>)}
41
+ {!isBeta && isDeprecated && (<Label color="grey" isCompact>Deprecated</Label>)}
42
+ {!isBeta && !isDeprecated && isDemo && (<Label color="purple" isCompact>Demo</Label>)}
43
+ </FlexItem>
44
+ )}
45
+ </Flex>
46
+
47
+
35
48
  </Link>
36
49
  </li>
37
50
  )}
@@ -67,14 +80,29 @@ const ExpandableNav = ({groupedRoutes, location, section, subsection = null}) =>
67
80
  }}
68
81
  >
69
82
  {Object.entries(routes || {})
70
- .filter(([id, { hideNavItem }]) => !Boolean(hideNavItem) && (id !== 'isSubsection'))
71
- .map(([id, { slug, isSubsection = false }]) => ({ text: id, href: slug, isSubsection }))
72
- .sort(({ text: text1 }, { text: text2 }) => text1.localeCompare(text2))
83
+ .filter(([id, navObj]) => !Boolean(navObj.hideNavItem) && (Object.entries(navObj).length > 0))
84
+ .map(([id, { slug, isSubsection = false, sortValue = defaultValue, subsectionSortValue = defaultValue, sources }]) => ({ text: id, href: slug, isSubsection, sortValue: (isSubsection ? subsectionSortValue : sortValue), sources }))
85
+ .sort(({text: text1, sortValue: sortValue1}, {text: text2, sortValue: sortValue2}) => {
86
+ if (sortValue1 === sortValue2) {
87
+ return text1.localeCompare(text2);
88
+ }
89
+ return sortValue1 > sortValue2 ? 1 : -1;
90
+ })
73
91
  .map(navObj => navObj.isSubsection
74
- ? ExpandableNav({groupedRoutes, location, section, subsection: navObj.text})
75
- : NavItem(navObj)
76
- )
77
- }
92
+ ? ExpandableNav({groupedRoutes, location, section, subsection: navObj.text})
93
+ : NavItem({
94
+ ...navObj,
95
+ isDeprecated: navObj.href?.includes('components') && navObj.sources.some(source => (
96
+ source.source === "react-deprecated" || source.source === "html-deprecated")
97
+ && !navObj.sources.some(source => source.source === "react" || source.source === "html")
98
+ ),
99
+ isBeta: navObj.sources.some(source => source.beta),
100
+ isDemo: navObj.sources.some(source => (
101
+ source.source === "react-demos" || source.source === "html-demos")
102
+ && !navObj.sources.some(source => source.source === "react" || source.source === "html")
103
+ )
104
+ })
105
+ )}
78
106
  </NavExpandable>
79
107
  );
80
108
  }
@@ -94,7 +122,7 @@ export const SideNav = ({ groupedRoutes = {}, navItems = [] }) => {
94
122
  lastElement.scrollIntoView({ block: 'center' });
95
123
  }
96
124
  }, []);
97
-
125
+
98
126
  return (
99
127
  <Nav aria-label="Side Nav" theme="light">
100
128
  <NavList className="ws-side-nav-list">
@@ -1,39 +1,39 @@
1
1
  .ws-toc {
2
2
  align-self: flex-start;
3
3
  position: sticky;
4
- width: calc(100% + var(--pf-c-page__main-section--PaddingLeft) + var(--pf-c-page__main-section--PaddingRight));
5
- background-color: var(--pf-global--BackgroundColor--200);
4
+ width: calc(100% + var(--pf-v5-c-page__main-section--PaddingLeft) + var(--pf-v5-c-page__main-section--PaddingRight));
5
+ background-color: var(--pf-v5-global--BackgroundColor--200);
6
6
  z-index: 501;
7
- margin: calc(var(--pf-c-page__main-section--PaddingTop) * -1) calc(var(--pf-c-page__main-section--PaddingRight) * -2) var(--pf-global--spacer--md) calc(var(--pf-c-page__main-section--PaddingLeft) * -1);
8
- padding: var(--pf-global--spacer--md) 0 var(--pf-global--spacer--md) var(--pf-global--spacer--md);
9
- box-shadow: var(--pf-global--BoxShadow--lg-bottom);
7
+ margin: calc(var(--pf-v5-c-page__main-section--PaddingTop) * -1) calc(var(--pf-v5-c-page__main-section--PaddingRight) * -2) var(--pf-v5-global--spacer--md) calc(var(--pf-v5-c-page__main-section--PaddingLeft) * -1);
8
+ padding: var(--pf-v5-global--spacer--md) 0 var(--pf-v5-global--spacer--md) var(--pf-v5-global--spacer--md);
9
+ box-shadow: var(--pf-v5-global--BoxShadow--lg-bottom);
10
10
  }
11
11
 
12
12
  .ws-toc.pf-m-expanded {
13
- box-shadow: var(--pf-global--BoxShadow--sm-bottom)
13
+ box-shadow: var(--pf-v5-global--BoxShadow--sm-bottom)
14
14
  }
15
15
 
16
16
  /* Mobile jumplinks */
17
17
  @media (max-width: 1450px) {
18
- .ws-toc.pf-m-expanded .pf-c-jump-links__main {
18
+ .ws-toc.pf-m-expanded .pf-v5-c-jump-links__main {
19
19
  max-height: 65vh;
20
20
  overflow: auto;
21
21
  }
22
22
 
23
- .ws-toc .pf-c-jump-links__header {
23
+ .ws-toc .pf-v5-c-jump-links__header {
24
24
  position: sticky;
25
25
  top: 0;
26
- background-color: var(--pf-global--BackgroundColor--200);
26
+ background-color: var(--pf-v5-global--BackgroundColor--200);
27
27
  z-index: 2;
28
28
  }
29
29
  }
30
30
 
31
- .ws-toc .pf-c-jump-links__main {
31
+ .ws-toc .pf-v5-c-jump-links__main {
32
32
  scrollbar-width: none;
33
33
  }
34
34
 
35
35
  /* Hide TOC scrollbar Chrome, Safari & Opera */
36
- .ws-toc .pf-c-jump-links__main::-webkit-scrollbar {
36
+ .ws-toc .pf-v5-c-jump-links__main::-webkit-scrollbar {
37
37
  display: none;
38
38
  }
39
39
 
@@ -46,7 +46,7 @@
46
46
  -ms-overflow-style: none;
47
47
  scrollbar-width: none;
48
48
  order: 1;
49
- padding: 0 var(--pf-global--spacer--lg) var(--pf-global--spacer--lg) var(--pf-global--spacer--2xl);
49
+ padding: 0 var(--pf-v5-global--spacer--lg) var(--pf-v5-global--spacer--lg) var(--pf-v5-global--spacer--2xl);
50
50
  flex-grow: 1;
51
51
  background: none;
52
52
  margin: 0;
@@ -59,18 +59,18 @@
59
59
  }
60
60
 
61
61
  /* .ws-toc-link { */
62
- .ws-toc-item .pf-c-jump-links__link {
62
+ .ws-toc-item .pf-v5-c-jump-links__link {
63
63
  position: relative;
64
64
  display: block;
65
- color: var(--ws-toc-link--Color, var(--pf-global--Color--300));
66
- font-size: var(--pf-global--FontSize--sm);
65
+ color: var(--ws-toc-link--Color, var(--pf-v5-global--Color--300));
66
+ font-size: var(--pf-v5-global--FontSize--sm);
67
67
  margin: -4px 0;
68
68
  }
69
69
 
70
- .ws-toc-sublist > .ws-toc-item:first-child .pf-c-jump-links__link {
70
+ .ws-toc-sublist > .ws-toc-item:first-child .pf-v5-c-jump-links__link {
71
71
  margin-top: 0;
72
72
  }
73
73
 
74
- .ws-toc-item.pf-m-current .pf-c-jump-links__link::before {
74
+ .ws-toc-item.pf-m-current .pf-v5-c-jump-links__link::before {
75
75
  z-index: 1;
76
76
  }
@@ -18,7 +18,7 @@ const getStaticParams = (title, html) => {
18
18
  'index.html': {
19
19
  content: `
20
20
  <!DOCTYPE html>
21
- <html lang="en" class="pf-m-redhat-font">
21
+ <html lang="en">
22
22
  <head>
23
23
  <meta charset="utf-8" />
24
24
  <meta name="viewport" content="width=device-width, initial-scale=1" />
@@ -184,7 +184,7 @@ function getReactParams(title, code, scope, lang, relativeImports, relPath, sour
184
184
  files: {
185
185
  'index.html': {
186
186
  content: `<!DOCTYPE html>
187
- <html lang="en" class="pf-m-redhat-font">
187
+ <html lang="en">
188
188
  <head>
189
189
  <meta charset="utf-8" />
190
190
  <meta name="viewport" content="width=device-width, initial-scale=1" />
@@ -1,5 +1,5 @@
1
1
  module.exports = {
2
2
  getTitle(title) {
3
- return `PatternFly 4${title ? ` • ${title}` : ''}`;
3
+ return `PatternFly${title ? ` • ${title}` : ''}`;
4
4
  }
5
- }
5
+ }
@@ -1,5 +1,5 @@
1
1
  /* Page layout */
2
- /* tells .pf-c-page to consume the available space left over from the banners/footers */
2
+ /* tells .pf-v5-c-page to consume the available space left over from the banners/footers */
3
3
  #ws-router {
4
4
  display: flex;
5
5
  flex-direction: column;
@@ -9,11 +9,7 @@
9
9
  }
10
10
 
11
11
  .ws-switcher-divider {
12
- padding: 0 var(--pf-global--spacer--md);
13
- }
14
-
15
- .ws-patternfly-3 > svg {
16
- margin-left: var(--pf-global--spacer--sm);
12
+ padding: 0 var(--pf-v5-global--spacer--md);
17
13
  }
18
14
 
19
15
  @media (min-width: 1200px) {
@@ -22,8 +18,8 @@
22
18
  }
23
19
  }
24
20
 
25
- .ws-page-sidebar > .pf-c-page__sidebar-body {
26
- padding-top: var(--pf-global--spacer--md);
21
+ .ws-page-sidebar > .pf-v5-c-page__sidebar-body {
22
+ padding-top: var(--pf-v5-global--spacer--md);
27
23
  }
28
24
 
29
25
  /* Search */
@@ -31,12 +27,12 @@
31
27
  /* Fix search results overflowing page */
32
28
  min-width: 480px !important;
33
29
  }
34
- .ws-global-search.pf-c-input-group {
30
+ .ws-global-search.pf-v5-c-input-group {
35
31
  /* remove white background on dark Masthead */
36
- --pf-c-input-group--BackgroundColor: none;
32
+ --pf-v5-c-input-group--BackgroundColor: none;
37
33
  }
38
34
 
39
35
  /* For tiny (200px) viewports */
40
- .ws-masthead .pf-c-toolbar__item {
36
+ .ws-masthead .pf-v5-c-toolbar__item {
41
37
  min-width: 0;
42
38
  }
@@ -3,17 +3,19 @@ import {
3
3
  Button,
4
4
  Page,
5
5
  PageSidebar,
6
+ PageSidebarBody,
6
7
  Brand,
7
8
  Dropdown,
8
- DropdownToggle,
9
9
  DropdownItem,
10
10
  DropdownGroup,
11
+ DropdownList,
11
12
  Divider,
12
13
  Masthead,
13
14
  MastheadToggle,
14
15
  MastheadMain,
15
16
  MastheadContent,
16
17
  MastheadBrand,
18
+ MenuToggle,
17
19
  PageToggleButton,
18
20
  Toolbar,
19
21
  ToolbarGroup,
@@ -23,7 +25,6 @@ import {
23
25
  Switch,
24
26
  SearchInput
25
27
  } from '@patternfly/react-core';
26
- import ExternalLinkAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon';
27
28
  import BarsIcon from '@patternfly/react-icons/dist/esm/icons/bars-icon';
28
29
  import GithubIcon from '@patternfly/react-icons/dist/esm/icons/github-icon';
29
30
  import { SideNav, TopNav, GdprBanner } from '../../components';
@@ -48,14 +49,9 @@ const HeaderTools = ({
48
49
  const [isSearchExpanded, setIsSearchExpanded] = React.useState(false);
49
50
 
50
51
  const getDropdownItem = (version, isLatest = false) => (
51
- <DropdownItem
52
- key={version.name}
53
- component={
54
- <a href={isLatest ? '/' : `/${version.name}`}>
55
- {`Release ${version.name}`}
56
- </a>
57
- }
58
- />
52
+ <DropdownItem itemId={version.name} key={version.name} to={isLatest ? '/' : `/${version.name}`}>
53
+ {`Release ${version.name}`}
54
+ </DropdownItem>
59
55
  );
60
56
 
61
57
  const onChange = (_evt, value) => {
@@ -69,7 +65,7 @@ const HeaderTools = ({
69
65
  useEffect(() => {
70
66
  // reattach algolia to input each time search is expanded
71
67
  if (hasSearch && isSearchExpanded) {
72
- attachDocSearch(algolia, '.ws-global-search .pf-c-text-input-group__text-input', 1000);
68
+ attachDocSearch(algolia, '.ws-global-search .pf-v5-c-text-input-group__text-input', 1000);
73
69
  }
74
70
  }, [isSearchExpanded])
75
71
 
@@ -82,13 +78,13 @@ const HeaderTools = ({
82
78
  </ToolbarItem>
83
79
  )}
84
80
  <ToolbarGroup
85
- alignment={{ default: 'alignRight' }}
81
+ align={{ default: 'alignRight' }}
86
82
  spaceItems={{ default: 'spacerNone', md: 'spacerMd' }}
87
83
  >
88
84
  {hasDarkThemeSwitcher && (
89
85
  <ToolbarItem>
90
86
  <Switch id="ws-theme-switch" label="Dark theme" defaultChecked={false} onChange={() =>
91
- document.querySelector('html').classList.toggle('pf-theme-dark')} />
87
+ document.querySelector('html').classList.toggle('pf-v5-theme-dark')} />
92
88
  </ToolbarItem>
93
89
  )}
94
90
  {hasSearch && (
@@ -117,42 +113,60 @@ const HeaderTools = ({
117
113
  {hasVersionSwitcher && (
118
114
  <ToolbarItem>
119
115
  <Dropdown
120
- isFullHeight
121
116
  onSelect={() => setDropdownOpen(!isDropdownOpen)}
117
+ onOpenChange={(isOpen) => setDropdownOpen(isOpen)}
122
118
  isOpen={isDropdownOpen}
123
- toggle={(
124
- <DropdownToggle
125
- onToggle={() => setDropdownOpen(!isDropdownOpen)}
119
+ toggle={(toggleRef) => (
120
+ <MenuToggle
121
+ isFullHeight
122
+ ref={toggleRef}
123
+ onClick={() => setDropdownOpen(!isDropdownOpen)}
124
+ isExpanded={isDropdownOpen}
126
125
  >
127
126
  Release {initialVersion.name}
128
- </DropdownToggle>
127
+ </MenuToggle>
129
128
  )}
130
- dropdownItems={[
131
- <DropdownGroup key="latest" label="Latest">
129
+ >
130
+ <DropdownGroup key="Latest" label="Latest">
131
+ <DropdownList>
132
132
  {getDropdownItem(latestVersion, true)}
133
- </DropdownGroup>,
134
- <DropdownGroup key="Previous" label="Previous releases">
133
+ </DropdownList>
134
+ </DropdownGroup>
135
+ <DropdownGroup key="Previous releases" label="Previous releases">
136
+ <DropdownList>
135
137
  {Object.values(versions.Releases)
136
138
  .filter(version => !version.hidden && !version.latest)
137
139
  .slice(0,3)
138
140
  .map(version => getDropdownItem(version))}
139
- </DropdownGroup>,
140
- <Divider key="divider" className="ws-switcher-divider"/>,
141
- <DropdownItem
142
- key="PatternFly 3"
143
- className="ws-patternfly-3"
144
- target="_blank"
145
- href="https://pf3.patternfly.org/"
146
- >
147
- PatternFly 3
148
- <ExternalLinkAltIcon />
149
- </DropdownItem>
150
- ]}
151
- />
141
+ </DropdownList>
142
+ </DropdownGroup>
143
+ <Divider key="divider" className="ws-switcher-divider"/>
144
+ <DropdownGroup key="Previous versions" label="Previous versions">
145
+ <DropdownList>
146
+ <DropdownItem
147
+ key="PatternFly 4"
148
+ className="ws-patternfly-3"
149
+ isExternalLink
150
+ to="http://v4-archive.patternfly.org/v4/"
151
+ itemId="patternfly-4"
152
+ >
153
+ PatternFly 4
154
+ </DropdownItem>
155
+ <DropdownItem
156
+ key="PatternFly 3"
157
+ className="ws-patternfly-3"
158
+ isExternalLink
159
+ to="https://pf3.patternfly.org/"
160
+ itemId="patternfly-3"
161
+ >
162
+ PatternFly 3
163
+ </DropdownItem>
164
+ </DropdownList>
165
+ </DropdownGroup>
166
+ </Dropdown>
152
167
  </ToolbarItem>
153
168
  )}
154
- </ToolbarGroup>
155
- </ToolbarContent>
169
+ </ToolbarGroup></ToolbarContent>
156
170
  </Toolbar>
157
171
  );
158
172
  }
@@ -164,7 +178,7 @@ export function attachDocSearch(algolia, inputSelector, timeout) {
164
178
  inputSelector,
165
179
  autocompleteOptions: {
166
180
  hint: false,
167
- appendTo: `.ws-global-search .pf-c-text-input-group`,
181
+ appendTo: `.ws-global-search .pf-v5-c-text-input-group`,
168
182
  },
169
183
  debug: process.env.NODE_ENV !== 'production',
170
184
  ...algolia
@@ -205,8 +219,11 @@ export const SideNavLayout = ({ children, groupedRoutes, navOpen: navOpenProp })
205
219
  <PageSidebar
206
220
  className="ws-page-sidebar"
207
221
  theme="light"
208
- nav={<SideNav navItems={sideNavItems} groupedRoutes={groupedRoutes} />}
209
- />
222
+ >
223
+ <PageSidebarBody>
224
+ <SideNav navItems={sideNavItems} groupedRoutes={groupedRoutes} />
225
+ </PageSidebarBody>
226
+ </PageSidebar>
210
227
  );
211
228
 
212
229
  const Header = (
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": "2.0.0-alpha.6",
4
+ "version": "2.0.0-alpha.60",
5
5
  "author": "Red Hat",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -22,19 +22,19 @@
22
22
  "@babel/preset-env": "7.18.2",
23
23
  "@mdx-js/util": "1.6.16",
24
24
  "@patternfly/ast-helpers": "^0.4.57",
25
- "@reach/router": "1.3.4",
25
+ "@reach/router": "npm:@gatsbyjs/reach-router@1.3.9",
26
26
  "autoprefixer": "9.8.6",
27
- "babel-loader": "8.2.5",
27
+ "babel-loader": "9.1.2",
28
28
  "camelcase-css": "2.0.1",
29
29
  "chokidar": "3.5.3",
30
- "clean-webpack-plugin": "3.0.0",
30
+ "clean-webpack-plugin": "4.0.0",
31
31
  "codesandbox": "2.2.0",
32
32
  "commander": "4.1.1",
33
- "copy-webpack-plugin": "6.1.0",
34
- "css-loader": "4.3.0",
33
+ "copy-webpack-plugin": "11.0.0",
34
+ "css-loader": "6.7.3",
35
35
  "detab": "2.0.3",
36
36
  "express": "4.18.1",
37
- "file-loader": "6.1.0",
37
+ "file-loader": "6.2.0",
38
38
  "file-saver": "1.3.8",
39
39
  "fs-extra": "9.0.1",
40
40
  "glob": "8.0.3",
@@ -42,51 +42,54 @@
42
42
  "hast-to-hyperscript": "9.0.0",
43
43
  "hast-util-to-text": "2.0.0",
44
44
  "html-formatter": "0.1.9",
45
- "html-webpack-plugin": "4.4.1",
45
+ "html-webpack-plugin": "5.5.0",
46
46
  "js-yaml": "3.14.0",
47
47
  "mdast-util-to-hast": "9.1.1",
48
48
  "mdurl": "1.0.1",
49
- "mini-css-extract-plugin": "1.3.9",
50
- "monaco-editor": "0.21.3",
51
- "monaco-editor-webpack-plugin": "2.1.0",
52
- "null-loader": "4.0.0",
49
+ "mini-css-extract-plugin": "2.7.5",
50
+ "monaco-editor": "0.34.1",
51
+ "monaco-editor-webpack-plugin": "7.0.1",
52
+ "null-loader": "4.0.1",
53
53
  "parse-entities": "2.0.0",
54
+ "path-browserify": "1.0.1",
54
55
  "postcss": "7.0.32",
55
- "postcss-loader": "4.2.0",
56
+ "postcss-loader": "7.1.0",
57
+ "process": "^0.11.10",
56
58
  "puppeteer": "14.3.0",
57
59
  "puppeteer-cluster": "0.23.0",
58
60
  "react-docgen": "5.3.1",
59
- "react-monaco-editor": "0.48.0",
60
- "react-ssr-prepass": "1.2.1",
61
+ "react-monaco-editor": "^0.51.0",
62
+ "react-ssr-prepass": "1.5.0",
61
63
  "remark-footnotes": "1.0.0",
62
64
  "remark-frontmatter": "2.0.0",
63
65
  "remark-mdx": "2.0.0-next.8",
64
66
  "remark-mdxjs": "2.0.0-next.8",
65
67
  "remark-parse": "8.0.3",
66
68
  "remark-squeeze-paragraphs": "4.0.0",
67
- "responsive-loader": "2.1.1",
69
+ "responsive-loader": "3.1.2",
68
70
  "sharp": "0.30.6",
69
71
  "style-to-object": "0.3.0",
70
72
  "to-vfile": "6.1.0",
73
+ "typedoc": "0.22.X",
71
74
  "typescript": "4.3.5",
72
75
  "unified": "9.1.0",
73
76
  "unist-util-remove": "2.0.0",
74
77
  "unist-util-visit": "2.0.3",
75
78
  "url-loader": "4.1.0",
76
79
  "vfile-reporter": "6.0.1",
77
- "webpack": "4.44.1",
78
- "webpack-bundle-analyzer": "3.8.0",
79
- "webpack-cli": "3.3.12",
80
- "webpack-dev-server": "3.11.0",
80
+ "webpack": "5.76.3",
81
+ "webpack-bundle-analyzer": "4.8.0",
82
+ "webpack-cli": "5.0.1",
83
+ "webpack-dev-server": "4.13.1",
81
84
  "webpack-merge": "5.8.0"
82
85
  },
83
86
  "peerDependencies": {
84
- "@patternfly/patternfly": "^5.0.0-alpha.13",
85
- "@patternfly/react-code-editor": "^5.0.0-alpha.7",
86
- "@patternfly/react-core": "^5.0.0-alpha.7",
87
- "@patternfly/react-table": "^5.0.0-alpha.7",
87
+ "@patternfly/patternfly": "^5.0.0-alpha.64",
88
+ "@patternfly/react-code-editor": "^5.0.0-alpha.116",
89
+ "@patternfly/react-core": "^5.0.0-alpha.115",
90
+ "@patternfly/react-table": "^5.0.0-alpha.117",
88
91
  "react": "^17.0.0 || ^18.0.0",
89
92
  "react-dom": "^17.0.0 || ^18.0.0"
90
93
  },
91
- "gitHead": "40c8dbde006b01d629c42bd2a1719617e8ef86a8"
94
+ "gitHead": "d4c33a6c2320dd6684acbd6423fa69298f3eef6b"
92
95
  }
package/pages/404/404.css CHANGED
@@ -5,12 +5,12 @@
5
5
  }
6
6
 
7
7
  .ws-404-card-header {
8
- padding: var(--pf-global--spacer--lg);
8
+ padding: var(--pf-v5-global--spacer--lg);
9
9
  }
10
10
 
11
11
  div.ws-404-button-wrapper {
12
12
  width: 100%;
13
13
  display: flex;
14
14
  justify-content: center;
15
- padding: var(--pf-global--spacer--xl);
15
+ padding: var(--pf-v5-global--spacer--xl);
16
16
  }
@@ -73,7 +73,7 @@ const Page404 = () => {
73
73
  <Title headingLevel="h1" size="2xl">
74
74
  404: That page no longer exists
75
75
  </Title>
76
- <p style={{ marginTop: 'var(--pf-global--spacer--sm)' }}>
76
+ <p style={{ marginTop: 'var(--pf-v5-global--spacer--sm)' }}>
77
77
  Another page might have the information you need, so try searching PatternFly.
78
78
  </p>
79
79
  <EmptyStateBody>
@@ -16,7 +16,7 @@ Global variables define and enforce global style elements (like values for color
16
16
 
17
17
  Global variables follow this formula:
18
18
 
19
- `--pf-global--concept--PropertyCamelCase--modifier--state`
19
+ `--pf-v5-global--concept--PropertyCamelCase--modifier--state`
20
20
 
21
21
  Where...
22
22
 
@@ -30,8 +30,8 @@ Example:
30
30
  ```css
31
31
  :root {
32
32
  /* Default & hovered link colors */
33
- --pf-global--link--Color: #06c;
34
- --pf-global--link--Color--hover: #004080;
33
+ --pf-v5-global--link--Color: #06c;
34
+ --pf-v5-global--link--Color--hover: #004080;
35
35
  }
36
36
  ```
37
37
 
@@ -44,33 +44,33 @@ Component variables are used to define custom properties at the component-level.
44
44
 
45
45
  Component variables follow this formula:
46
46
 
47
- `--pf-c-block__element--modifier--state--breakpoint--['child'|tag|c-component]pseudo-element--PropertyCamelCase`
47
+ `--pf-v5-c-block__element--modifier--state--breakpoint--['child'|tag|c-component]pseudo-element--PropertyCamelCase`
48
48
 
49
49
  Where...
50
50
 
51
- - `pf-c-block` refers to the block, usually the component or layout name, like `pf-c-alert`.
51
+ - `pf-v5-c-block` refers to the block, usually the component or layout name, like `pf-v5-c-alert`.
52
52
  - `__element` refers to the element inside of the block, like `__title`.
53
53
  - `modifier` is prefixed with`-m` and refers to a modifier class such as `.pf-m-danger`.
54
54
  - `state` is something like `hover` or `active`.
55
- - `breakpoint` is a media query breakpoint such as `sm` for `$pf-global--breakpoint--xs`.
55
+ - `breakpoint` is a media query breakpoint such as `sm` for `$pf-v5-global--breakpoint--xs`.
56
56
  - `pseudo-element` is either `before` or `after`.
57
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
58
 
59
59
  Example:
60
60
  - Note: component variables are scoped to the top-level component selector
61
61
  ```css
62
- .pf-c-button {
62
+ .pf-v5-c-button {
63
63
  /* Default, primary, and primary hovered button background colors */
64
- --pf-c-button--BackgroundColor: transparent;
65
- --pf-c-button--m-primary--BackgroundColor: var(--pf-global--primary-color--100);
66
- --pf-c-button--m-primary--hover--BackgroundColor: var(--pf-global--primary-color--200);
64
+ --pf-v5-c-button--BackgroundColor: transparent;
65
+ --pf-v5-c-button--m-primary--BackgroundColor: var(--pf-v5-global--primary-color--100);
66
+ --pf-v5-c-button--m-primary--hover--BackgroundColor: var(--pf-v5-global--primary-color--200);
67
67
  }
68
68
  ```
69
69
 
70
70
  <br/>
71
71
  Component variables are listed at the bottom of each component page (for example, [button css variables](/components/button#css-variables)).
72
72
 
73
- Note that all component variables are declared at the top component level (for example, `.pf-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.
73
+ Note that all component variables are declared at the top component level (for example, `.pf-v5-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
74
 
75
75
  ![Component variable mapping](./img/component-variable-mapping.png)
76
76
 
@@ -78,25 +78,25 @@ Note that all component variables are declared at the top component level (for e
78
78
 
79
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
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-global—breakpoint—[breakpoint]`.
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-v5-global—breakpoint—[breakpoint]`.
82
82
 
83
83
  ### Using the variable system
84
84
 
85
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
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-c-button`), as these overrides will cascade down to children elements accordingly.
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-v5-c-button`), as these overrides will cascade down to children elements accordingly.
88
88
 
89
89
  Example:
90
90
  - Change the global primary color to red, but keep the original primary blue color as the background for primary buttons.
91
91
  ```css
92
92
  /* Override global primary color 100 to red */
93
93
  :root {
94
- --pf-global--primary-color--100: var(--pf-global--palette--red-400);
94
+ --pf-v5-global--primary-color--100: var(--pf-v5-global--palette--red-400);
95
95
  }
96
96
 
97
97
  /* Override the above override for only the primary button background color */
98
- .pf-c-button {
99
- --pf-c-button--m-primary--BackgroundColor: var(--pf-global--palette--blue-400);
98
+ .pf-v5-c-button {
99
+ --pf-v5-c-button--m-primary--BackgroundColor: var(--pf-v5-global--palette--blue-400);
100
100
  }
101
101
  ```
102
102