@patternfly/documentation-framework 2.0.0-alpha.31 → 2.0.0-alpha.33

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.
@@ -1,30 +1,30 @@
1
1
  /* Don't bother with specifity war */
2
- .ws-top-nav-link.pf-c-nav__link {
3
- color: var(--pf-global--BackgroundColor--light-100);
2
+ .ws-top-nav-link.pf-v5-c-nav__link {
3
+ color: var(--pf-v5-global--BackgroundColor--light-100);
4
4
  }
5
5
 
6
- .ws-top-nav-link.pf-c-nav__link:active,
7
- .ws-top-nav-link.pf-c-nav__link:hover,
8
- .ws-top-nav-link.pf-c-nav__link.pf-m-current {
9
- color: var(--pf-global--BackgroundColor--dark-100);
10
- background-color: var(--pf-global--BackgroundColor--light-100);
6
+ .ws-top-nav-link.pf-v5-c-nav__link:active,
7
+ .ws-top-nav-link.pf-v5-c-nav__link:hover,
8
+ .ws-top-nav-link.pf-v5-c-nav__link.pf-m-current {
9
+ color: var(--pf-v5-global--BackgroundColor--dark-100);
10
+ background-color: var(--pf-v5-global--BackgroundColor--light-100);
11
11
  transition: .5s;
12
12
  }
13
13
 
14
14
  /* Don't bother with specifity war */
15
- .ws-top-nav-link.pf-c-nav__link::before {
15
+ .ws-top-nav-link.pf-v5-c-nav__link::before {
16
16
  top: 0 !important;
17
17
  bottom: auto !important;
18
18
  right: 0 !important;
19
19
  left: 0 !important;
20
- border-color: var(--pf-global--link--Color--light--hover) !important;
20
+ border-color: var(--pf-v5-global--link--Color--light--hover) !important;
21
21
  transform: scaleX(0);
22
22
  }
23
23
 
24
24
  /* Animate bar growing outwards */
25
- .ws-top-nav-link.pf-c-nav__link:active::before,
26
- .ws-top-nav-link.pf-c-nav__link:hover::before,
27
- .ws-top-nav-link.pf-c-nav__link.pf-m-current::before {
25
+ .ws-top-nav-link.pf-v5-c-nav__link:active::before,
26
+ .ws-top-nav-link.pf-v5-c-nav__link:hover::before,
27
+ .ws-top-nav-link.pf-v5-c-nav__link.pf-m-current::before {
28
28
  transition: transform .5s;
29
29
  transform: scaleX(1);
30
30
  }
@@ -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,7 +9,7 @@
9
9
  }
10
10
 
11
11
  .ws-switcher-divider {
12
- padding: 0 var(--pf-global--spacer--md);
12
+ padding: 0 var(--pf-v5-global--spacer--md);
13
13
  }
14
14
 
15
15
  @media (min-width: 1200px) {
@@ -18,8 +18,8 @@
18
18
  }
19
19
  }
20
20
 
21
- .ws-page-sidebar > .pf-c-page__sidebar-body {
22
- 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);
23
23
  }
24
24
 
25
25
  /* Search */
@@ -27,12 +27,12 @@
27
27
  /* Fix search results overflowing page */
28
28
  min-width: 480px !important;
29
29
  }
