@patternfly/quickstarts 5.3.0 → 6.0.0-alpha.1
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/catalog/QuickStartTile.d.ts +0 -3
- package/dist/catalog/QuickStartTileHeader.d.ts +0 -12
- package/dist/catalog/index.d.ts +1 -1
- package/dist/index.es.js +64 -101
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +63 -103
- package/dist/index.js.map +1 -1
- package/dist/patternfly-global.css +773 -846
- package/dist/patternfly-nested.css +12814 -9632
- package/dist/quickstarts-base.css +133 -765
- package/dist/quickstarts-full.es.js +3689 -3599
- package/dist/quickstarts-full.es.js.map +1 -1
- package/dist/quickstarts-standalone.css +165 -546
- package/dist/quickstarts-standalone.min.css +8 -4
- package/dist/quickstarts-vendor.css +37 -134
- package/dist/quickstarts.css +170 -899
- package/dist/quickstarts.min.css +1 -1
- package/package.json +20 -19
- package/src/ConsoleInternal/components/_icon-and-text.scss +2 -2
- package/src/ConsoleInternal/components/catalog/_catalog.scss +20 -20
- package/src/ConsoleInternal/components/markdown-view.tsx +2 -2
- package/src/ConsoleInternal/components/utils/_status-box.scss +1 -1
- package/src/ConsoleShared/src/components/layout/PageLayout.scss +10 -10
- package/src/ConsoleShared/src/components/markdown-extensions/accordion-extension.tsx +6 -4
- package/src/ConsoleShared/src/components/markdown-extensions/accordion-render-extension.tsx +2 -2
- package/src/ConsoleShared/src/components/markdown-extensions/inline-clipboard-extension.tsx +5 -5
- package/src/ConsoleShared/src/components/markdown-extensions/multiline-clipboard-extension.tsx +8 -8
- package/src/ConsoleShared/src/components/markdown-extensions/showdown-extension.scss +5 -5
- package/src/ConsoleShared/src/components/spotlight/StaticSpotlight.tsx +1 -1
- package/src/ConsoleShared/src/components/spotlight/spotlight.scss +4 -4
- package/src/ConsoleShared/src/components/status/icons.tsx +6 -8
- package/src/HelpTopicDrawer.tsx +1 -1
- package/src/HelpTopicPanelContent.tsx +1 -1
- package/src/QuickStartCatalogPage.tsx +1 -8
- package/src/QuickStartController.tsx +1 -1
- package/src/QuickStartDrawer.scss +1 -1
- package/src/QuickStartDrawer.tsx +1 -1
- package/src/QuickStartMarkdownView.tsx +1 -1
- package/src/QuickStartPanelContent.scss +10 -10
- package/src/QuickStartPanelContent.tsx +1 -1
- package/src/catalog/QuickStartCatalog.scss +1 -1
- package/src/catalog/QuickStartTile.tsx +11 -20
- package/src/catalog/QuickStartTileDescription.scss +4 -4
- package/src/catalog/QuickStartTileHeader.scss +5 -9
- package/src/catalog/QuickStartTileHeader.tsx +4 -31
- package/src/catalog/Toolbar/QuickStartCatalogFilter.scss +9 -9
- package/src/catalog/Toolbar/QuickStartCatalogFilterItems.tsx +1 -1
- package/src/catalog/index.ts +1 -1
- package/src/controller/QuickStartConclusion.tsx +1 -1
- package/src/controller/QuickStartContent.scss +2 -2
- package/src/controller/QuickStartFooter.scss +3 -3
- package/src/controller/QuickStartIntroduction.scss +7 -7
- package/src/controller/QuickStartIntroduction.tsx +1 -1
- package/src/controller/QuickStartTaskHeader.scss +15 -15
- package/src/controller/QuickStartTaskHeader.tsx +17 -17
- package/src/controller/QuickStartTaskHeaderList.scss +1 -1
- package/src/controller/QuickStartTaskHeaderList.tsx +1 -1
- package/src/controller/QuickStartTaskReview.scss +8 -8
- package/src/controller/QuickStartTasks.scss +14 -13
- package/src/styles/_base.scss +3 -6
- package/src/styles/_dark-custom-override.scss +16 -31
- package/src/styles/legacy-bootstrap/_variables.scss +8 -8
- package/src/styles/patternfly-global.scss +8 -8
- package/src/styles/patternfly-nested.scss +5 -5
- package/src/styles/style.scss +6 -6
- package/src/styles/vendor.scss +2 -2
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { QuickStart, QuickStartStatus } from '../utils/quick-start-types';
|
|
3
|
-
import { QuickstartAction } from './QuickStartTileHeader';
|
|
4
3
|
import './QuickStartTile.scss';
|
|
5
4
|
interface QuickStartTileProps {
|
|
6
5
|
quickStart: QuickStart;
|
|
7
6
|
status: QuickStartStatus;
|
|
8
7
|
isActive: boolean;
|
|
9
8
|
onClick?: () => void;
|
|
10
|
-
/** Action config for button rendered next to title */
|
|
11
|
-
action?: QuickstartAction;
|
|
12
9
|
}
|
|
13
10
|
declare const QuickStartTile: React.FC<QuickStartTileProps>;
|
|
14
11
|
export default QuickStartTile;
|
|
@@ -1,24 +1,12 @@
|
|
|
1
1
|
import './QuickStartTileHeader.scss';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { ButtonProps } from '@patternfly/react-core';
|
|
4
3
|
import { QuickStartType } from '../utils/quick-start-types';
|
|
5
|
-
export interface QuickstartAction {
|
|
6
|
-
/** Screen reader aria label. */
|
|
7
|
-
'aria-label': string;
|
|
8
|
-
/** Icon to be rendered as a plain button, by default Bookmark outlined will be used. */
|
|
9
|
-
icon?: React.ComponentType<unknown>;
|
|
10
|
-
/** Callback with synthetic event parameter. */
|
|
11
|
-
onClick?: (e: React.SyntheticEvent) => void;
|
|
12
|
-
/** Additional button props to be rendered as extra props. */
|
|
13
|
-
buttonProps?: ButtonProps;
|
|
14
|
-
}
|
|
15
4
|
interface QuickStartTileHeaderProps {
|
|
16
5
|
status: string;
|
|
17
6
|
duration: number;
|
|
18
7
|
name: string;
|
|
19
8
|
type?: QuickStartType;
|
|
20
9
|
quickStartId?: string;
|
|
21
|
-
action?: QuickstartAction;
|
|
22
10
|
}
|
|
23
11
|
declare const QuickStartTileHeader: React.FC<QuickStartTileHeaderProps>;
|
|
24
12
|
export default QuickStartTileHeader;
|
package/dist/catalog/index.d.ts
CHANGED
|
@@ -4,6 +4,6 @@ export { default as QuickStartTile } from './QuickStartTile';
|
|
|
4
4
|
export { default as QuickStartTileDescription } from './QuickStartTileDescription';
|
|
5
5
|
export { default as QuickStartTileFooter } from './QuickStartTileFooter';
|
|
6
6
|
export { default as QuickStartTileFooterExternal } from './QuickStartTileFooterExternal';
|
|
7
|
-
export { default as QuickStartTileHeader
|
|
7
|
+
export { default as QuickStartTileHeader } from './QuickStartTileHeader';
|
|
8
8
|
export * from './Toolbar/QuickStartCatalogFilterItems';
|
|
9
9
|
export * from './Catalog';
|
package/dist/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { createContext, useCallback, useEffect, useState } from 'react';
|
|
3
|
-
import { getUniqueId, Card, CardHeader, CardTitle, CardBody, CardFooter, Modal as Modal$1, useIsomorphicLayoutEffect, Tooltip, Alert, CodeBlock, Accordion, AccordionItem, AccordionToggle, AccordionContent, Popover, PopoverPosition, Button, Icon, Text, TextVariants, TextList, TextListItem, Flex, FlexItem, Title, Label, Gallery, GalleryItem, ToolbarItem, SearchInput, Select, SelectList, SelectOption, MenuToggle, Badge, Toolbar, ToolbarContent, EmptyState,
|
|
3
|
+
import { getUniqueId, Card, CardHeader, CardTitle, CardBody, CardFooter, Modal as Modal$1, useIsomorphicLayoutEffect, Tooltip, Alert, CodeBlock, Accordion, AccordionItem, AccordionToggle, AccordionContent, Popover, PopoverPosition, Button, Icon, Text, TextVariants, TextList, TextListItem, Flex, FlexItem, Title, Label, Gallery, GalleryItem, ToolbarItem, SearchInput, Select, SelectList, SelectOption, MenuToggle, Badge, Toolbar, ToolbarContent, EmptyState, EmptyStateBody, EmptyStateFooter, EmptyStateActions, Divider, ModalVariant, WizardNavItem, List, ExpandableSection, ListItem, Radio, DrawerPanelContent, DrawerHead, DrawerActions, DrawerCloseButton, DrawerPanelBody, Drawer, DrawerContent, DrawerContentBody, Stack, StackItem } from '@patternfly/react-core';
|
|
4
4
|
import SearchIcon from '@patternfly/react-icons/dist/js/icons/search-icon';
|
|
5
5
|
import { css } from '@patternfly/react-styles';
|
|
6
6
|
import { __rest } from 'tslib';
|
|
@@ -14,32 +14,25 @@ import FireIcon from '@patternfly/react-icons/dist/js/icons/fire-icon';
|
|
|
14
14
|
import { Converter } from 'showdown';
|
|
15
15
|
import SyncAltIcon from '@patternfly/react-icons/dist/js/icons/sync-alt-icon';
|
|
16
16
|
import CheckCircleIcon from '@patternfly/react-icons/dist/js/icons/check-circle-icon';
|
|
17
|
-
import
|
|
17
|
+
import '@patternfly/react-icons/dist/js/icons/exclamation-circle-icon';
|
|
18
18
|
import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
|
|
19
|
-
import '@patternfly/react-tokens/dist/esm/global_danger_color_100';
|
|
20
|
-
import '@patternfly/react-tokens/dist/esm/global_palette_blue_300';
|
|
21
|
-
import okColor from '@patternfly/react-tokens/dist/esm/global_palette_green_500';
|
|
22
19
|
import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
|
|
23
20
|
import OutlinedClockIcon from '@patternfly/react-icons/dist/js/icons/outlined-clock-icon';
|
|
24
|
-
import OutlinedBookmarkIcon from '@patternfly/react-icons/dist/js/icons/outlined-bookmark-icon';
|
|
25
21
|
import ArrowRightIcon from '@patternfly/react-icons/dist/js/icons/arrow-right-icon';
|
|
26
22
|
import BarsIcon from '@patternfly/react-icons/dist/js/icons/bars-icon';
|
|
27
23
|
|
|
28
24
|
function _extends() {
|
|
29
|
-
_extends = Object.assign
|
|
25
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
30
26
|
for (var i = 1; i < arguments.length; i++) {
|
|
31
27
|
var source = arguments[i];
|
|
32
|
-
|
|
33
28
|
for (var key in source) {
|
|
34
29
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
35
30
|
target[key] = source[key];
|
|
36
31
|
}
|
|
37
32
|
}
|
|
38
33
|
}
|
|
39
|
-
|
|
40
34
|
return target;
|
|
41
35
|
};
|
|
42
|
-
|
|
43
36
|
return _extends.apply(this, arguments);
|
|
44
37
|
}
|
|
45
38
|
|
|
@@ -864,8 +857,8 @@ class CatalogTile extends React.Component {
|
|
|
864
857
|
const _a = this.props, { id, className, featured, onClick, href, icon, iconImg, iconAlt, iconClass, badges, title, vendor, description, footer,
|
|
865
858
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
866
859
|
ref, children } = _a, props = __rest(_a, ["id", "className", "featured", "onClick", "href", "icon", "iconImg", "iconAlt", "iconClass", "badges", "title", "vendor", "description", "footer", "ref", "children"]);
|
|
867
|
-
return (React.createElement(Card, Object.assign({ component: href ? 'a' : 'div', id: id || this.generatedId, href: href || '#', className: css('catalog-tile-pf', { featured }, className), isClickable: !!onClick }, props),
|
|
868
|
-
(badges.length > 0 || iconImg || iconClass || icon || onClick) && (React.createElement(CardHeader, { actions: { actions: badges.length > 0 && this.renderBadges(badges) }, selectableActions: onClick && {
|
|
860
|
+
return (React.createElement(Card, Object.assign({ component: href ? 'a' : 'div', id: id || this.generatedId, href: href || '#', className: css('catalog-tile-pf', { featured }, className), variant: featured ? 'secondary' : 'default', isClickable: !!onClick }, props),
|
|
861
|
+
(badges.length > 0 || iconImg || iconClass || icon || onClick) && (React.createElement(CardHeader, { actions: { actions: badges.length > 0 && this.renderBadges(badges), hasNoOffset: true }, selectableActions: onClick && {
|
|
869
862
|
selectableActionId: id + '-input',
|
|
870
863
|
onClickAction: (e) => this.handleClick(e),
|
|
871
864
|
selectableActionAriaLabelledby: id
|
|
@@ -1106,7 +1099,7 @@ const StaticSpotlight = ({ element }) => {
|
|
|
1106
1099
|
}
|
|
1107
1100
|
: {};
|
|
1108
1101
|
return clientRect ? (React.createElement(Portal, null,
|
|
1109
|
-
React.createElement("div", { className: "pf-
|
|
1102
|
+
React.createElement("div", { className: "pf-v6-c-backdrop pfext-spotlight__with-backdrop" },
|
|
1110
1103
|
React.createElement("div", { className: "pfext-spotlight pfext-spotlight__element-highlight-noanimate", style: style })))) : null;
|
|
1111
1104
|
};
|
|
1112
1105
|
|
|
@@ -1229,11 +1222,11 @@ const useInlineCopyClipboardShowdownExtension = () => {
|
|
|
1229
1222
|
if (!group || isNaN(groupId)) {
|
|
1230
1223
|
return text;
|
|
1231
1224
|
}
|
|
1232
|
-
return removeTemplateWhitespace(`<span class="pf-
|
|
1233
|
-
<span class="pf-
|
|
1234
|
-
<span class="pf-
|
|
1235
|
-
<span class="pf-
|
|
1236
|
-
<button class="pf-
|
|
1225
|
+
return removeTemplateWhitespace(`<span class="pf-v6-c-clipboard-copy pf-m-inline">
|
|
1226
|
+
<span class="pf-v6-c-clipboard-copy__text" ${MARKDOWN_SNIPPET_ID}="${groupId}">${group}</span>
|
|
1227
|
+
<span class="pf-v6-c-clipboard-copy__actions">
|
|
1228
|
+
<span class="pf-v6-c-clipboard-copy__actions-item">
|
|
1229
|
+
<button class="pf-v6-c-button pf-m-plain" aria-label="${getResource('Copy to clipboard')}" ${MARKDOWN_COPY_BUTTON_ID}="${groupId}">
|
|
1237
1230
|
${renderToStaticMarkup(React.createElement(CopyIcon, null))}
|
|
1238
1231
|
</button>
|
|
1239
1232
|
</span>
|
|
@@ -1252,19 +1245,19 @@ const useMultilineCopyClipboardShowdownExtension = () => {
|
|
|
1252
1245
|
if (!group || isNaN(groupId)) {
|
|
1253
1246
|
return text;
|
|
1254
1247
|
}
|
|
1255
|
-
return `<div class="pf-
|
|
1256
|
-
<div class="pf-
|
|
1257
|
-
<div class="pf-
|
|
1258
|
-
<div class="pf-
|
|
1259
|
-
<button class="pf-
|
|
1248
|
+
return `<div class="pf-v6-c-code-block">
|
|
1249
|
+
<div class="pf-v6-c-code-block__header">
|
|
1250
|
+
<div class="pf-v6-c-code-block__actions">
|
|
1251
|
+
<div class="pf-v6-c-code-block__actions-item">
|
|
1252
|
+
<button class="pf-v6-c-button pf-m-plain" type="button" aria-label="${getResource('Copy to clipboard')}" ${MARKDOWN_COPY_BUTTON_ID}="${groupId}">
|
|
1260
1253
|
${renderToStaticMarkup(React.createElement(CopyIcon, null))}
|
|
1261
1254
|
</button>
|
|
1262
1255
|
</div>
|
|
1263
1256
|
</div>
|
|
1264
1257
|
</div>
|
|
1265
|
-
<div class="pf-
|
|
1266
|
-
<pre class="pf-
|
|
1267
|
-
<code class="pf-
|
|
1258
|
+
<div class="pf-v6-c-code-block__content">
|
|
1259
|
+
<pre class="pf-v6-c-code-block__pre pfext-code-block__pre">
|
|
1260
|
+
<code class="pf-v6-c-code-block__code"
|
|
1268
1261
|
${MARKDOWN_SNIPPET_ID}="${groupId}">${group.trim()}</code>
|
|
1269
1262
|
</pre>
|
|
1270
1263
|
</div>
|
|
@@ -1295,7 +1288,7 @@ const markdownConvert = (markdown, extensions) => {
|
|
|
1295
1288
|
// add PF class to ul and ol lists
|
|
1296
1289
|
if (node.nodeType === 1 &&
|
|
1297
1290
|
(node.nodeName.toLowerCase() === 'ul' || node.nodeName.toLowerCase() === 'ol')) {
|
|
1298
|
-
node.setAttribute('class', 'pf-
|
|
1291
|
+
node.setAttribute('class', 'pf-v6-c-list');
|
|
1299
1292
|
return node;
|
|
1300
1293
|
}
|
|
1301
1294
|
});
|
|
@@ -1406,7 +1399,7 @@ const IFrameMarkdownView = ({ exactHeight, markup, isEmpty, renderExtension, cla
|
|
|
1406
1399
|
body {
|
|
1407
1400
|
background-color: transparent !important;
|
|
1408
1401
|
color: ${isEmpty ? '#999' : '#333'};
|
|
1409
|
-
font-family: var(--pf-
|
|
1402
|
+
font-family: var(--pf-t--global--font--family--body);
|
|
1410
1403
|
min-width: auto !important;
|
|
1411
1404
|
}
|
|
1412
1405
|
table {
|
|
@@ -1452,7 +1445,7 @@ const QuickStartMarkdownView = ({ content, exactHeight, className, }) => {
|
|
|
1452
1445
|
if (!linkLabel || !linkType || !linkId) {
|
|
1453
1446
|
return text;
|
|
1454
1447
|
}
|
|
1455
|
-
return `<button class="pf-
|
|
1448
|
+
return `<button class="pf-v6-c-button pf-m-inline pf-m-link" data-highlight="${linkId}">${linkLabel}</button>`;
|
|
1456
1449
|
},
|
|
1457
1450
|
},
|
|
1458
1451
|
{
|
|
@@ -1528,10 +1521,11 @@ const useAccordionShowdownExtension = () => React.useMemo(() => ({
|
|
|
1528
1521
|
regex: /\[(.+)]{{(accordion) ("(.*?)")}}/g,
|
|
1529
1522
|
replace: (_text, accordionContent, _command, accordionHeading) => {
|
|
1530
1523
|
const accordionId = String(accordionHeading).replace(/\s/g, '-');
|
|
1531
|
-
return removeTemplateWhitespace(renderToStaticMarkup(React.createElement(
|
|
1532
|
-
React.createElement(
|
|
1533
|
-
React.createElement(
|
|
1534
|
-
|
|
1524
|
+
return removeTemplateWhitespace(renderToStaticMarkup(React.createElement(React.Fragment, null,
|
|
1525
|
+
React.createElement(Accordion, { asDefinitionList: true },
|
|
1526
|
+
React.createElement(AccordionItem, { isExpanded: false },
|
|
1527
|
+
React.createElement(AccordionToggle, { id: `${ACCORDION_MARKDOWN_BUTTON_ID}-${accordionId}` }, accordionHeading),
|
|
1528
|
+
React.createElement(AccordionContent, { id: `${ACCORDION_MARKDOWN_CONTENT_ID}-${accordionId}` }, accordionContent))))));
|
|
1535
1529
|
},
|
|
1536
1530
|
}), []);
|
|
1537
1531
|
|
|
@@ -1539,9 +1533,9 @@ const AccordionShowdownHandler = ({ buttonElement, contentElement, }) => {
|
|
|
1539
1533
|
const [expanded, setExpanded] = React.useState(false);
|
|
1540
1534
|
const handleClick = () => {
|
|
1541
1535
|
const expandedModifier = 'pf-m-expanded';
|
|
1542
|
-
buttonElement.className = `pf-
|
|
1536
|
+
buttonElement.className = `pf-v6-c-accordion__toggle ${!expanded ? expandedModifier : ''}`;
|
|
1543
1537
|
contentElement.hidden = expanded;
|
|
1544
|
-
contentElement.className = `pf-
|
|
1538
|
+
contentElement.className = `pf-v6-c-accordion__expanded-content ${!expanded ? expandedModifier : ''}`;
|
|
1545
1539
|
setExpanded(!expanded);
|
|
1546
1540
|
};
|
|
1547
1541
|
useEventListener(buttonElement, 'click', handleClick);
|
|
@@ -1592,8 +1586,8 @@ const GenericStatus = (props) => {
|
|
|
1592
1586
|
return React.Children.toArray(children).length ? (React.createElement(PopoverStatus, Object.assign({ title: popoverTitle || title }, restProps, { statusBody: statusBody }), children)) : (statusBody);
|
|
1593
1587
|
};
|
|
1594
1588
|
|
|
1595
|
-
const GreenCheckCircleIcon = ({ className, title, size }) => (React.createElement(Icon, { size: size },
|
|
1596
|
-
React.createElement(CheckCircleIcon, { "data-test": "success-icon",
|
|
1589
|
+
const GreenCheckCircleIcon = ({ className, title, size }) => (React.createElement(Icon, { size: size, status: "success" },
|
|
1590
|
+
React.createElement(CheckCircleIcon, { "data-test": "success-icon", className: className, title: title })));
|
|
1597
1591
|
|
|
1598
1592
|
const SuccessStatus = (props) => (React.createElement(GenericStatus, Object.assign({}, props, { Icon: GreenCheckCircleIcon, title: props.title || 'Healthy' })));
|
|
1599
1593
|
SuccessStatus.displayName = 'SuccessStatus';
|
|
@@ -1668,35 +1662,33 @@ const statusColorMap = {
|
|
|
1668
1662
|
[QuickStartStatus.IN_PROGRESS]: 'purple',
|
|
1669
1663
|
[QuickStartStatus.NOT_STARTED]: 'grey',
|
|
1670
1664
|
};
|
|
1671
|
-
const QuickStartTileHeader = ({ status, duration, name, type, quickStartId,
|
|
1665
|
+
const QuickStartTileHeader = ({ status, duration, name, type, quickStartId, }) => {
|
|
1672
1666
|
const { getResource } = React.useContext(QuickStartContext);
|
|
1673
1667
|
const statusLocaleMap = {
|
|
1674
1668
|
[QuickStartStatus.COMPLETE]: getResource('Complete'),
|
|
1675
1669
|
[QuickStartStatus.IN_PROGRESS]: getResource('In progress'),
|
|
1676
1670
|
[QuickStartStatus.NOT_STARTED]: getResource('Not started'),
|
|
1677
1671
|
};
|
|
1678
|
-
const ActionIcon = (action === null || action === void 0 ? void 0 : action.icon) || OutlinedBookmarkIcon;
|
|
1679
1672
|
return (React.createElement("div", { className: "pfext-quick-start-tile-header" },
|
|
1680
|
-
React.createElement(
|
|
1681
|
-
React.createElement(
|
|
1682
|
-
React.createElement(QuickStartMarkdownView, { content: name })),
|
|
1683
|
-
action && (React.createElement(Button, Object.assign({ "aria-label": action['aria-label'], icon: React.createElement(ActionIcon, null), variant: "plain", onClick: action.onClick }, action.buttonProps)))),
|
|
1673
|
+
React.createElement(Title, { headingLevel: "h3", "data-test": "title", id: quickStartId },
|
|
1674
|
+
React.createElement(QuickStartMarkdownView, { content: name })),
|
|
1684
1675
|
React.createElement("div", { className: "pfext-quick-start-tile-header__status" },
|
|
1685
1676
|
type && (React.createElement(Label, { className: "pfext-quick-start-tile-header--margin", color: type.color }, type.text)),
|
|
1686
1677
|
duration && (React.createElement(Label, { variant: "outline", "data-test": "duration", icon: React.createElement(OutlinedClockIcon, null), className: "pfext-quick-start-tile-header--margin" }, getResource('{{duration, number}} minutes', duration).replace('{{duration, number}}', duration))),
|
|
1687
1678
|
status !== QuickStartStatus.NOT_STARTED && (React.createElement(Label, { variant: "outline", color: statusColorMap[status], icon: React.createElement(StatusIcon, { status: status }), "data-test": "status" }, statusLocaleMap[status])))));
|
|
1688
1679
|
};
|
|
1689
1680
|
|
|
1690
|
-
const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { },
|
|
1681
|
+
const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { }, }) => {
|
|
1691
1682
|
const { metadata: { name: id }, spec: { icon, tasks, displayName, description, durationMinutes, prerequisites, link, type }, } = quickStart;
|
|
1692
1683
|
const { setActiveQuickStart, footer } = React.useContext(QuickStartContext);
|
|
1693
1684
|
const ref = React.useRef(null);
|
|
1694
1685
|
let quickStartIcon;
|
|
1695
1686
|
if (typeof icon === 'object') {
|
|
1696
|
-
quickStartIcon = icon;
|
|
1687
|
+
quickStartIcon = React.createElement(Icon, { size: "xl" }, icon);
|
|
1697
1688
|
}
|
|
1698
1689
|
else {
|
|
1699
|
-
quickStartIcon = (React.createElement(
|
|
1690
|
+
quickStartIcon = (React.createElement(Icon, { size: "xl" },
|
|
1691
|
+
React.createElement(FallbackImg, { className: "pfext-catalog-item-icon__img--large", src: icon, alt: "", fallback: React.createElement(RocketIcon, null) })));
|
|
1700
1692
|
}
|
|
1701
1693
|
const footerComponent = React.useMemo(() => {
|
|
1702
1694
|
if (footer && footer.show === false) {
|
|
@@ -1710,31 +1702,26 @@ const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { }, act
|
|
|
1710
1702
|
const handleClick = (e) => {
|
|
1711
1703
|
var _a;
|
|
1712
1704
|
if ((_a = ref.current) === null || _a === void 0 ? void 0 : _a.contains(e.target)) {
|
|
1713
|
-
if (
|
|
1705
|
+
if (link) {
|
|
1706
|
+
window.open(link.href);
|
|
1707
|
+
}
|
|
1708
|
+
else {
|
|
1714
1709
|
setActiveQuickStart(id, tasks === null || tasks === void 0 ? void 0 : tasks.length);
|
|
1715
1710
|
}
|
|
1716
1711
|
onClick();
|
|
1717
1712
|
}
|
|
1718
1713
|
};
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
href: link.href,
|
|
1722
|
-
target: '_blank',
|
|
1723
|
-
rel: 'noreferrer',
|
|
1724
|
-
}
|
|
1725
|
-
: {};
|
|
1726
|
-
return (React.createElement("div", { ref: ref, onClick: handleClick },
|
|
1727
|
-
React.createElement(CatalogTile, Object.assign({ id: id + '-catalog-tile', style: {
|
|
1714
|
+
return (React.createElement("div", { ref: ref },
|
|
1715
|
+
React.createElement(CatalogTile, { id: id + '-catalog-tile', style: {
|
|
1728
1716
|
cursor: 'pointer',
|
|
1729
|
-
}, icon: quickStartIcon, className: "pfext-quick-start-tile", "data-testid": `qs-card-${camelize(displayName)}`, featured: isActive, title: React.createElement(QuickStartTileHeader, { name: displayName, status: status, duration: durationMinutes, type: type, quickStartId: id,
|
|
1717
|
+
}, icon: quickStartIcon, className: "pfext-quick-start-tile", "data-testid": `qs-card-${camelize(displayName)}`, featured: isActive, title: React.createElement(QuickStartTileHeader, { name: displayName, status: status, duration: durationMinutes, type: type, quickStartId: id }), onClick: handleClick, onKeyDown: (event) => {
|
|
1730
1718
|
if (event.key === 'Enter' || event.key === ' ') {
|
|
1731
1719
|
setActiveQuickStart(id, tasks === null || tasks === void 0 ? void 0 : tasks.length);
|
|
1732
1720
|
onClick();
|
|
1733
1721
|
}
|
|
1734
|
-
}
|
|
1735
|
-
//
|
|
1736
|
-
|
|
1737
|
-
isSelectableRaised: true }))));
|
|
1722
|
+
},
|
|
1723
|
+
// https://github.com/patternfly/patternfly-react/issues/7039
|
|
1724
|
+
href: link === null || link === void 0 ? void 0 : link.href, "data-test": `tile ${id}`, description: React.createElement(QuickStartTileDescription, { description: description, prerequisites: prerequisites }), footer: footerComponent, tabIndex: 0 })));
|
|
1738
1725
|
};
|
|
1739
1726
|
|
|
1740
1727
|
const QuickStartCatalog = ({ quickStarts }) => {
|
|
@@ -1765,7 +1752,7 @@ const QuickStartCatalogFilterSelect = (_a) => {
|
|
|
1765
1752
|
};
|
|
1766
1753
|
const QuickStartCatalogFilterCount = ({ quickStartsCount }) => {
|
|
1767
1754
|
const { getResource } = React.useContext(QuickStartContext);
|
|
1768
|
-
return (React.createElement(ToolbarItem, { className: "pfext-quick-start-catalog-filter__count", align: { default: '
|
|
1755
|
+
return (React.createElement(ToolbarItem, { className: "pfext-quick-start-catalog-filter__count", align: { default: 'alignEnd' } }, getResource('{{count, number}} item', quickStartsCount).replace('{{count, number}}', quickStartsCount)));
|
|
1769
1756
|
};
|
|
1770
1757
|
const QuickStartCatalogFilterSearchWrapper = ({ onSearchInputChange = () => { } }) => {
|
|
1771
1758
|
const { useQueryParams, filter, setFilter } = React.useContext(QuickStartContext);
|
|
@@ -1864,8 +1851,7 @@ const QuickStartCatalogFilter = (_a) => {
|
|
|
1864
1851
|
|
|
1865
1852
|
const QuickStartCatalogEmptyState = ({ clearFilters }) => {
|
|
1866
1853
|
const { getResource } = React.useContext(QuickStartContext);
|
|
1867
|
-
return (React.createElement(EmptyState, null,
|
|
1868
|
-
React.createElement(EmptyStateHeader, { titleText: React.createElement(React.Fragment, null, getResource('No results found')), icon: React.createElement(EmptyStateIcon, { icon: SearchIcon }), headingLevel: "h4" }),
|
|
1854
|
+
return (React.createElement(EmptyState, { headingLevel: "h4", icon: SearchIcon, titleText: React.createElement(React.Fragment, null, getResource('No results found')) },
|
|
1869
1855
|
React.createElement(EmptyStateBody, null, getResource('No results match the filter criteria. Remove filters or clear all filters to show results.')),
|
|
1870
1856
|
React.createElement(EmptyStateFooter, null,
|
|
1871
1857
|
React.createElement(EmptyStateActions, null,
|
|
@@ -1960,28 +1946,6 @@ const QuickStartCloseModal = ({ isOpen, onConfirm, onCancel, }) => {
|
|
|
1960
1946
|
React.createElement(Button, { variant: "primary", "data-test": "leave button", onClick: onConfirm }, getResource('Leave')))), isFullScreen: true }, getResource('Your progress will be saved.')));
|
|
1961
1947
|
};
|
|
1962
1948
|
|
|
1963
|
-
const TaskIcon = ({ taskIndex, taskStatus }) => {
|
|
1964
|
-
const { getResource } = React.useContext(QuickStartContext);
|
|
1965
|
-
const success = taskStatus === QuickStartTaskStatus.SUCCESS;
|
|
1966
|
-
const failed = taskStatus === QuickStartTaskStatus.FAILED;
|
|
1967
|
-
const classNames = css('pfext-icon-and-text__icon', {
|
|
1968
|
-
'pfext-quick-start-task-header__task-icon-init': !failed && !success,
|
|
1969
|
-
});
|
|
1970
|
-
let content;
|
|
1971
|
-
if (success) {
|
|
1972
|
-
content = (React.createElement(Icon, { size: "md" },
|
|
1973
|
-
React.createElement(CheckCircleIcon, { className: "pfext-quick-start-task-header__task-icon-success" }),
|
|
1974
|
-
' '));
|
|
1975
|
-
}
|
|
1976
|
-
else if (failed) {
|
|
1977
|
-
content = (React.createElement(Icon, { size: "md" },
|
|
1978
|
-
React.createElement(ExclamationCircleIcon, { className: "pfext-quick-start-task-header__task-icon-failed" })));
|
|
1979
|
-
}
|
|
1980
|
-
else {
|
|
1981
|
-
content = getResource('{{taskIndex, number}}', taskIndex).replace('{{taskIndex, number}}', taskIndex);
|
|
1982
|
-
}
|
|
1983
|
-
return React.createElement("span", { className: classNames }, content);
|
|
1984
|
-
};
|
|
1985
1949
|
const QuickStartTaskHeader = ({ title, taskIndex, subtitle, taskStatus, size, isActiveTask, onTaskSelect, children, }) => {
|
|
1986
1950
|
const titleRef = React.useRef(null);
|
|
1987
1951
|
React.useEffect(() => {
|
|
@@ -1990,7 +1954,7 @@ const QuickStartTaskHeader = ({ title, taskIndex, subtitle, taskStatus, size, is
|
|
|
1990
1954
|
titleRef.current.parentNode.focus();
|
|
1991
1955
|
}
|
|
1992
1956
|
}, [isActiveTask]);
|
|
1993
|
-
|
|
1957
|
+
css('pfext-quick-start-task-header__title', {
|
|
1994
1958
|
'pfext-quick-start-task-header__title-success': taskStatus === QuickStartTaskStatus.SUCCESS,
|
|
1995
1959
|
'pfext-quick-start-task-header__title-failed': taskStatus === (QuickStartTaskStatus.FAILED || QuickStartTaskStatus.VISITED),
|
|
1996
1960
|
});
|
|
@@ -2002,18 +1966,17 @@ const QuickStartTaskHeader = ({ title, taskIndex, subtitle, taskStatus, size, is
|
|
|
2002
1966
|
const tryAgain = failedReview && (React.createElement(React.Fragment, null,
|
|
2003
1967
|
React.createElement("div", null),
|
|
2004
1968
|
React.createElement("div", { className: "pfext-quick-start-task-header__tryagain" }, "Try the steps again.")));
|
|
2005
|
-
const content = (React.createElement("div", {
|
|
2006
|
-
React.createElement(
|
|
2007
|
-
React.createElement(Title, { headingLevel: "h3", size: size, className: classNames },
|
|
1969
|
+
const content = (React.createElement("div", { ref: titleRef },
|
|
1970
|
+
React.createElement(Title, { headingLevel: "h3" },
|
|
2008
1971
|
React.createElement("span", { dangerouslySetInnerHTML: { __html: removeParagraphWrap(markdownConvert(title)) } }),
|
|
2009
|
-
isActiveTask && subtitle && (React.createElement("span", {
|
|
1972
|
+
isActiveTask && subtitle && (React.createElement("span", { "data-test-id": "quick-start-task-subtitle" },
|
|
2010
1973
|
' ',
|
|
2011
|
-
subtitle))),
|
|
2012
|
-
|
|
1974
|
+
React.createElement(Text, { component: TextVariants.small }, subtitle))),
|
|
1975
|
+
tryAgain)));
|
|
2013
1976
|
return (React.createElement(WizardNavItem, { content: content, stepIndex: taskIndex, onClick: () => onTaskSelect(taskIndex - 1), component: "button", isCurrent: isActiveTask }, children));
|
|
2014
1977
|
};
|
|
2015
1978
|
|
|
2016
|
-
const QuickStartTaskHeaderList = ({ tasks, allTaskStatuses, onTaskSelect, }) => tasks.length > 0 ? (React.createElement(List, { className: "
|
|
1979
|
+
const QuickStartTaskHeaderList = ({ tasks, allTaskStatuses, onTaskSelect, }) => tasks.length > 0 ? (React.createElement(List, { className: "pf-v6-c-wizard__nav-list" }, tasks.map((task, index) => (React.createElement(QuickStartTaskHeader, { key: task.title, title: task.title, taskIndex: index + 1, size: "md", taskStatus: allTaskStatuses[index], onTaskSelect: onTaskSelect }))))) : null;
|
|
2017
1980
|
|
|
2018
1981
|
const QuickStartConclusion = ({ tasks, conclusion, allTaskStatuses, nextQuickStarts, onQuickStartChange, onTaskSelect, }) => {
|
|
2019
1982
|
const hasFailedTask = allTaskStatuses.includes(QuickStartTaskStatus.FAILED);
|
|
@@ -2031,7 +1994,7 @@ const QuickStartConclusion = ({ tasks, conclusion, allTaskStatuses, nextQuickSta
|
|
|
2031
1994
|
return (React.createElement(Button, { variant: "link", onClick: () => onQuickStartChange(nextQuickStart.metadata.name), isInline: true, isBlock: true, key: index },
|
|
2032
1995
|
getResource('Start {{nextQSDisplayName}} quick start').replace('{{nextQSDisplayName}}', (_a = nextQuickStart === null || nextQuickStart === void 0 ? void 0 : nextQuickStart.spec) === null || _a === void 0 ? void 0 : _a.displayName),
|
|
2033
1996
|
' ',
|
|
2034
|
-
React.createElement(ArrowRightIcon, { style: { marginLeft: 'var(--pf-
|
|
1997
|
+
React.createElement(ArrowRightIcon, { style: { marginLeft: 'var(--pf-t--global--spacer--xs)', verticalAlign: 'middle' } })));
|
|
2035
1998
|
})));
|
|
2036
1999
|
};
|
|
2037
2000
|
|
|
@@ -2046,7 +2009,7 @@ const QuickStartIntroduction = ({ tasks, introduction, allTaskStatuses, prerequi
|
|
|
2046
2009
|
return (React.createElement(React.Fragment, null,
|
|
2047
2010
|
React.createElement(QuickStartMarkdownView, { content: introduction }),
|
|
2048
2011
|
prereqList,
|
|
2049
|
-
React.createElement("p", { style: { marginBottom: 'var(--pf-
|
|
2012
|
+
React.createElement("p", { style: { marginBottom: 'var(--pf-t--global--spacer--md)' } },
|
|
2050
2013
|
getResource('In this quick start, you will complete {{count, number}} task', tasks.length).replace('{{count, number}}', tasks.length),
|
|
2051
2014
|
":"),
|
|
2052
2015
|
React.createElement(QuickStartTaskHeaderList, { tasks: tasks, allTaskStatuses: allTaskStatuses, onTaskSelect: onTaskSelect })));
|
|
@@ -2157,7 +2120,7 @@ const QuickStartController = ({ quickStart, nextQuickStarts, contentRef, footerC
|
|
|
2157
2120
|
const getQuickStartActiveTask = React.useCallback(() => {
|
|
2158
2121
|
let activeTaskNumber = 0;
|
|
2159
2122
|
while (activeTaskNumber !== totalTasks &&
|
|
2160
|
-
activeQuickStartState[`taskStatus${activeTaskNumber}`]
|
|
2123
|
+
activeQuickStartState[`taskStatus${activeTaskNumber}`] !== QuickStartTaskStatus.INIT) {
|
|
2161
2124
|
activeTaskNumber++;
|
|
2162
2125
|
}
|
|
2163
2126
|
return activeTaskNumber;
|
|
@@ -2233,7 +2196,7 @@ const QuickStartPanelContent = (_a) => {
|
|
|
2233
2196
|
React.createElement("div", { className: headerClasses },
|
|
2234
2197
|
React.createElement(DrawerHead, null,
|
|
2235
2198
|
React.createElement("div", { className: "pfext-quick-start-panel-content__title", tabIndex: -1, ref: titleRef },
|
|
2236
|
-
React.createElement(Title, { headingLevel: "h2", size: "xl", className: "pfext-quick-start-panel-content__name", style: { marginRight: 'var(--pf-
|
|
2199
|
+
React.createElement(Title, { headingLevel: "h2", size: "xl", className: "pfext-quick-start-panel-content__name", style: { marginRight: 'var(--pf-t--global--spacer--md)' } },
|
|
2237
2200
|
React.createElement("span", { dangerouslySetInnerHTML: {
|
|
2238
2201
|
__html: removeParagraphWrap(markdownConvert(quickStart === null || quickStart === void 0 ? void 0 : quickStart.spec.displayName)),
|
|
2239
2202
|
} }),
|
|
@@ -2347,7 +2310,7 @@ const QuickStartDrawer = (_a) => {
|
|
|
2347
2310
|
const panelContent = (React.createElement(QuickStartPanelContent, Object.assign({ quickStarts: combinedQuickStarts, handleClose: handleClose, activeQuickStartID: activeQuickStartID, appendTo: appendTo, isResizable: !fullWidth, headerVariant: useLegacyHeaderColors ? '' : 'blue-white' }, fullWidthPanelStyle)));
|
|
2348
2311
|
return (React.createElement(React.Fragment, null,
|
|
2349
2312
|
React.createElement(Drawer, Object.assign({ isExpanded: !!activeQuickStartID, isInline: true }, props), children ? (React.createElement(DrawerContent, Object.assign({ panelContent: panelContent }, fullWidthBodyStyle),
|
|
2350
|
-
React.createElement(DrawerContentBody, { className: "pfext-quick-start-drawer__body" }, children))) : (React.createElement("div", { className: "pf-
|
|
2313
|
+
React.createElement(DrawerContentBody, { className: "pfext-quick-start-drawer__body" }, children))) : (React.createElement("div", { className: "pf-v6-c-drawer__main" }, panelContent))),
|
|
2351
2314
|
React.createElement(QuickStartCloseModal, { isOpen: modalOpen, onConfirm: onModalConfirm, onCancel: onModalCancel })));
|
|
2352
2315
|
};
|
|
2353
2316
|
|
|
@@ -2415,7 +2378,7 @@ const HelpTopicPanelContent = (_a) => {
|
|
|
2415
2378
|
React.createElement("div", { className: "pfext-quick-start-panel-content__title" },
|
|
2416
2379
|
helpTopicOptions && (React.createElement(Select, { isPlain: true, id: "help-topics-select", selected: activeHelpTopic, isOpen: isHelpTopicMenuOpen, onSelect: onSelectHelpTopic, onOpenChange: (isOpen) => setIsHelpTopicMenuOpen(isOpen), toggle: (toggleRef) => (React.createElement(MenuToggle, { isFullWidth: true, ref: toggleRef, icon: React.createElement(BarsIcon, null), onClick: toggleHelpTopicMenu, isExpanded: isHelpTopicMenuOpen }, activeHelpTopic === null || activeHelpTopic === void 0 ? void 0 : activeHelpTopic.title)) },
|
|
2417
2380
|
React.createElement(SelectList, null, helpTopicOptions))),
|
|
2418
|
-
React.createElement(Title, { headingLevel: "h1", size: "xl", className: "pfext-quick-start-panel-content__name", style: { marginRight: 'var(--pf-
|
|
2381
|
+
React.createElement(Title, { headingLevel: "h1", size: "xl", className: "pfext-quick-start-panel-content__name", style: { marginRight: 'var(--pf-t--global--spacer--md)' } }, activeHelpTopic === null || activeHelpTopic === void 0 ? void 0 : activeHelpTopic.title)),
|
|
2419
2382
|
React.createElement(DrawerActions, null,
|
|
2420
2383
|
React.createElement(DrawerCloseButton, { onClick: onClose, className: "pfext-quick-start-panel-content__close-button", "data-testid": "qs-drawer-close" }))),
|
|
2421
2384
|
React.createElement(Divider, null),
|
|
@@ -2451,7 +2414,7 @@ const HelpTopicDrawer = (_a) => {
|
|
|
2451
2414
|
const panelContent = (React.createElement(HelpTopicPanelContent, { activeHelpTopic: activeHelpTopic, filteredHelpTopics: filteredHelpTopics, onClose: onClose }));
|
|
2452
2415
|
return (React.createElement(React.Fragment, null,
|
|
2453
2416
|
React.createElement(Drawer, Object.assign({ isExpanded: !!activeHelpTopic, isInline: true }, props), children ? (React.createElement(DrawerContent, { panelContent: panelContent },
|
|
2454
|
-
React.createElement(DrawerContentBody, { className: "pfext-quick-start-drawer__body" }, children))) : (React.createElement("div", { className: "pf-
|
|
2417
|
+
React.createElement(DrawerContentBody, { className: "pfext-quick-start-drawer__body" }, children))) : (React.createElement("div", { className: "pf-v6-c-drawer__main" }, panelContent)))));
|
|
2455
2418
|
};
|
|
2456
2419
|
|
|
2457
2420
|
const useLocalStorage = (key, initialValue) => {
|