@patternfly/quickstarts 6.0.0-alpha.2 → 6.0.0-alpha.3
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/dist/ConsoleInternal/components/markdown-view.d.ts +0 -1
- package/dist/ConsoleShared/src/components/markdown-extensions/accordion-extension.d.ts +0 -1
- package/dist/ConsoleShared/src/components/markdown-extensions/admonition-extension.d.ts +0 -1
- package/dist/ConsoleShared/src/components/markdown-extensions/code-extension.d.ts +0 -1
- package/dist/ConsoleShared/src/components/markdown-extensions/inline-clipboard-extension.d.ts +0 -1
- package/dist/ConsoleShared/src/components/markdown-extensions/multiline-clipboard-extension.d.ts +0 -1
- package/dist/ConsoleShared/src/components/modal/Modal.d.ts +1 -2
- package/dist/ConsoleShared/src/components/spotlight/InteractiveSpotlight.d.ts +0 -1
- package/dist/ConsoleShared/src/components/spotlight/StaticSpotlight.d.ts +0 -1
- package/dist/HelpTopicDrawer.d.ts +0 -1
- package/dist/HelpTopicPanelContent.d.ts +0 -1
- package/dist/QuickStartDrawer.d.ts +0 -1
- package/dist/QuickStartPanelContent.d.ts +2 -2
- package/dist/catalog/QuickStartCatalog.d.ts +0 -1
- package/dist/catalog/QuickStartTile.d.ts +16 -2
- package/dist/catalog/QuickStartTileDescription.d.ts +0 -1
- package/dist/catalog/QuickStartTileFooter.d.ts +1 -0
- package/dist/catalog/QuickStartTileHeader.d.ts +1 -17
- package/dist/catalog/Toolbar/QuickStartCatalogFilter.d.ts +0 -1
- package/dist/catalog/index.d.ts +1 -1
- package/dist/controller/QuickStartContent.d.ts +1 -1
- package/dist/controller/QuickStartFooter.d.ts +1 -1
- package/dist/controller/QuickStartIntroduction.d.ts +0 -1
- package/dist/controller/QuickStartTaskHeaderList.d.ts +0 -1
- package/dist/controller/QuickStartTaskReview.d.ts +0 -1
- package/dist/controller/QuickStartTasks.d.ts +0 -1
- package/dist/index.es.js +188 -291
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +189 -292
- package/dist/index.js.map +1 -1
- package/dist/patternfly-docs/quick-starts/examples/HelpTopic.jsx +4 -4
- package/dist/patternfly-docs/quick-starts/examples/example-data/example-help-topics.js +9 -18
- package/dist/patternfly-global.css +20 -66
- package/dist/patternfly-nested.css +2036 -2119
- package/dist/quickstarts-base.css +40 -420
- package/dist/quickstarts-full.es.js +715 -804
- package/dist/quickstarts-full.es.js.map +1 -1
- package/dist/quickstarts-standalone.css +41 -382
- package/dist/quickstarts-standalone.min.css +3 -3
- package/dist/quickstarts-vendor.css +6 -11
- package/dist/quickstarts.css +46 -431
- package/dist/quickstarts.min.css +1 -1
- package/dist/utils/quick-start-types.d.ts +1 -1
- package/package.json +10 -11
- package/src/ConsoleInternal/components/markdown-view.tsx +29 -9
- package/src/ConsoleShared/src/components/markdown-extensions/accordion-extension.tsx +10 -17
- package/src/ConsoleShared/src/components/markdown-extensions/admonition-extension.tsx +5 -11
- package/src/ConsoleShared/src/components/markdown-extensions/code-extension.tsx +2 -2
- package/src/ConsoleShared/src/components/markdown-extensions/inline-clipboard-extension.tsx +0 -1
- package/src/ConsoleShared/src/components/markdown-extensions/multiline-clipboard-extension.tsx +2 -6
- package/src/ConsoleShared/src/components/markdown-extensions/utils.ts +2 -1
- package/src/ConsoleShared/src/components/modal/Modal.tsx +1 -2
- package/src/ConsoleShared/src/components/popper/SimplePopper.tsx +5 -2
- package/src/ConsoleShared/src/components/spotlight/InteractiveSpotlight.tsx +0 -1
- package/src/ConsoleShared/src/components/spotlight/StaticSpotlight.tsx +0 -1
- package/src/ConsoleShared/src/components/status/icons.tsx +1 -5
- package/src/HelpTopicDrawer.tsx +1 -4
- package/src/HelpTopicPanelContent.tsx +4 -16
- package/src/QuickStartCatalogPage.tsx +34 -25
- package/src/QuickStartCloseModal.tsx +2 -2
- package/src/QuickStartController.tsx +1 -1
- package/src/QuickStartDrawer.tsx +2 -7
- package/src/QuickStartPanelContent.scss +7 -39
- package/src/QuickStartPanelContent.tsx +20 -44
- package/src/catalog/Catalog/QuickStartCatalogHeader.tsx +5 -4
- package/src/catalog/Catalog/QuickStartCatalogSection.tsx +1 -1
- package/src/catalog/Catalog/QuickStartCatalogToolbar.tsx +1 -3
- package/src/catalog/QuickStartCatalog.tsx +12 -16
- package/src/catalog/QuickStartTile.scss +11 -9
- package/src/catalog/QuickStartTile.tsx +133 -72
- package/src/catalog/QuickStartTileDescription.tsx +28 -42
- package/src/catalog/QuickStartTileFooter.tsx +13 -19
- package/src/catalog/QuickStartTileHeader.tsx +9 -86
- package/src/catalog/Toolbar/QuickStartCatalogFilter.tsx +8 -10
- package/src/catalog/Toolbar/QuickStartCatalogFilterItems.tsx +2 -5
- package/src/catalog/__tests__/QuickStartCatalog.spec.tsx +3 -3
- package/src/catalog/__tests__/QuickStartTile.spec.tsx +5 -5
- package/src/catalog/__tests__/QuickStartTileDescription.spec.tsx +1 -1
- package/src/catalog/index.ts +1 -1
- package/src/controller/QuickStartConclusion.tsx +4 -4
- package/src/controller/QuickStartContent.scss +3 -7
- package/src/controller/QuickStartContent.tsx +3 -5
- package/src/controller/QuickStartFooter.scss +1 -11
- package/src/controller/QuickStartFooter.tsx +27 -21
- package/src/controller/QuickStartIntroduction.tsx +11 -16
- package/src/controller/QuickStartTaskHeader.scss +20 -42
- package/src/controller/QuickStartTaskHeader.tsx +21 -60
- package/src/controller/QuickStartTaskHeaderList.tsx +4 -6
- package/src/controller/QuickStartTaskReview.tsx +6 -12
- package/src/controller/QuickStartTasks.tsx +6 -8
- package/src/controller/__tests__/QuickStartConclusion.spec.tsx +6 -19
- package/src/controller/__tests__/QuickStartFooter.spec.tsx +9 -54
- package/src/controller/__tests__/QuickStartTaskHeader.spec.tsx +1 -1
- package/src/controller/__tests__/QuickStartTaskReview.spec.tsx +3 -6
- package/src/controller/__tests__/QuickStartTasks.spec.tsx +3 -6
- package/src/styles/_base.scss +3 -45
- package/src/styles/style.scss +1 -6
- package/src/utils/help-topic-context.tsx +2 -3
- package/src/utils/quick-start-context.tsx +10 -13
- package/src/utils/quick-start-types.ts +1 -1
- package/src/utils/quick-start-utils.ts +4 -2
- package/src/ConsoleInternal/components/_icon-and-text.scss +0 -14
- package/src/ConsoleInternal/components/_markdown-view.scss +0 -19
- package/src/ConsoleInternal/components/catalog/_catalog.scss +0 -392
- package/src/ConsoleInternal/components/utils/_status-box.scss +0 -58
- package/src/ConsoleShared/src/components/layout/PageLayout.scss +0 -29
- package/src/ConsoleShared/src/components/markdown-extensions/showdown-extension.scss +0 -52
- package/src/ConsoleShared/src/components/modal/Modal.scss +0 -3
- package/src/ConsoleShared/src/components/spotlight/spotlight.scss +0 -63
- package/src/QuickStartDrawer.scss +0 -11
- package/src/catalog/QuickStartCatalog.scss +0 -8
- package/src/catalog/QuickStartTileDescription.scss +0 -29
- package/src/catalog/QuickStartTileHeader.scss +0 -16
- package/src/catalog/Toolbar/QuickStartCatalogFilter.scss +0 -25
- package/src/controller/QuickStartIntroduction.scss +0 -35
- package/src/controller/QuickStartTaskHeaderList.scss +0 -17
- package/src/controller/QuickStartTaskReview.scss +0 -30
- package/src/controller/QuickStartTasks.scss +0 -90
- package/src/styles/_dark-custom-override.scss +0 -47
|
@@ -3,7 +3,6 @@ import { css } from '@patternfly/react-styles';
|
|
|
3
3
|
import { Converter } from 'showdown';
|
|
4
4
|
import { useForceRender } from '@console/shared';
|
|
5
5
|
import { QuickStartContext, QuickStartContextValues } from '../../utils/quick-start-context';
|
|
6
|
-
import './_markdown-view.scss';
|
|
7
6
|
|
|
8
7
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
9
8
|
const DOMPurify = require('dompurify');
|
|
@@ -37,13 +36,34 @@ export const markdownConvert = (markdown, extensions?: ShowdownExtension[]) => {
|
|
|
37
36
|
return node;
|
|
38
37
|
}
|
|
39
38
|
|
|
40
|
-
// add PF
|
|
41
|
-
if (
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
// add PF content classes
|
|
40
|
+
if (node.nodeType === 1) {
|
|
41
|
+
const contentElements = [
|
|
42
|
+
'ul',
|
|
43
|
+
'ol',
|
|
44
|
+
'p',
|
|
45
|
+
'li',
|
|
46
|
+
'hr',
|
|
47
|
+
'h1',
|
|
48
|
+
'h2',
|
|
49
|
+
'h3',
|
|
50
|
+
'h4',
|
|
51
|
+
'h5',
|
|
52
|
+
'h6',
|
|
53
|
+
'blockquote',
|
|
54
|
+
'pre',
|
|
55
|
+
'dl',
|
|
56
|
+
'dt',
|
|
57
|
+
'dd',
|
|
58
|
+
'table',
|
|
59
|
+
];
|
|
60
|
+
if (contentElements.includes(node.nodeName.toLowerCase())) {
|
|
61
|
+
// don't overwrite elements already being styled by PatternFly
|
|
62
|
+
if (!node.getAttribute('class')?.includes('pf-v6-c-')) {
|
|
63
|
+
node.setAttribute('class', `pf-v6-c-content--${node.nodeName.toLowerCase()}`);
|
|
64
|
+
return node;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
47
67
|
}
|
|
48
68
|
});
|
|
49
69
|
|
|
@@ -166,7 +186,7 @@ const InlineMarkdownView: React.FC<InnerSyncMarkdownProps> = ({
|
|
|
166
186
|
}) => {
|
|
167
187
|
const id = React.useMemo(() => uniqueId('markdown'), []);
|
|
168
188
|
return (
|
|
169
|
-
<div className={css(
|
|
189
|
+
<div className={css({ 'is-empty': isEmpty } as any, className)} id={id}>
|
|
170
190
|
<div dangerouslySetInnerHTML={{ __html: markup }} />
|
|
171
191
|
{renderExtension && (
|
|
172
192
|
<RenderExtension renderExtension={renderExtension} selector={`#${id}`} markup={markup} />
|
|
@@ -8,7 +8,6 @@ import {
|
|
|
8
8
|
import { renderToStaticMarkup } from 'react-dom/server';
|
|
9
9
|
import { removeTemplateWhitespace } from './utils';
|
|
10
10
|
import { ACCORDION_MARKDOWN_BUTTON_ID, ACCORDION_MARKDOWN_CONTENT_ID } from './const';
|
|
11
|
-
import './showdown-extension.scss';
|
|
12
11
|
|
|
13
12
|
const useAccordionShowdownExtension = () =>
|
|
14
13
|
React.useMemo(
|
|
@@ -26,22 +25,16 @@ const useAccordionShowdownExtension = () =>
|
|
|
26
25
|
return removeTemplateWhitespace(
|
|
27
26
|
renderToStaticMarkup(
|
|
28
27
|
<>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
>
|
|
41
|
-
{accordionContent}
|
|
42
|
-
</AccordionContent>
|
|
43
|
-
</AccordionItem>
|
|
44
|
-
</Accordion>
|
|
28
|
+
<Accordion asDefinitionList>
|
|
29
|
+
<AccordionItem isExpanded={false}>
|
|
30
|
+
<AccordionToggle id={`${ACCORDION_MARKDOWN_BUTTON_ID}-${accordionId}`}>
|
|
31
|
+
{accordionHeading}
|
|
32
|
+
</AccordionToggle>
|
|
33
|
+
<AccordionContent id={`${ACCORDION_MARKDOWN_CONTENT_ID}-${accordionId}`}>
|
|
34
|
+
{accordionContent}
|
|
35
|
+
</AccordionContent>
|
|
36
|
+
</AccordionItem>
|
|
37
|
+
</Accordion>
|
|
45
38
|
</>,
|
|
46
39
|
),
|
|
47
40
|
);
|
|
@@ -4,7 +4,6 @@ import { renderToStaticMarkup } from 'react-dom/server';
|
|
|
4
4
|
import { Alert } from '@patternfly/react-core';
|
|
5
5
|
import LightbulbIcon from '@patternfly/react-icons/dist/js/icons/lightbulb-icon';
|
|
6
6
|
import FireIcon from '@patternfly/react-icons/dist/js/icons/fire-icon';
|
|
7
|
-
import './showdown-extension.scss';
|
|
8
7
|
import QuickStartMarkdownView from '../../../../QuickStartMarkdownView';
|
|
9
8
|
|
|
10
9
|
enum AdmonitionType {
|
|
@@ -17,15 +16,15 @@ enum AdmonitionType {
|
|
|
17
16
|
|
|
18
17
|
const admonitionToAlertVariantMap = {
|
|
19
18
|
[AdmonitionType.NOTE]: { variant: 'info' },
|
|
20
|
-
[AdmonitionType.TIP]: { variant: '
|
|
19
|
+
[AdmonitionType.TIP]: { variant: 'custom', customIcon: <LightbulbIcon /> },
|
|
21
20
|
[AdmonitionType.IMPORTANT]: { variant: 'danger' },
|
|
22
21
|
[AdmonitionType.CAUTION]: { variant: 'warning', customIcon: <FireIcon /> },
|
|
23
22
|
[AdmonitionType.WARNING]: { variant: 'warning' },
|
|
24
23
|
};
|
|
25
24
|
|
|
26
|
-
const useAdmonitionShowdownExtension = () =>
|
|
25
|
+
const useAdmonitionShowdownExtension = () =>
|
|
27
26
|
// const { getResource } = React.useContext<QuickStartContextValues>(QuickStartContext);
|
|
28
|
-
|
|
27
|
+
React.useMemo(
|
|
29
28
|
() => ({
|
|
30
29
|
type: 'lang',
|
|
31
30
|
regex: /\[(.+)]{{(admonition) ([\w-]+)}}/g,
|
|
@@ -42,17 +41,14 @@ const useAdmonitionShowdownExtension = () =>
|
|
|
42
41
|
admonitionType = admonitionType.toUpperCase();
|
|
43
42
|
|
|
44
43
|
const { variant, customIcon } = admonitionToAlertVariantMap[admonitionType];
|
|
45
|
-
const style =
|
|
46
|
-
admonitionType === AdmonitionType.CAUTION ? { backgroundColor: '#ec7a0915' } : {};
|
|
47
44
|
const mdContent = <QuickStartMarkdownView content={content} />;
|
|
48
45
|
const pfAlert = (
|
|
49
46
|
<Alert
|
|
50
47
|
variant={variant}
|
|
51
|
-
|
|
48
|
+
{...(customIcon && { customIcon })}
|
|
52
49
|
isInline
|
|
53
50
|
title={admonitionType}
|
|
54
51
|
className="pfext-markdown-admonition"
|
|
55
|
-
style={style}
|
|
56
52
|
>
|
|
57
53
|
{mdContent}
|
|
58
54
|
</Alert>
|
|
@@ -61,7 +57,5 @@ const useAdmonitionShowdownExtension = () =>
|
|
|
61
57
|
},
|
|
62
58
|
}),
|
|
63
59
|
[],
|
|
64
|
-
)
|
|
65
|
-
;
|
|
66
|
-
|
|
60
|
+
);
|
|
67
61
|
export default useAdmonitionShowdownExtension;
|
|
@@ -2,9 +2,9 @@ import * as React from 'react';
|
|
|
2
2
|
import { removeTemplateWhitespace } from './utils';
|
|
3
3
|
import { renderToStaticMarkup } from 'react-dom/server';
|
|
4
4
|
import { CodeBlock } from '@patternfly/react-core';
|
|
5
|
-
import './showdown-extension.scss';
|
|
6
5
|
|
|
7
|
-
const useCodeShowdownExtension = () =>
|
|
6
|
+
const useCodeShowdownExtension = () =>
|
|
7
|
+
React.useMemo(
|
|
8
8
|
() => ({
|
|
9
9
|
type: 'output',
|
|
10
10
|
regex: /<pre><code>(.*?)\n?<\/code><\/pre>/g,
|
|
@@ -4,7 +4,6 @@ import { MARKDOWN_COPY_BUTTON_ID, MARKDOWN_SNIPPET_ID } from './const';
|
|
|
4
4
|
import { removeTemplateWhitespace } from './utils';
|
|
5
5
|
import { renderToStaticMarkup } from 'react-dom/server';
|
|
6
6
|
import CopyIcon from '@patternfly/react-icons/dist/js/icons/copy-icon';
|
|
7
|
-
import './showdown-extension.scss';
|
|
8
7
|
|
|
9
8
|
const useInlineCopyClipboardShowdownExtension = () => {
|
|
10
9
|
const { getResource } = React.useContext<QuickStartContextValues>(QuickStartContext);
|
package/src/ConsoleShared/src/components/markdown-extensions/multiline-clipboard-extension.tsx
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import { QuickStartContext, QuickStartContextValues } from '@quickstarts/utils/quick-start-context';
|
|
3
4
|
import { MARKDOWN_COPY_BUTTON_ID, MARKDOWN_SNIPPET_ID } from './const';
|
|
4
5
|
import { renderToStaticMarkup } from 'react-dom/server';
|
|
5
6
|
import CopyIcon from '@patternfly/react-icons/dist/js/icons/copy-icon';
|
|
6
7
|
|
|
7
|
-
import './showdown-extension.scss';
|
|
8
|
-
|
|
9
8
|
const useMultilineCopyClipboardShowdownExtension = () => {
|
|
10
9
|
const { getResource } = React.useContext<QuickStartContextValues>(QuickStartContext);
|
|
11
10
|
return React.useMemo(
|
|
@@ -29,10 +28,7 @@ const useMultilineCopyClipboardShowdownExtension = () => {
|
|
|
29
28
|
</div>
|
|
30
29
|
</div>
|
|
31
30
|
<div class="pf-v6-c-code-block__content">
|
|
32
|
-
<pre class="pf-v6-c-code-block__pre pfext-code-block__pre">
|
|
33
|
-
<code class="pf-v6-c-code-block__code"
|
|
34
|
-
${MARKDOWN_SNIPPET_ID}="${groupId}">${group.trim()}</code>
|
|
35
|
-
</pre>
|
|
31
|
+
<pre class="pf-v6-c-code-block__pre pfext-code-block__pre"><code class="pf-v6-c-code-block__code"${MARKDOWN_SNIPPET_ID}="${groupId}">${group.trim()}</code></pre>
|
|
36
32
|
</div>
|
|
37
33
|
</div>`;
|
|
38
34
|
},
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export const removeTemplateWhitespace = (template: string): string =>
|
|
1
|
+
export const removeTemplateWhitespace = (template: string): string =>
|
|
2
|
+
template.replace(/>(?:\s|\n)+</g, '><');
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import './Modal.scss';
|
|
2
1
|
import * as React from 'react';
|
|
3
|
-
import { Modal as PfModal, ModalProps as PfModalProps } from '@patternfly/react-core';
|
|
2
|
+
import { Modal as PfModal, ModalProps as PfModalProps } from '@patternfly/react-core/deprecated';
|
|
4
3
|
import { css } from '@patternfly/react-styles';
|
|
5
4
|
|
|
6
5
|
type ModalProps = {
|
|
@@ -66,9 +66,12 @@ const SimplePopper = ({ children }: SimplePopperProps) => {
|
|
|
66
66
|
initialize();
|
|
67
67
|
}, [initialize]);
|
|
68
68
|
|
|
69
|
-
React.useEffect(
|
|
69
|
+
React.useEffect(
|
|
70
|
+
() => () => {
|
|
70
71
|
destroy();
|
|
71
|
-
},
|
|
72
|
+
},
|
|
73
|
+
[destroy],
|
|
74
|
+
);
|
|
72
75
|
|
|
73
76
|
React.useEffect(() => {
|
|
74
77
|
if (!isOpen) {
|
|
@@ -6,11 +6,7 @@ import { Icon } from '@patternfly/react-core';
|
|
|
6
6
|
|
|
7
7
|
export const GreenCheckCircleIcon: React.FC<ColoredIconProps> = ({ className, title, size }) => (
|
|
8
8
|
<Icon size={size} status="success">
|
|
9
|
-
<CheckCircleIcon
|
|
10
|
-
data-test="success-icon"
|
|
11
|
-
className={className}
|
|
12
|
-
title={title}
|
|
13
|
-
/>
|
|
9
|
+
<CheckCircleIcon data-test="success-icon" className={className} title={title} />
|
|
14
10
|
</Icon>
|
|
15
11
|
);
|
|
16
12
|
|
package/src/HelpTopicDrawer.tsx
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import './QuickStartDrawer.scss';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import { Drawer, DrawerContent, DrawerContentBody } from '@patternfly/react-core';
|
|
4
3
|
import HelpTopicPanelContent from './HelpTopicPanelContent';
|
|
@@ -103,9 +102,7 @@ export const HelpTopicDrawer: React.FC<HelpTopicDrawerProps> = ({ children, ...p
|
|
|
103
102
|
<Drawer isExpanded={!!activeHelpTopic} isInline {...props}>
|
|
104
103
|
{children ? (
|
|
105
104
|
<DrawerContent panelContent={panelContent}>
|
|
106
|
-
<DrawerContentBody
|
|
107
|
-
{children}
|
|
108
|
-
</DrawerContentBody>
|
|
105
|
+
<DrawerContentBody>{children}</DrawerContentBody>
|
|
109
106
|
</DrawerContent>
|
|
110
107
|
) : (
|
|
111
108
|
<div className="pf-v6-c-drawer__main">{panelContent}</div>
|
|
@@ -21,7 +21,6 @@ import { HelpTopic } from './utils/help-topic-types';
|
|
|
21
21
|
import BarsIcon from '@patternfly/react-icons/dist/js/icons/bars-icon';
|
|
22
22
|
import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
|
|
23
23
|
|
|
24
|
-
import './QuickStartPanelContent.scss';
|
|
25
24
|
import { HelpTopicContext, HelpTopicContextValues } from './utils/help-topic-context';
|
|
26
25
|
|
|
27
26
|
interface HelpTopicPanelContentProps {
|
|
@@ -95,10 +94,10 @@ const HelpTopicPanelContent: React.FC<HelpTopicPanelContentProps> = ({
|
|
|
95
94
|
);
|
|
96
95
|
|
|
97
96
|
const content = (
|
|
98
|
-
<DrawerPanelContent isResizable={isResizable}
|
|
97
|
+
<DrawerPanelContent isResizable={isResizable} {...props}>
|
|
99
98
|
<div>
|
|
100
99
|
<DrawerHead>
|
|
101
|
-
<div
|
|
100
|
+
<div>
|
|
102
101
|
{helpTopicOptions && (
|
|
103
102
|
<Select
|
|
104
103
|
isPlain
|
|
@@ -126,7 +125,6 @@ const HelpTopicPanelContent: React.FC<HelpTopicPanelContentProps> = ({
|
|
|
126
125
|
<Title
|
|
127
126
|
headingLevel="h1"
|
|
128
127
|
size="xl"
|
|
129
|
-
className="pfext-quick-start-panel-content__name"
|
|
130
128
|
style={{ marginRight: 'var(--pf-t--global--spacer--md)' }}
|
|
131
129
|
>
|
|
132
130
|
{activeHelpTopic?.title}
|
|
@@ -134,22 +132,12 @@ const HelpTopicPanelContent: React.FC<HelpTopicPanelContentProps> = ({
|
|
|
134
132
|
</div>
|
|
135
133
|
{
|
|
136
134
|
<DrawerActions>
|
|
137
|
-
<DrawerCloseButton
|
|
138
|
-
onClick={onClose}
|
|
139
|
-
className="pfext-quick-start-panel-content__close-button"
|
|
140
|
-
data-testid="qs-drawer-close"
|
|
141
|
-
/>
|
|
135
|
+
<DrawerCloseButton onClick={onClose} data-testid="qs-drawer-close" />
|
|
142
136
|
</DrawerActions>
|
|
143
137
|
}
|
|
144
138
|
</DrawerHead>
|
|
145
139
|
<Divider />
|
|
146
|
-
<DrawerPanelBody
|
|
147
|
-
hasNoPadding
|
|
148
|
-
className="pfext-quick-start-panel-content__body"
|
|
149
|
-
data-test="content"
|
|
150
|
-
>
|
|
151
|
-
{panelBodyItems}
|
|
152
|
-
</DrawerPanelBody>
|
|
140
|
+
<DrawerPanelBody data-test="content">{panelBodyItems}</DrawerPanelBody>
|
|
153
141
|
</div>
|
|
154
142
|
</DrawerPanelContent>
|
|
155
143
|
);
|
|
@@ -3,10 +3,11 @@ import {
|
|
|
3
3
|
Button,
|
|
4
4
|
Divider,
|
|
5
5
|
EmptyState,
|
|
6
|
+
EmptyStateActions,
|
|
6
7
|
EmptyStateBody,
|
|
7
|
-
Text,
|
|
8
8
|
EmptyStateFooter,
|
|
9
|
-
|
|
9
|
+
PageSection,
|
|
10
|
+
Content,
|
|
10
11
|
} from '@patternfly/react-core';
|
|
11
12
|
import SearchIcon from '@patternfly/react-icons/dist/js/icons/search-icon';
|
|
12
13
|
import { EmptyBox, LoadingBox, clearFilterParams } from '@console/internal/components/utils';
|
|
@@ -28,7 +29,11 @@ export interface QuickStartCatalogPageProps {
|
|
|
28
29
|
export const QuickStartCatalogEmptyState = ({ clearFilters }) => {
|
|
29
30
|
const { getResource } = React.useContext<QuickStartContextValues>(QuickStartContext);
|
|
30
31
|
return (
|
|
31
|
-
<EmptyState
|
|
32
|
+
<EmptyState
|
|
33
|
+
headingLevel="h4"
|
|
34
|
+
icon={SearchIcon}
|
|
35
|
+
titleText={<>{getResource('No results found')}</>}
|
|
36
|
+
>
|
|
32
37
|
<EmptyStateBody>
|
|
33
38
|
{getResource(
|
|
34
39
|
'No results match the filter criteria. Remove filters or clear all filters to show results.',
|
|
@@ -156,33 +161,37 @@ export const QuickStartCatalogPage: React.FC<QuickStartCatalogPageProps> = ({
|
|
|
156
161
|
}
|
|
157
162
|
|
|
158
163
|
return (
|
|
159
|
-
|
|
160
|
-
{showTitle && (
|
|
161
|
-
<
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
164
|
+
<>
|
|
165
|
+
{(showTitle || showFilter) && (
|
|
166
|
+
<PageSection hasBodyWrapper={false}>
|
|
167
|
+
{showTitle && (
|
|
168
|
+
<>
|
|
169
|
+
<Content component="h1" data-test="page-title">
|
|
170
|
+
{title || getResource('Quick Starts')}
|
|
171
|
+
</Content>
|
|
172
|
+
{hint && <div>{hint}</div>}
|
|
173
|
+
</>
|
|
174
|
+
)}
|
|
175
|
+
{showTitle && <Divider component="div" />}
|
|
176
|
+
{showFilter && (
|
|
177
|
+
<>
|
|
178
|
+
<QuickStartCatalogFilter
|
|
179
|
+
quickStartsCount={filteredQuickStarts.length}
|
|
180
|
+
onSearchInputChange={onSearchInputChange}
|
|
181
|
+
onStatusChange={onStatusChange}
|
|
182
|
+
/>
|
|
183
|
+
<Divider component="div" />
|
|
184
|
+
</>
|
|
185
|
+
)}
|
|
186
|
+
</PageSection>
|
|
178
187
|
)}
|
|
179
|
-
|
|
188
|
+
<PageSection hasBodyWrapper={false}>
|
|
180
189
|
{filteredQuickStarts.length === 0 ? (
|
|
181
190
|
<QuickStartCatalogEmptyState clearFilters={clearFilters} />
|
|
182
191
|
) : (
|
|
183
192
|
<QuickStartCatalog quickStarts={filteredQuickStarts} />
|
|
184
193
|
)}
|
|
185
|
-
|
|
186
|
-
|
|
194
|
+
</PageSection>
|
|
195
|
+
</>
|
|
187
196
|
);
|
|
188
197
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Button, Flex, FlexItem
|
|
2
|
+
import { Button, Flex, FlexItem } from '@patternfly/react-core';
|
|
3
|
+
import { ModalVariant } from '@patternfly/react-core/deprecated';
|
|
3
4
|
import { Modal } from '@console/shared';
|
|
4
5
|
import { QuickStartContext, QuickStartContextValues } from './utils/quick-start-context';
|
|
5
6
|
|
|
@@ -17,7 +18,6 @@ const QuickStartCloseModal: React.FC<QuickStartCloseModalProps> = ({
|
|
|
17
18
|
const { getResource } = React.useContext<QuickStartContextValues>(QuickStartContext);
|
|
18
19
|
return (
|
|
19
20
|
<Modal
|
|
20
|
-
className="pfext-quick-start-drawer__modal pfext-quick-start__base"
|
|
21
21
|
isOpen={isOpen}
|
|
22
22
|
variant={ModalVariant.small}
|
|
23
23
|
showClose={false}
|
|
@@ -101,7 +101,7 @@ const QuickStartController: React.FC<QuickStartControllerProps> = ({
|
|
|
101
101
|
totalTasks={totalTasks}
|
|
102
102
|
onNext={handleNext}
|
|
103
103
|
onBack={handleBack}
|
|
104
|
-
|
|
104
|
+
className={footerClass}
|
|
105
105
|
quickStartId={quickStart.metadata.name}
|
|
106
106
|
/>
|
|
107
107
|
</>
|
package/src/QuickStartDrawer.tsx
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import './QuickStartDrawer.scss';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import { Drawer, DrawerContent, DrawerContentBody } from '@patternfly/react-core';
|
|
4
3
|
import QuickStartCloseModal from './QuickStartCloseModal';
|
|
@@ -163,7 +162,6 @@ export const QuickStartDrawer: React.FC<QuickStartDrawerProps> = ({
|
|
|
163
162
|
activeQuickStartState,
|
|
164
163
|
allQuickStartStates,
|
|
165
164
|
setAllQuickStartStates,
|
|
166
|
-
useLegacyHeaderColors,
|
|
167
165
|
} = React.useContext<QuickStartContextValues>(QuickStartContext);
|
|
168
166
|
const combinedQuickStarts = allQuickStarts.concat(quickStarts);
|
|
169
167
|
React.useEffect(() => {
|
|
@@ -237,7 +235,6 @@ export const QuickStartDrawer: React.FC<QuickStartDrawerProps> = ({
|
|
|
237
235
|
activeQuickStartID={activeQuickStartID}
|
|
238
236
|
appendTo={appendTo}
|
|
239
237
|
isResizable={!fullWidth}
|
|
240
|
-
headerVariant={useLegacyHeaderColors ? '' : 'blue-white'}
|
|
241
238
|
{...fullWidthPanelStyle}
|
|
242
239
|
/>
|
|
243
240
|
);
|
|
@@ -247,12 +244,10 @@ export const QuickStartDrawer: React.FC<QuickStartDrawerProps> = ({
|
|
|
247
244
|
<Drawer isExpanded={!!activeQuickStartID} isInline {...props}>
|
|
248
245
|
{children ? (
|
|
249
246
|
<DrawerContent panelContent={panelContent} {...fullWidthBodyStyle}>
|
|
250
|
-
<DrawerContentBody
|
|
251
|
-
{children}
|
|
252
|
-
</DrawerContentBody>
|
|
247
|
+
<DrawerContentBody>{children}</DrawerContentBody>
|
|
253
248
|
</DrawerContent>
|
|
254
249
|
) : (
|
|
255
|
-
<div
|
|
250
|
+
<div>{panelContent}</div>
|
|
256
251
|
)}
|
|
257
252
|
</Drawer>
|
|
258
253
|
<QuickStartCloseModal
|
|
@@ -1,46 +1,14 @@
|
|
|
1
1
|
.pfext-quick-start-panel-content {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
z-index: var(--pf-t--global--z-index--xs);
|
|
7
|
-
&__shadow {
|
|
8
|
-
box-shadow: var(--pf-t--global--box-shadow--sm--bottom);
|
|
9
|
-
}
|
|
10
|
-
&--blue-white {
|
|
11
|
-
background-color: var(--pf-t--global--color--brand--default);
|
|
12
|
-
.pfext-quick-start-panel-content__title {
|
|
13
|
-
color: var(--pf-t--global--text--color--on-brand--default);
|
|
14
|
-
}
|
|
15
|
-
.pfext-quick-start-panel-content__duration {
|
|
16
|
-
color: var(--pf-t--global--text--color--on-brand--default);
|
|
17
|
-
}
|
|
18
|
-
.pfext-quick-start-panel-content__close-button {
|
|
19
|
-
button {
|
|
20
|
-
color: var(--pf-t--global--text--color--on-brand--default) !important;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
2
|
+
background-color: var(--pf-t--global--color--brand--default);
|
|
3
|
+
color: var(--pf-t--global--text--color--inverse);
|
|
4
|
+
padding: var(--pf-t--global--spacer--md) var(--pf-t--global--spacer--lg);
|
|
5
|
+
|
|
25
6
|
&__body {
|
|
26
7
|
display: flex;
|
|
27
8
|
flex-direction: column;
|
|
28
9
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
flex-wrap: wrap;
|
|
33
|
-
}
|
|
34
|
-
&__duration {
|
|
35
|
-
display: inline-block;
|
|
36
|
-
font-size: var(--pf-t--global--font--size--body--default);
|
|
37
|
-
font-weight: var(--pf-t--global--font--weight--body);
|
|
38
|
-
line-height: 1;
|
|
39
|
-
color: var(--pf-t--global--text--color--subtle);
|
|
40
|
-
}
|
|
41
|
-
&__footer {
|
|
42
|
-
&__shadow {
|
|
43
|
-
box-shadow: var(--pf-t--global--box-shadow--sm--top);
|
|
44
|
-
}
|
|
10
|
+
|
|
11
|
+
&__close-button button.pf-v6-c-button {
|
|
12
|
+
--pf-v6-c-button--Color: var(--pf-t--global--text--color--inverse);
|
|
45
13
|
}
|
|
46
14
|
}
|