30
- .ws-global-search.pf-c-input-group {
30
+ .ws-global-search.pf-v5-c-input-group {
31
31
  /* remove white background on dark Masthead */
32
- --pf-c-input-group--BackgroundColor: none;
32
+ --pf-v5-c-input-group--BackgroundColor: none;
33
33
  }
34
34
 
35
35
  /* For tiny (200px) viewports */
36
- .ws-masthead .pf-c-toolbar__item {
36
+ .ws-masthead .pf-v5-c-toolbar__item {
37
37
  min-width: 0;
38
38
  }
@@ -65,7 +65,7 @@ const HeaderTools = ({
65
65
  useEffect(() => {
66
66
  // reattach algolia to input each time search is expanded
67
67
  if (hasSearch && isSearchExpanded) {
68
- 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);
69
69
  }
70
70
  }, [isSearchExpanded])
71
71
 
@@ -84,7 +84,7 @@ const HeaderTools = ({
84
84
  {hasDarkThemeSwitcher && (
85
85
  <ToolbarItem>
86
86
  <Switch id="ws-theme-switch" label="Dark theme" defaultChecked={false} onChange={() =>
87
- document.querySelector('html').classList.toggle('pf-theme-dark')} />
87
+ document.querySelector('html').classList.toggle('pf-v5-theme-dark')} />
88
88
  </ToolbarItem>
89
89
  )}
90
90
  {hasSearch && (
@@ -178,7 +178,7 @@ export function attachDocSearch(algolia, inputSelector, timeout) {
178
178
  inputSelector,
179
179
  autocompleteOptions: {
180
180
  hint: false,
181
- appendTo: `.ws-global-search .pf-c-text-input-group`,
181
+ appendTo: `.ws-global-search .pf-v5-c-text-input-group`,
182
182
  },
183
183
  debug: process.env.NODE_ENV !== 'production',
184
184
  ...algolia
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.31",
4
+ "version": "2.0.0-alpha.33",
5
5
  "author": "Red Hat",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -84,12 +84,12 @@
84
84
  "webpack-merge": "5.8.0"
85
85
  },
86
86
  "peerDependencies": {
87
- "@patternfly/patternfly": "^5.0.0-alpha.37",
87
+ "@patternfly/patternfly": "^5.0.0-alpha.45",
88
88
  "@patternfly/react-code-editor": "^5.0.0-alpha.84",
89
89
  "@patternfly/react-core": "^5.0.0-alpha.83",
90
90
  "@patternfly/react-table": "^5.0.0-alpha.85",
91
91
  "react": "^17.0.0 || ^18.0.0",
92
92
  "react-dom": "^17.0.0 || ^18.0.0"
93
93
  },
94
- "gitHead": "46db0c1c334e7304290b8cc024bfdd40c887013b"
94
+ "gitHead": "2a61d64c7f766fa51f6501a2ff133591874434df"
95
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
 
@@ -37,4 +37,4 @@ This is a global class that can be applied to any element to enable monospaced n
37
37
 
38
38
  ### Using opt-in classes
39
39
 
40
- To opt-in to any of the new fonts (`.pf-m-redhat-updated-font`, `.pf-m-redhatmono-font`, and `.pf-m-redhatVF-font`), add the opt-in class to the `<body>` tag of your application. To opt-in to monospaced numbers globally across your application, apply `.pf-m-tabular-nums` to any element that wraps your entire application (eg, `<body>`, `<div id="root">`, `<div class="pf-c-page">`, etc). To opt-in to monospaced numbers on a particular element and its children, add the class to that element itself.
40
+ To opt-in to any of the new fonts (`.pf-m-redhat-updated-font`, `.pf-m-redhatmono-font`, and `.pf-m-redhatVF-font`), add the opt-in class to the `<body>` tag of your application. To opt-in to monospaced numbers globally across your application, apply `.pf-m-tabular-nums` to any element that wraps your entire application (eg, `<body>`, `<div id="root">`, `<div class="pf-v5-c-page">`, etc). To opt-in to monospaced numbers on a particular element and its children, add the class to that element itself.
@@ -24,10 +24,10 @@ function styledTags() {
24
24
  node.properties.className = node.properties.className || '';
25
25
  node.properties.className += node.properties.className ? ' ' : '';
26
26
  node.properties.className += `ws-${node.tagName}`;
27
- // Match pf-c-table implementation
27
+ // Match pf-v5-c-table implementation
28
28
  // https://pf4.patternfly.org/components/table/html/basic-table/
29
29
  if (node.tagName === 'table') {
30
- node.properties.className += ' pf-c-table pf-m-grid-lg pf-m-compact';
30
+ node.properties.className += ' pf-v5-c-table pf-m-grid-lg pf-m-compact';
31
31
  node.properties.role = 'grid';
32
32
  let columnHeaders = [];
33
33
  for (let child of node.children) {
@@ -11,7 +11,7 @@ sharp.cache(false);
11
11
  async function writeScreenshot({ page, data: { url, urlPrefix } }) {
12
12
  await page.goto(url);
13
13
  await page.addStyleTag({content: '*,*::before,*::after{animation-delay:-1ms !important;animation-duration:1ms !important;animation-iteration-count:1 !important;transition-duration:0s !important;transition-delay:0s !important;}'}); // disable animations/transitions so they don't interfere with screenshot tool
14
- await page.waitForSelector('.pf-u-h-100');
14
+ await page.waitForSelector('.pf-v5-u-h-100');
15
15
  const outfile = path.join(
16
16
  screenshotBase,
17
17
  url.replace(`${urlPrefix}/`, '') + '.png'