@patternfly/documentation-framework 5.1.6 → 5.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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
|
+
## 5.1.7 (2023-08-24)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* added rtl switch to fullpage examples ([#3719](https://github.com/patternfly/patternfly-org/issues/3719)) ([fc1f9ba](https://github.com/patternfly/patternfly-org/commit/fc1f9bacab352cf2db7418ae98b2f3c98cd47302))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## 5.1.6 (2023-08-24)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
@@ -110,21 +110,18 @@
|
|
|
110
110
|
color: var(--pf-v5-global--danger-color--100);
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
.ws-
|
|
113
|
+
.ws-full-page-utils {
|
|
114
114
|
position: fixed;
|
|
115
115
|
right: 0;
|
|
116
116
|
bottom: 0;
|
|
117
|
-
padding: var(--pf-v5-global--spacer--
|
|
117
|
+
padding: var(--pf-v5-global--spacer--lg);
|
|
118
118
|
z-index: var(--pf-v5-global--ZIndex--2xl);
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
.ws-
|
|
121
|
+
.ws-full-page-utils::before {
|
|
122
122
|
position: absolute;
|
|
123
|
-
|
|
124
|
-
left: 0;
|
|
123
|
+
inset: 0;
|
|
125
124
|
content: "";
|
|
126
|
-
width: 100%;
|
|
127
|
-
height: 100%;
|
|
128
125
|
background-color: var(--pf-v5-global--BackgroundColor--100);
|
|
129
126
|
opacity: 0.8;
|
|
130
127
|
box-shadow: var(--pf-v5-global--BoxShadow--sm);
|
|
@@ -133,3 +130,11 @@
|
|
|
133
130
|
.pf-v5-theme-dark .ws-theme-switch-full-page::before {
|
|
134
131
|
background-color: var(--pf-v5-global--BackgroundColor--300);
|
|
135
132
|
}
|
|
133
|
+
|
|
134
|
+
.ws-dir-rtl {
|
|
135
|
+
direction: rtl;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.ws-dir-ltr {
|
|
139
|
+
direction: ltr;
|
|
140
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useLocation } from '@reach/router';
|
|
3
|
-
import { Button, CodeBlock, CodeBlockCode, debounce, Label, Switch, Tooltip } from '@patternfly/react-core';
|
|
3
|
+
import { Button, CodeBlock, Flex, CodeBlockCode, debounce, Label, Switch, Tooltip } from '@patternfly/react-core';
|
|
4
4
|
import * as reactCoreModule from '@patternfly/react-core';
|
|
5
5
|
import * as reactCoreNextModule from '@patternfly/react-core/next';
|
|
6
6
|
import * as reactCoreDeprecatedModule from '@patternfly/react-core/deprecated';
|
|
@@ -86,6 +86,8 @@ export const Example = ({
|
|
|
86
86
|
children,
|
|
87
87
|
// Show dark theme switcher on full page examples
|
|
88
88
|
hasDarkThemeSwitcher = process.env.hasDarkThemeSwitcher,
|
|
89
|
+
// Show dark theme switcher on full page examples
|
|
90
|
+
hasRTLSwitcher = process.env.hasRTLSwitcher,
|
|
89
91
|
// Map of relative imports matched to their npm package import path (passed to Codesandbox)
|
|
90
92
|
relativeImports,
|
|
91
93
|
// md file location in node_modules, used to resolve relative import paths in examples
|
|
@@ -158,11 +160,17 @@ export const Example = ({
|
|
|
158
160
|
return (
|
|
159
161
|
<div id={previewId} className={css(className, 'pf-v5-u-h-100')}>
|
|
160
162
|
{livePreview}
|
|
161
|
-
{hasDarkThemeSwitcher && (
|
|
162
|
-
<
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
163
|
+
{(hasDarkThemeSwitcher || hasRTLSwitcher) && (
|
|
164
|
+
<Flex direction={{ default: 'column' }} gap={{ default: 'gapLg' }} className="ws-full-page-utils ws-dir-ltr">
|
|
165
|
+
{hasDarkThemeSwitcher && (
|
|
166
|
+
<Switch id="ws-theme-switch" label="Dark theme" defaultChecked={false} onChange={() =>
|
|
167
|
+
document.querySelector('html').classList.toggle('pf-v5-theme-dark')} />
|
|
168
|
+
)}
|
|
169
|
+
{hasRTLSwitcher && (
|
|
170
|
+
<Switch id="ws-rtl-switch" label="RTL" defaultChecked={false} onChange={() =>
|
|
171
|
+
document.querySelector('html').classList.toggle('ws-dir-rtl')} />
|
|
172
|
+
)}
|
|
173
|
+
</Flex>
|
|
166
174
|
)}
|
|
167
175
|
</div>
|
|
168
176
|
);
|
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": "5.1.
|
|
4
|
+
"version": "5.1.7",
|
|
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.1.
|
|
20
|
+
"@patternfly/ast-helpers": "^1.1.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",
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"react": "^17.0.0 || ^18.0.0",
|
|
88
88
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "e1f763cf9d9eb51d77f9fb6c9a0dec46f411cdf1"
|
|
91
91
|
}
|
|
@@ -13,6 +13,7 @@ module.exports = (_env, argv) => {
|
|
|
13
13
|
hasFooter = false,
|
|
14
14
|
hasVersionSwitcher = false,
|
|
15
15
|
hasDesignGuidelines = false,
|
|
16
|
+
hasRTLSwitcher = false,
|
|
16
17
|
hasDarkThemeSwitcher = false,
|
|
17
18
|
componentsData = {},
|
|
18
19
|
sideNavItems = [],
|
|
@@ -143,6 +144,7 @@ module.exports = (_env, argv) => {
|
|
|
143
144
|
'process.env.hasVersionSwitcher': JSON.stringify(hasVersionSwitcher),
|
|
144
145
|
'process.env.hasDesignGuidelines': JSON.stringify(hasDesignGuidelines),
|
|
145
146
|
'process.env.hasDarkThemeSwitcher': JSON.stringify(hasDarkThemeSwitcher),
|
|
147
|
+
'process.env.hasRTLSwitcher': JSON.stringify(hasRTLSwitcher),
|
|
146
148
|
'process.env.componentsData': JSON.stringify(componentsData),
|
|
147
149
|
'process.env.sideNavItems': JSON.stringify(sideNavItems),
|
|
148
150
|
'process.env.topNavItems': JSON.stringify(topNavItems),
|
package/templates/mdx.js
CHANGED
|
@@ -125,8 +125,8 @@ const MDXChildTemplate = ({
|
|
|
125
125
|
<AutoLinkHeader size="h2" className="ws-h2" id="css-variables">
|
|
126
126
|
{cssVarsTitle}
|
|
127
127
|
</AutoLinkHeader>
|
|
128
|
-
{cssPrefix.map(prefix => (
|
|
129
|
-
<CSSVariables autoLinkHeader={cssPrefix.length > 1} prefix={prefix} />
|
|
128
|
+
{cssPrefix.map((prefix, index) => (
|
|
129
|
+
<CSSVariables key={index} autoLinkHeader={cssPrefix.length > 1} prefix={prefix} />
|
|
130
130
|
))}
|
|
131
131
|
</React.Fragment>
|
|
132
132
|
)}
|