@patternfly/quickstarts 5.2.0-prerelease.2 → 5.2.0-prerelease.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/catalog/QuickStartTile.d.ts +3 -0
- package/dist/catalog/QuickStartTileHeader.d.ts +12 -0
- package/dist/catalog/index.d.ts +1 -1
- package/dist/index.es.js +12 -7
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +13 -7
- package/dist/index.js.map +1 -1
- package/dist/quickstarts-base.css +29 -29
- package/dist/quickstarts-full.es.js +27 -7
- package/dist/quickstarts-full.es.js.map +1 -1
- package/dist/quickstarts.css +29 -29
- package/dist/quickstarts.min.css +1 -1
- package/package.json +1 -1
- package/src/catalog/QuickStartTile.tsx +8 -4
- package/src/catalog/QuickStartTileHeader.tsx +29 -4
- package/src/catalog/index.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -24,6 +24,7 @@ require('@patternfly/react-tokens/dist/esm/global_palette_blue_300');
|
|
|
24
24
|
var okColor = require('@patternfly/react-tokens/dist/esm/global_palette_green_500');
|
|
25
25
|
var ExternalLinkAltIcon = require('@patternfly/react-icons/dist/js/icons/external-link-alt-icon');
|
|
26
26
|
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');
|
|
27
28
|
var ArrowRightIcon = require('@patternfly/react-icons/dist/js/icons/arrow-right-icon');
|
|
28
29
|
var BarsIcon = require('@patternfly/react-icons/dist/js/icons/bars-icon');
|
|
29
30
|
|
|
@@ -64,6 +65,7 @@ var InfoCircleIcon__default = /*#__PURE__*/_interopDefaultLegacy(InfoCircleIcon)
|
|
|
64
65
|
var okColor__default = /*#__PURE__*/_interopDefaultLegacy(okColor);
|
|
65
66
|
var ExternalLinkAltIcon__default = /*#__PURE__*/_interopDefaultLegacy(ExternalLinkAltIcon);
|
|
66
67
|
var OutlinedClockIcon__default = /*#__PURE__*/_interopDefaultLegacy(OutlinedClockIcon);
|
|
68
|
+
var OutlinedBookmarkIcon__default = /*#__PURE__*/_interopDefaultLegacy(OutlinedBookmarkIcon);
|
|
67
69
|
var ArrowRightIcon__default = /*#__PURE__*/_interopDefaultLegacy(ArrowRightIcon);
|
|
68
70
|
var BarsIcon__default = /*#__PURE__*/_interopDefaultLegacy(BarsIcon);
|
|
69
71
|
|
|
@@ -1710,24 +1712,28 @@ const statusColorMap = {
|
|
|
1710
1712
|
[exports.QuickStartStatus.IN_PROGRESS]: 'purple',
|
|
1711
1713
|
[exports.QuickStartStatus.NOT_STARTED]: 'grey',
|
|
1712
1714
|
};
|
|
1713
|
-
const QuickStartTileHeader = ({ status, duration, name, type, quickStartId, }) => {
|
|
1715
|
+
const QuickStartTileHeader = ({ status, duration, name, type, quickStartId, action, }) => {
|
|
1714
1716
|
const { getResource } = React__namespace.useContext(QuickStartContext);
|
|
1715
1717
|
const statusLocaleMap = {
|
|
1716
1718
|
[exports.QuickStartStatus.COMPLETE]: getResource('Complete'),
|
|
1717
1719
|
[exports.QuickStartStatus.IN_PROGRESS]: getResource('In progress'),
|
|
1718
1720
|
[exports.QuickStartStatus.NOT_STARTED]: getResource('Not started'),
|
|
1719
1721
|
};
|
|
1722
|
+
const ActionIcon = (action === null || action === void 0 ? void 0 : action.icon) || OutlinedBookmarkIcon__default['default'];
|
|
1720
1723
|
return (React__namespace.createElement("div", { className: "pfext-quick-start-tile-header" },
|
|
1721
|
-
React__namespace.createElement(reactCore.
|
|
1722
|
-
React__namespace.createElement(
|
|
1724
|
+
React__namespace.createElement(reactCore.Flex, { justifyContent: { default: 'justifyContentCenter' }, flexWrap: { default: 'nowrap' } },
|
|
1725
|
+
React__namespace.createElement(reactCore.Title, { headingLevel: "h3", "data-test": "title", id: quickStartId },
|
|
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))),
|
|
1723
1728
|
React__namespace.createElement("div", { className: "pfext-quick-start-tile-header__status" },
|
|
1724
1729
|
type && (React__namespace.createElement(reactCore.Label, { className: "pfext-quick-start-tile-header--margin", color: type.color }, type.text)),
|
|
1725
1730
|
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))),
|
|
1726
1731
|
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])))));
|
|
1727
1732
|
};
|
|
1728
1733
|
|
|
1729
|
-
const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { }, }) => {
|
|
1730
|
-
const { metadata: { name
|
|
1734
|
+
const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { }, action, }) => {
|
|
1735
|
+
const { metadata: { name, id: metaId }, spec: { icon, tasks, displayName, description, durationMinutes, prerequisites, link, type }, } = quickStart;
|
|
1736
|
+
const id = metaId || name;
|
|
1731
1737
|
const { setActiveQuickStart, footer } = React__namespace.useContext(QuickStartContext);
|
|
1732
1738
|
const ref = React__namespace.useRef(null);
|
|
1733
1739
|
let quickStartIcon;
|
|
@@ -1758,10 +1764,10 @@ const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { }, })
|
|
|
1758
1764
|
onClick();
|
|
1759
1765
|
}
|
|
1760
1766
|
};
|
|
1761
|
-
return (React__namespace.createElement("div", { ref: ref },
|
|
1767
|
+
return (React__namespace.createElement("div", { ref: ref, onClick: handleClick },
|
|
1762
1768
|
React__namespace.createElement(CatalogTile, { id: id + '-catalog-tile', style: {
|
|
1763
1769
|
cursor: 'pointer',
|
|
1764
|
-
}, 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
|
|
1770
|
+
}, 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, action: action }), onKeyDown: (event) => {
|
|
1765
1771
|
if (event.key === 'Enter' || event.key === ' ') {
|
|
1766
1772
|
setActiveQuickStart(id, tasks === null || tasks === void 0 ? void 0 : tasks.length);
|
|
1767
1773
|
onClick();
|