@patternfly/quickstarts 5.3.0-prerelease.1 → 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 +155 -787
- 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 +192 -921
- 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
package/dist/index.js
CHANGED
|
@@ -17,14 +17,10 @@ var FireIcon = require('@patternfly/react-icons/dist/js/icons/fire-icon');
|
|
|
17
17
|
var showdown = require('showdown');
|
|
18
18
|
var SyncAltIcon = require('@patternfly/react-icons/dist/js/icons/sync-alt-icon');
|
|
19
19
|
var CheckCircleIcon = require('@patternfly/react-icons/dist/js/icons/check-circle-icon');
|
|
20
|
-
|
|
20
|
+
require('@patternfly/react-icons/dist/js/icons/exclamation-circle-icon');
|
|
21
21
|
var InfoCircleIcon = require('@patternfly/react-icons/dist/js/icons/info-circle-icon');
|
|
22
|
-
require('@patternfly/react-tokens/dist/esm/global_danger_color_100');
|
|
23
|
-
require('@patternfly/react-tokens/dist/esm/global_palette_blue_300');
|
|
24
|
-
var okColor = require('@patternfly/react-tokens/dist/esm/global_palette_green_500');
|
|
25
22
|
var ExternalLinkAltIcon = require('@patternfly/react-icons/dist/js/icons/external-link-alt-icon');
|
|
26
23
|
var OutlinedClockIcon = require('@patternfly/react-icons/dist/js/icons/outlined-clock-icon');
|
|
27
|
-
var OutlinedBookmarkIcon = require('@patternfly/react-icons/dist/js/icons/outlined-bookmark-icon');
|
|
28
24
|
var ArrowRightIcon = require('@patternfly/react-icons/dist/js/icons/arrow-right-icon');
|
|
29
25
|
var BarsIcon = require('@patternfly/react-icons/dist/js/icons/bars-icon');
|
|
30
26
|
|
|
@@ -60,30 +56,24 @@ var LightbulbIcon__default = /*#__PURE__*/_interopDefaultLegacy(LightbulbIcon);
|
|
|
60
56
|
var FireIcon__default = /*#__PURE__*/_interopDefaultLegacy(FireIcon);
|
|
61
57
|
var SyncAltIcon__default = /*#__PURE__*/_interopDefaultLegacy(SyncAltIcon);
|
|
62
58
|
var CheckCircleIcon__default = /*#__PURE__*/_interopDefaultLegacy(CheckCircleIcon);
|
|
63
|
-
var ExclamationCircleIcon__default = /*#__PURE__*/_interopDefaultLegacy(ExclamationCircleIcon);
|
|
64
59
|
var InfoCircleIcon__default = /*#__PURE__*/_interopDefaultLegacy(InfoCircleIcon);
|
|
65
|
-
var okColor__default = /*#__PURE__*/_interopDefaultLegacy(okColor);
|
|
66
60
|
var ExternalLinkAltIcon__default = /*#__PURE__*/_interopDefaultLegacy(ExternalLinkAltIcon);
|
|
67
61
|
var OutlinedClockIcon__default = /*#__PURE__*/_interopDefaultLegacy(OutlinedClockIcon);
|
|
68
|
-
var OutlinedBookmarkIcon__default = /*#__PURE__*/_interopDefaultLegacy(OutlinedBookmarkIcon);
|
|
69
62
|
var ArrowRightIcon__default = /*#__PURE__*/_interopDefaultLegacy(ArrowRightIcon);
|
|
70
63
|
var BarsIcon__default = /*#__PURE__*/_interopDefaultLegacy(BarsIcon);
|
|
71
64
|
|
|
72
65
|
function _extends() {
|
|
73
|
-
_extends = Object.assign
|
|
66
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
74
67
|
for (var i = 1; i < arguments.length; i++) {
|
|
75
68
|
var source = arguments[i];
|
|
76
|
-
|
|
77
69
|
for (var key in source) {
|
|
78
70
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
79
71
|
target[key] = source[key];
|
|
80
72
|
}
|
|
81
73
|
}
|
|
82
74
|
}
|
|
83
|
-
|
|
84
75
|
return target;
|
|
85
76
|
};
|
|
86
|
-
|
|
87
77
|
return _extends.apply(this, arguments);
|
|
88
78
|
}
|
|
89
79
|
|
|
@@ -908,8 +898,8 @@ class CatalogTile extends React__namespace.Component {
|
|
|
908
898
|
const _a = this.props, { id, className, featured, onClick, href, icon, iconImg, iconAlt, iconClass, badges, title, vendor, description, footer,
|
|
909
899
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
910
900
|
ref, children } = _a, props = tslib.__rest(_a, ["id", "className", "featured", "onClick", "href", "icon", "iconImg", "iconAlt", "iconClass", "badges", "title", "vendor", "description", "footer", "ref", "children"]);
|
|
911
|
-
return (React__namespace.createElement(reactCore.Card, Object.assign({ component: href ? 'a' : 'div', id: id || this.generatedId, href: href || '#', className: reactStyles.css('catalog-tile-pf', { featured }, className), isClickable: !!onClick }, props),
|
|
912
|
-
(badges.length > 0 || iconImg || iconClass || icon || onClick) && (React__namespace.createElement(reactCore.CardHeader, { actions: { actions: badges.length > 0 && this.renderBadges(badges) }, selectableActions: onClick && {
|
|
901
|
+
return (React__namespace.createElement(reactCore.Card, Object.assign({ component: href ? 'a' : 'div', id: id || this.generatedId, href: href || '#', className: reactStyles.css('catalog-tile-pf', { featured }, className), variant: featured ? 'secondary' : 'default', isClickable: !!onClick }, props),
|
|
902
|
+
(badges.length > 0 || iconImg || iconClass || icon || onClick) && (React__namespace.createElement(reactCore.CardHeader, { actions: { actions: badges.length > 0 && this.renderBadges(badges), hasNoOffset: true }, selectableActions: onClick && {
|
|
913
903
|
selectableActionId: id + '-input',
|
|
914
904
|
onClickAction: (e) => this.handleClick(e),
|
|
915
905
|
selectableActionAriaLabelledby: id
|
|
@@ -1150,7 +1140,7 @@ const StaticSpotlight = ({ element }) => {
|
|
|
1150
1140
|
}
|
|
1151
1141
|
: {};
|
|
1152
1142
|
return clientRect ? (React__namespace.createElement(Portal, null,
|
|
1153
|
-
React__namespace.createElement("div", { className: "pf-
|
|
1143
|
+
React__namespace.createElement("div", { className: "pf-v6-c-backdrop pfext-spotlight__with-backdrop" },
|
|
1154
1144
|
React__namespace.createElement("div", { className: "pfext-spotlight pfext-spotlight__element-highlight-noanimate", style: style })))) : null;
|
|
1155
1145
|
};
|
|
1156
1146
|
|
|
@@ -1273,11 +1263,11 @@ const useInlineCopyClipboardShowdownExtension = () => {
|
|
|
1273
1263
|
if (!group || isNaN(groupId)) {
|
|
1274
1264
|
return text;
|
|
1275
1265
|
}
|
|
1276
|
-
return removeTemplateWhitespace(`<span class="pf-
|
|
1277
|
-
<span class="pf-
|
|
1278
|
-
<span class="pf-
|
|
1279
|
-
<span class="pf-
|
|
1280
|
-
<button class="pf-
|
|
1266
|
+
return removeTemplateWhitespace(`<span class="pf-v6-c-clipboard-copy pf-m-inline">
|
|
1267
|
+
<span class="pf-v6-c-clipboard-copy__text" ${MARKDOWN_SNIPPET_ID}="${groupId}">${group}</span>
|
|
1268
|
+
<span class="pf-v6-c-clipboard-copy__actions">
|
|
1269
|
+
<span class="pf-v6-c-clipboard-copy__actions-item">
|
|
1270
|
+
<button class="pf-v6-c-button pf-m-plain" aria-label="${getResource('Copy to clipboard')}" ${MARKDOWN_COPY_BUTTON_ID}="${groupId}">
|
|
1281
1271
|
${server.renderToStaticMarkup(React__namespace.createElement(CopyIcon__default['default'], null))}
|
|
1282
1272
|
</button>
|
|
1283
1273
|
</span>
|
|
@@ -1296,19 +1286,19 @@ const useMultilineCopyClipboardShowdownExtension = () => {
|
|
|
1296
1286
|
if (!group || isNaN(groupId)) {
|
|
1297
1287
|
return text;
|
|
1298
1288
|
}
|
|
1299
|
-
return `<div class="pf-
|
|
1300
|
-
<div class="pf-
|
|
1301
|
-
<div class="pf-
|
|
1302
|
-
<div class="pf-
|
|
1303
|
-
<button class="pf-
|
|
1289
|
+
return `<div class="pf-v6-c-code-block">
|
|
1290
|
+
<div class="pf-v6-c-code-block__header">
|
|
1291
|
+
<div class="pf-v6-c-code-block__actions">
|
|
1292
|
+
<div class="pf-v6-c-code-block__actions-item">
|
|
1293
|
+
<button class="pf-v6-c-button pf-m-plain" type="button" aria-label="${getResource('Copy to clipboard')}" ${MARKDOWN_COPY_BUTTON_ID}="${groupId}">
|
|
1304
1294
|
${server.renderToStaticMarkup(React__namespace.createElement(CopyIcon__default['default'], null))}
|
|
1305
1295
|
</button>
|
|
1306
1296
|
</div>
|
|
1307
1297
|
</div>
|
|
1308
1298
|
</div>
|
|
1309
|
-
<div class="pf-
|
|
1310
|
-
<pre class="pf-
|
|
1311
|
-
<code class="pf-
|
|
1299
|
+
<div class="pf-v6-c-code-block__content">
|
|
1300
|
+
<pre class="pf-v6-c-code-block__pre pfext-code-block__pre">
|
|
1301
|
+
<code class="pf-v6-c-code-block__code"
|
|
1312
1302
|
${MARKDOWN_SNIPPET_ID}="${groupId}">${group.trim()}</code>
|
|
1313
1303
|
</pre>
|
|
1314
1304
|
</div>
|
|
@@ -1339,7 +1329,7 @@ const markdownConvert = (markdown, extensions) => {
|
|
|
1339
1329
|
// add PF class to ul and ol lists
|
|
1340
1330
|
if (node.nodeType === 1 &&
|
|
1341
1331
|
(node.nodeName.toLowerCase() === 'ul' || node.nodeName.toLowerCase() === 'ol')) {
|
|
1342
|
-
node.setAttribute('class', 'pf-
|
|
1332
|
+
node.setAttribute('class', 'pf-v6-c-list');
|
|
1343
1333
|
return node;
|
|
1344
1334
|
}
|
|
1345
1335
|
});
|
|
@@ -1450,7 +1440,7 @@ const IFrameMarkdownView = ({ exactHeight, markup, isEmpty, renderExtension, cla
|
|
|
1450
1440
|
body {
|
|
1451
1441
|
background-color: transparent !important;
|
|
1452
1442
|
color: ${isEmpty ? '#999' : '#333'};
|
|
1453
|
-
font-family: var(--pf-
|
|
1443
|
+
font-family: var(--pf-t--global--font--family--body);
|
|
1454
1444
|
min-width: auto !important;
|
|
1455
1445
|
}
|
|
1456
1446
|
table {
|
|
@@ -1496,7 +1486,7 @@ const QuickStartMarkdownView = ({ content, exactHeight, className, }) => {
|
|
|
1496
1486
|
if (!linkLabel || !linkType || !linkId) {
|
|
1497
1487
|
return text;
|
|
1498
1488
|
}
|
|
1499
|
-
return `<button class="pf-
|
|
1489
|
+
return `<button class="pf-v6-c-button pf-m-inline pf-m-link" data-highlight="${linkId}">${linkLabel}</button>`;
|
|
1500
1490
|
},
|
|
1501
1491
|
},
|
|
1502
1492
|
{
|
|
@@ -1572,10 +1562,11 @@ const useAccordionShowdownExtension = () => React__namespace.useMemo(() => ({
|
|
|
1572
1562
|
regex: /\[(.+)]{{(accordion) ("(.*?)")}}/g,
|
|
1573
1563
|
replace: (_text, accordionContent, _command, accordionHeading) => {
|
|
1574
1564
|
const accordionId = String(accordionHeading).replace(/\s/g, '-');
|
|
1575
|
-
return removeTemplateWhitespace(server.renderToStaticMarkup(React__namespace.createElement(
|
|
1576
|
-
React__namespace.createElement(reactCore.
|
|
1577
|
-
React__namespace.createElement(reactCore.
|
|
1578
|
-
|
|
1565
|
+
return removeTemplateWhitespace(server.renderToStaticMarkup(React__namespace.createElement(React__namespace.Fragment, null,
|
|
1566
|
+
React__namespace.createElement(reactCore.Accordion, { asDefinitionList: true },
|
|
1567
|
+
React__namespace.createElement(reactCore.AccordionItem, { isExpanded: false },
|
|
1568
|
+
React__namespace.createElement(reactCore.AccordionToggle, { id: `${ACCORDION_MARKDOWN_BUTTON_ID}-${accordionId}` }, accordionHeading),
|
|
1569
|
+
React__namespace.createElement(reactCore.AccordionContent, { id: `${ACCORDION_MARKDOWN_CONTENT_ID}-${accordionId}` }, accordionContent))))));
|
|
1579
1570
|
},
|
|
1580
1571
|
}), []);
|
|
1581
1572
|
|
|
@@ -1583,9 +1574,9 @@ const AccordionShowdownHandler = ({ buttonElement, contentElement, }) => {
|
|
|
1583
1574
|
const [expanded, setExpanded] = React__namespace.useState(false);
|
|
1584
1575
|
const handleClick = () => {
|
|
1585
1576
|
const expandedModifier = 'pf-m-expanded';
|
|
1586
|
-
buttonElement.className = `pf-
|
|
1577
|
+
buttonElement.className = `pf-v6-c-accordion__toggle ${!expanded ? expandedModifier : ''}`;
|
|
1587
1578
|
contentElement.hidden = expanded;
|
|
1588
|
-
contentElement.className = `pf-
|
|
1579
|
+
contentElement.className = `pf-v6-c-accordion__expanded-content ${!expanded ? expandedModifier : ''}`;
|
|
1589
1580
|
setExpanded(!expanded);
|
|
1590
1581
|
};
|
|
1591
1582
|
useEventListener(buttonElement, 'click', handleClick);
|
|
@@ -1636,8 +1627,8 @@ const GenericStatus = (props) => {
|
|
|
1636
1627
|
return React__namespace.Children.toArray(children).length ? (React__namespace.createElement(PopoverStatus, Object.assign({ title: popoverTitle || title }, restProps, { statusBody: statusBody }), children)) : (statusBody);
|
|
1637
1628
|
};
|
|
1638
1629
|
|
|
1639
|
-
const GreenCheckCircleIcon = ({ className, title, size }) => (React__namespace.createElement(reactCore.Icon, { size: size },
|
|
1640
|
-
React__namespace.createElement(CheckCircleIcon__default['default'], { "data-test": "success-icon",
|
|
1630
|
+
const GreenCheckCircleIcon = ({ className, title, size }) => (React__namespace.createElement(reactCore.Icon, { size: size, status: "success" },
|
|
1631
|
+
React__namespace.createElement(CheckCircleIcon__default['default'], { "data-test": "success-icon", className: className, title: title })));
|
|
1641
1632
|
|
|
1642
1633
|
const SuccessStatus = (props) => (React__namespace.createElement(GenericStatus, Object.assign({}, props, { Icon: GreenCheckCircleIcon, title: props.title || 'Healthy' })));
|
|
1643
1634
|
SuccessStatus.displayName = 'SuccessStatus';
|
|
@@ -1712,35 +1703,33 @@ const statusColorMap = {
|
|
|
1712
1703
|
[exports.QuickStartStatus.IN_PROGRESS]: 'purple',
|
|
1713
1704
|
[exports.QuickStartStatus.NOT_STARTED]: 'grey',
|
|
1714
1705
|
};
|
|
1715
|
-
const QuickStartTileHeader = ({ status, duration, name, type, quickStartId,
|
|
1706
|
+
const QuickStartTileHeader = ({ status, duration, name, type, quickStartId, }) => {
|
|
1716
1707
|
const { getResource } = React__namespace.useContext(QuickStartContext);
|
|
1717
1708
|
const statusLocaleMap = {
|
|
1718
1709
|
[exports.QuickStartStatus.COMPLETE]: getResource('Complete'),
|
|
1719
1710
|
[exports.QuickStartStatus.IN_PROGRESS]: getResource('In progress'),
|
|
1720
1711
|
[exports.QuickStartStatus.NOT_STARTED]: getResource('Not started'),
|
|
1721
1712
|
};
|
|
1722
|
-
const ActionIcon = (action === null || action === void 0 ? void 0 : action.icon) || OutlinedBookmarkIcon__default['default'];
|
|
1723
1713
|
return (React__namespace.createElement("div", { className: "pfext-quick-start-tile-header" },
|
|
1724
|
-
React__namespace.createElement(reactCore.
|
|
1725
|
-
React__namespace.createElement(
|
|
1726
|
-
React__namespace.createElement(QuickStartMarkdownView, { content: name })),
|
|
1727
|
-
action && (React__namespace.createElement(reactCore.Button, Object.assign({ "aria-label": action['aria-label'], icon: React__namespace.createElement(ActionIcon, null), variant: "plain", onClick: action.onClick }, action.buttonProps)))),
|
|
1714
|
+
React__namespace.createElement(reactCore.Title, { headingLevel: "h3", "data-test": "title", id: quickStartId },
|
|
1715
|
+
React__namespace.createElement(QuickStartMarkdownView, { content: name })),
|
|
1728
1716
|
React__namespace.createElement("div", { className: "pfext-quick-start-tile-header__status" },
|
|
1729
1717
|
type && (React__namespace.createElement(reactCore.Label, { className: "pfext-quick-start-tile-header--margin", color: type.color }, type.text)),
|
|
1730
1718
|
duration && (React__namespace.createElement(reactCore.Label, { variant: "outline", "data-test": "duration", icon: React__namespace.createElement(OutlinedClockIcon__default['default'], null), className: "pfext-quick-start-tile-header--margin" }, getResource('{{duration, number}} minutes', duration).replace('{{duration, number}}', duration))),
|
|
1731
1719
|
status !== exports.QuickStartStatus.NOT_STARTED && (React__namespace.createElement(reactCore.Label, { variant: "outline", color: statusColorMap[status], icon: React__namespace.createElement(StatusIcon, { status: status }), "data-test": "status" }, statusLocaleMap[status])))));
|
|
1732
1720
|
};
|
|
1733
1721
|
|
|
1734
|
-
const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { },
|
|
1722
|
+
const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { }, }) => {
|
|
1735
1723
|
const { metadata: { name: id }, spec: { icon, tasks, displayName, description, durationMinutes, prerequisites, link, type }, } = quickStart;
|
|
1736
1724
|
const { setActiveQuickStart, footer } = React__namespace.useContext(QuickStartContext);
|
|
1737
1725
|
const ref = React__namespace.useRef(null);
|
|
1738
1726
|
let quickStartIcon;
|
|
1739
1727
|
if (typeof icon === 'object') {
|
|
1740
|
-
quickStartIcon = icon;
|
|
1728
|
+
quickStartIcon = React__namespace.createElement(reactCore.Icon, { size: "xl" }, icon);
|
|
1741
1729
|
}
|
|
1742
1730
|
else {
|
|
1743
|
-
quickStartIcon = (React__namespace.createElement(
|
|
1731
|
+
quickStartIcon = (React__namespace.createElement(reactCore.Icon, { size: "xl" },
|
|
1732
|
+
React__namespace.createElement(FallbackImg, { className: "pfext-catalog-item-icon__img--large", src: icon, alt: "", fallback: React__namespace.createElement(RocketIcon__default['default'], null) })));
|
|
1744
1733
|
}
|
|
1745
1734
|
const footerComponent = React__namespace.useMemo(() => {
|
|
1746
1735
|
if (footer && footer.show === false) {
|
|
@@ -1754,31 +1743,26 @@ const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { }, act
|
|
|
1754
1743
|
const handleClick = (e) => {
|
|
1755
1744
|
var _a;
|
|
1756
1745
|
if ((_a = ref.current) === null || _a === void 0 ? void 0 : _a.contains(e.target)) {
|
|
1757
|
-
if (
|
|
1746
|
+
if (link) {
|
|
1747
|
+
window.open(link.href);
|
|
1748
|
+
}
|
|
1749
|
+
else {
|
|
1758
1750
|
setActiveQuickStart(id, tasks === null || tasks === void 0 ? void 0 : tasks.length);
|
|
1759
1751
|
}
|
|
1760
1752
|
onClick();
|
|
1761
1753
|
}
|
|
1762
1754
|
};
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
href: link.href,
|
|
1766
|
-
target: '_blank',
|
|
1767
|
-
rel: 'noreferrer',
|
|
1768
|
-
}
|
|
1769
|
-
: {};
|
|
1770
|
-
return (React__namespace.createElement("div", { ref: ref, onClick: handleClick },
|
|
1771
|
-
React__namespace.createElement(CatalogTile, Object.assign({ id: id + '-catalog-tile', style: {
|
|
1755
|
+
return (React__namespace.createElement("div", { ref: ref },
|
|
1756
|
+
React__namespace.createElement(CatalogTile, { id: id + '-catalog-tile', style: {
|
|
1772
1757
|
cursor: 'pointer',
|
|
1773
|
-
}, icon: quickStartIcon, className: "pfext-quick-start-tile", "data-testid": `qs-card-${camelize(displayName)}`, featured: isActive, title: React__namespace.createElement(QuickStartTileHeader, { name: displayName, status: status, duration: durationMinutes, type: type, quickStartId: id,
|
|
1758
|
+
}, icon: quickStartIcon, className: "pfext-quick-start-tile", "data-testid": `qs-card-${camelize(displayName)}`, featured: isActive, title: React__namespace.createElement(QuickStartTileHeader, { name: displayName, status: status, duration: durationMinutes, type: type, quickStartId: id }), onClick: handleClick, onKeyDown: (event) => {
|
|
1774
1759
|
if (event.key === 'Enter' || event.key === ' ') {
|
|
1775
1760
|
setActiveQuickStart(id, tasks === null || tasks === void 0 ? void 0 : tasks.length);
|
|
1776
1761
|
onClick();
|
|
1777
1762
|
}
|
|
1778
|
-
}
|
|
1779
|
-
//
|
|
1780
|
-
|
|
1781
|
-
isSelectableRaised: true }))));
|
|
1763
|
+
},
|
|
1764
|
+
// https://github.com/patternfly/patternfly-react/issues/7039
|
|
1765
|
+
href: link === null || link === void 0 ? void 0 : link.href, "data-test": `tile ${id}`, description: React__namespace.createElement(QuickStartTileDescription, { description: description, prerequisites: prerequisites }), footer: footerComponent, tabIndex: 0 })));
|
|
1782
1766
|
};
|
|
1783
1767
|
|
|
1784
1768
|
const QuickStartCatalog = ({ quickStarts }) => {
|
|
@@ -1809,7 +1793,7 @@ const QuickStartCatalogFilterSelect = (_a) => {
|
|
|
1809
1793
|
};
|
|
1810
1794
|
const QuickStartCatalogFilterCount = ({ quickStartsCount }) => {
|
|
1811
1795
|
const { getResource } = React__namespace.useContext(QuickStartContext);
|
|
1812
|
-
return (React__namespace.createElement(reactCore.ToolbarItem, { className: "pfext-quick-start-catalog-filter__count", align: { default: '
|
|
1796
|
+
return (React__namespace.createElement(reactCore.ToolbarItem, { className: "pfext-quick-start-catalog-filter__count", align: { default: 'alignEnd' } }, getResource('{{count, number}} item', quickStartsCount).replace('{{count, number}}', quickStartsCount)));
|
|
1813
1797
|
};
|
|
1814
1798
|
const QuickStartCatalogFilterSearchWrapper = ({ onSearchInputChange = () => { } }) => {
|
|
1815
1799
|
const { useQueryParams, filter, setFilter } = React__namespace.useContext(QuickStartContext);
|
|
@@ -1908,8 +1892,7 @@ const QuickStartCatalogFilter = (_a) => {
|
|
|
1908
1892
|
|
|
1909
1893
|
const QuickStartCatalogEmptyState = ({ clearFilters }) => {
|
|
1910
1894
|
const { getResource } = React__namespace.useContext(QuickStartContext);
|
|
1911
|
-
return (React__namespace.createElement(reactCore.EmptyState, null,
|
|
1912
|
-
React__namespace.createElement(reactCore.EmptyStateHeader, { titleText: React__namespace.createElement(React__namespace.Fragment, null, getResource('No results found')), icon: React__namespace.createElement(reactCore.EmptyStateIcon, { icon: SearchIcon__default['default'] }), headingLevel: "h4" }),
|
|
1895
|
+
return (React__namespace.createElement(reactCore.EmptyState, { headingLevel: "h4", icon: SearchIcon__default['default'], titleText: React__namespace.createElement(React__namespace.Fragment, null, getResource('No results found')) },
|
|
1913
1896
|
React__namespace.createElement(reactCore.EmptyStateBody, null, getResource('No results match the filter criteria. Remove filters or clear all filters to show results.')),
|
|
1914
1897
|
React__namespace.createElement(reactCore.EmptyStateFooter, null,
|
|
1915
1898
|
React__namespace.createElement(reactCore.EmptyStateActions, null,
|
|
@@ -2004,28 +1987,6 @@ const QuickStartCloseModal = ({ isOpen, onConfirm, onCancel, }) => {
|
|
|
2004
1987
|
React__namespace.createElement(reactCore.Button, { variant: "primary", "data-test": "leave button", onClick: onConfirm }, getResource('Leave')))), isFullScreen: true }, getResource('Your progress will be saved.')));
|
|
2005
1988
|
};
|
|
2006
1989
|
|
|
2007
|
-
const TaskIcon = ({ taskIndex, taskStatus }) => {
|
|
2008
|
-
const { getResource } = React__namespace.useContext(QuickStartContext);
|
|
2009
|
-
const success = taskStatus === exports.QuickStartTaskStatus.SUCCESS;
|
|
2010
|
-
const failed = taskStatus === exports.QuickStartTaskStatus.FAILED;
|
|
2011
|
-
const classNames = reactStyles.css('pfext-icon-and-text__icon', {
|
|
2012
|
-
'pfext-quick-start-task-header__task-icon-init': !failed && !success,
|
|
2013
|
-
});
|
|
2014
|
-
let content;
|
|
2015
|
-
if (success) {
|
|
2016
|
-
content = (React__namespace.createElement(reactCore.Icon, { size: "md" },
|
|
2017
|
-
React__namespace.createElement(CheckCircleIcon__default['default'], { className: "pfext-quick-start-task-header__task-icon-success" }),
|
|
2018
|
-
' '));
|
|
2019
|
-
}
|
|
2020
|
-
else if (failed) {
|
|
2021
|
-
content = (React__namespace.createElement(reactCore.Icon, { size: "md" },
|
|
2022
|
-
React__namespace.createElement(ExclamationCircleIcon__default['default'], { className: "pfext-quick-start-task-header__task-icon-failed" })));
|
|
2023
|
-
}
|
|
2024
|
-
else {
|
|
2025
|
-
content = getResource('{{taskIndex, number}}', taskIndex).replace('{{taskIndex, number}}', taskIndex);
|
|
2026
|
-
}
|
|
2027
|
-
return React__namespace.createElement("span", { className: classNames }, content);
|
|
2028
|
-
};
|
|
2029
1990
|
const QuickStartTaskHeader = ({ title, taskIndex, subtitle, taskStatus, size, isActiveTask, onTaskSelect, children, }) => {
|
|
2030
1991
|
const titleRef = React__namespace.useRef(null);
|
|
2031
1992
|
React__namespace.useEffect(() => {
|
|
@@ -2034,7 +1995,7 @@ const QuickStartTaskHeader = ({ title, taskIndex, subtitle, taskStatus, size, is
|
|
|
2034
1995
|
titleRef.current.parentNode.focus();
|
|
2035
1996
|
}
|
|
2036
1997
|
}, [isActiveTask]);
|
|
2037
|
-
|
|
1998
|
+
reactStyles.css('pfext-quick-start-task-header__title', {
|
|
2038
1999
|
'pfext-quick-start-task-header__title-success': taskStatus === exports.QuickStartTaskStatus.SUCCESS,
|
|
2039
2000
|
'pfext-quick-start-task-header__title-failed': taskStatus === (exports.QuickStartTaskStatus.FAILED || exports.QuickStartTaskStatus.VISITED),
|
|
2040
2001
|
});
|
|
@@ -2046,18 +2007,17 @@ const QuickStartTaskHeader = ({ title, taskIndex, subtitle, taskStatus, size, is
|
|
|
2046
2007
|
const tryAgain = failedReview && (React__namespace.createElement(React__namespace.Fragment, null,
|
|
2047
2008
|
React__namespace.createElement("div", null),
|
|
2048
2009
|
React__namespace.createElement("div", { className: "pfext-quick-start-task-header__tryagain" }, "Try the steps again.")));
|
|
2049
|
-
const content = (React__namespace.createElement("div", {
|
|
2050
|
-
React__namespace.createElement(
|
|
2051
|
-
React__namespace.createElement(reactCore.Title, { headingLevel: "h3", size: size, className: classNames },
|
|
2010
|
+
const content = (React__namespace.createElement("div", { ref: titleRef },
|
|
2011
|
+
React__namespace.createElement(reactCore.Title, { headingLevel: "h3" },
|
|
2052
2012
|
React__namespace.createElement("span", { dangerouslySetInnerHTML: { __html: removeParagraphWrap(markdownConvert(title)) } }),
|
|
2053
|
-
isActiveTask && subtitle && (React__namespace.createElement("span", {
|
|
2013
|
+
isActiveTask && subtitle && (React__namespace.createElement("span", { "data-test-id": "quick-start-task-subtitle" },
|
|
2054
2014
|
' ',
|
|
2055
|
-
subtitle))),
|
|
2056
|
-
|
|
2015
|
+
React__namespace.createElement(reactCore.Text, { component: reactCore.TextVariants.small }, subtitle))),
|
|
2016
|
+
tryAgain)));
|
|
2057
2017
|
return (React__namespace.createElement(reactCore.WizardNavItem, { content: content, stepIndex: taskIndex, onClick: () => onTaskSelect(taskIndex - 1), component: "button", isCurrent: isActiveTask }, children));
|
|
2058
2018
|
};
|
|
2059
2019
|
|
|
2060
|
-
const QuickStartTaskHeaderList = ({ tasks, allTaskStatuses, onTaskSelect, }) => tasks.length > 0 ? (React__namespace.createElement(reactCore.List, { className: "
|
|
2020
|
+
const QuickStartTaskHeaderList = ({ tasks, allTaskStatuses, onTaskSelect, }) => tasks.length > 0 ? (React__namespace.createElement(reactCore.List, { className: "pf-v6-c-wizard__nav-list" }, tasks.map((task, index) => (React__namespace.createElement(QuickStartTaskHeader, { key: task.title, title: task.title, taskIndex: index + 1, size: "md", taskStatus: allTaskStatuses[index], onTaskSelect: onTaskSelect }))))) : null;
|
|
2061
2021
|
|
|
2062
2022
|
const QuickStartConclusion = ({ tasks, conclusion, allTaskStatuses, nextQuickStarts, onQuickStartChange, onTaskSelect, }) => {
|
|
2063
2023
|
const hasFailedTask = allTaskStatuses.includes(exports.QuickStartTaskStatus.FAILED);
|
|
@@ -2075,7 +2035,7 @@ const QuickStartConclusion = ({ tasks, conclusion, allTaskStatuses, nextQuickSta
|
|
|
2075
2035
|
return (React__namespace.createElement(reactCore.Button, { variant: "link", onClick: () => onQuickStartChange(nextQuickStart.metadata.name), isInline: true, isBlock: true, key: index },
|
|
2076
2036
|
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),
|
|
2077
2037
|
' ',
|
|
2078
|
-
React__namespace.createElement(ArrowRightIcon__default['default'], { style: { marginLeft: 'var(--pf-
|
|
2038
|
+
React__namespace.createElement(ArrowRightIcon__default['default'], { style: { marginLeft: 'var(--pf-t--global--spacer--xs)', verticalAlign: 'middle' } })));
|
|
2079
2039
|
})));
|
|
2080
2040
|
};
|
|
2081
2041
|
|
|
@@ -2090,7 +2050,7 @@ const QuickStartIntroduction = ({ tasks, introduction, allTaskStatuses, prerequi
|
|
|
2090
2050
|
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
2091
2051
|
React__namespace.createElement(QuickStartMarkdownView, { content: introduction }),
|
|
2092
2052
|
prereqList,
|
|
2093
|
-
React__namespace.createElement("p", { style: { marginBottom: 'var(--pf-
|
|
2053
|
+
React__namespace.createElement("p", { style: { marginBottom: 'var(--pf-t--global--spacer--md)' } },
|
|
2094
2054
|
getResource('In this quick start, you will complete {{count, number}} task', tasks.length).replace('{{count, number}}', tasks.length),
|
|
2095
2055
|
":"),
|
|
2096
2056
|
React__namespace.createElement(QuickStartTaskHeaderList, { tasks: tasks, allTaskStatuses: allTaskStatuses, onTaskSelect: onTaskSelect })));
|
|
@@ -2201,7 +2161,7 @@ const QuickStartController = ({ quickStart, nextQuickStarts, contentRef, footerC
|
|
|
2201
2161
|
const getQuickStartActiveTask = React__namespace.useCallback(() => {
|
|
2202
2162
|
let activeTaskNumber = 0;
|
|
2203
2163
|
while (activeTaskNumber !== totalTasks &&
|
|
2204
|
-
activeQuickStartState[`taskStatus${activeTaskNumber}`]
|
|
2164
|
+
activeQuickStartState[`taskStatus${activeTaskNumber}`] !== exports.QuickStartTaskStatus.INIT) {
|
|
2205
2165
|
activeTaskNumber++;
|
|
2206
2166
|
}
|
|
2207
2167
|
return activeTaskNumber;
|
|
@@ -2277,7 +2237,7 @@ const QuickStartPanelContent = (_a) => {
|
|
|
2277
2237
|
React__namespace.createElement("div", { className: headerClasses },
|
|
2278
2238
|
React__namespace.createElement(reactCore.DrawerHead, null,
|
|
2279
2239
|
React__namespace.createElement("div", { className: "pfext-quick-start-panel-content__title", tabIndex: -1, ref: titleRef },
|
|
2280
|
-
React__namespace.createElement(reactCore.Title, { headingLevel: "h2", size: "xl", className: "pfext-quick-start-panel-content__name", style: { marginRight: 'var(--pf-
|
|
2240
|
+
React__namespace.createElement(reactCore.Title, { headingLevel: "h2", size: "xl", className: "pfext-quick-start-panel-content__name", style: { marginRight: 'var(--pf-t--global--spacer--md)' } },
|
|
2281
2241
|
React__namespace.createElement("span", { dangerouslySetInnerHTML: {
|
|
2282
2242
|
__html: removeParagraphWrap(markdownConvert(quickStart === null || quickStart === void 0 ? void 0 : quickStart.spec.displayName)),
|
|
2283
2243
|
} }),
|
|
@@ -2391,7 +2351,7 @@ const QuickStartDrawer = (_a) => {
|
|
|
2391
2351
|
const panelContent = (React__namespace.createElement(QuickStartPanelContent, Object.assign({ quickStarts: combinedQuickStarts, handleClose: handleClose, activeQuickStartID: activeQuickStartID, appendTo: appendTo, isResizable: !fullWidth, headerVariant: useLegacyHeaderColors ? '' : 'blue-white' }, fullWidthPanelStyle)));
|
|
2392
2352
|
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
2393
2353
|
React__namespace.createElement(reactCore.Drawer, Object.assign({ isExpanded: !!activeQuickStartID, isInline: true }, props), children ? (React__namespace.createElement(reactCore.DrawerContent, Object.assign({ panelContent: panelContent }, fullWidthBodyStyle),
|
|
2394
|
-
React__namespace.createElement(reactCore.DrawerContentBody, { className: "pfext-quick-start-drawer__body" }, children))) : (React__namespace.createElement("div", { className: "pf-
|
|
2354
|
+
React__namespace.createElement(reactCore.DrawerContentBody, { className: "pfext-quick-start-drawer__body" }, children))) : (React__namespace.createElement("div", { className: "pf-v6-c-drawer__main" }, panelContent))),
|
|
2395
2355
|
React__namespace.createElement(QuickStartCloseModal, { isOpen: modalOpen, onConfirm: onModalConfirm, onCancel: onModalCancel })));
|
|
2396
2356
|
};
|
|
2397
2357
|
|
|
@@ -2459,7 +2419,7 @@ const HelpTopicPanelContent = (_a) => {
|
|
|
2459
2419
|
React__namespace.createElement("div", { className: "pfext-quick-start-panel-content__title" },
|
|
2460
2420
|
helpTopicOptions && (React__namespace.createElement(reactCore.Select, { isPlain: true, id: "help-topics-select", selected: activeHelpTopic, isOpen: isHelpTopicMenuOpen, onSelect: onSelectHelpTopic, onOpenChange: (isOpen) => setIsHelpTopicMenuOpen(isOpen), toggle: (toggleRef) => (React__namespace.createElement(reactCore.MenuToggle, { isFullWidth: true, ref: toggleRef, icon: React__namespace.createElement(BarsIcon__default['default'], null), onClick: toggleHelpTopicMenu, isExpanded: isHelpTopicMenuOpen }, activeHelpTopic === null || activeHelpTopic === void 0 ? void 0 : activeHelpTopic.title)) },
|
|
2461
2421
|
React__namespace.createElement(reactCore.SelectList, null, helpTopicOptions))),
|
|
2462
|
-
React__namespace.createElement(reactCore.Title, { headingLevel: "h1", size: "xl", className: "pfext-quick-start-panel-content__name", style: { marginRight: 'var(--pf-
|
|
2422
|
+
React__namespace.createElement(reactCore.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)),
|
|
2463
2423
|
React__namespace.createElement(reactCore.DrawerActions, null,
|
|
2464
2424
|
React__namespace.createElement(reactCore.DrawerCloseButton, { onClick: onClose, className: "pfext-quick-start-panel-content__close-button", "data-testid": "qs-drawer-close" }))),
|
|
2465
2425
|
React__namespace.createElement(reactCore.Divider, null),
|
|
@@ -2495,7 +2455,7 @@ const HelpTopicDrawer = (_a) => {
|
|
|
2495
2455
|
const panelContent = (React__namespace.createElement(HelpTopicPanelContent, { activeHelpTopic: activeHelpTopic, filteredHelpTopics: filteredHelpTopics, onClose: onClose }));
|
|
2496
2456
|
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
2497
2457
|
React__namespace.createElement(reactCore.Drawer, Object.assign({ isExpanded: !!activeHelpTopic, isInline: true }, props), children ? (React__namespace.createElement(reactCore.DrawerContent, { panelContent: panelContent },
|
|
2498
|
-
React__namespace.createElement(reactCore.DrawerContentBody, { className: "pfext-quick-start-drawer__body" }, children))) : (React__namespace.createElement("div", { className: "pf-
|
|
2458
|
+
React__namespace.createElement(reactCore.DrawerContentBody, { className: "pfext-quick-start-drawer__body" }, children))) : (React__namespace.createElement("div", { className: "pf-v6-c-drawer__main" }, panelContent)))));
|
|
2499
2459
|
};
|
|
2500
2460
|
|
|
2501
2461
|
const useLocalStorage = (key, initialValue) => {
|