@patternfly/quickstarts 5.2.0-prerelease.3 → 5.3.0-prerelease.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/index.es.js +16 -12
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +16 -12
- package/dist/index.js.map +1 -1
- package/dist/quickstarts-base.css +84 -81
- package/dist/quickstarts-full.es.js +16 -12
- package/dist/quickstarts-full.es.js.map +1 -1
- package/dist/quickstarts-standalone.css +6 -0
- package/dist/quickstarts-standalone.min.css +1 -1
- package/dist/quickstarts.css +84 -81
- package/dist/quickstarts.min.css +1 -1
- package/package.json +1 -1
- package/src/catalog/QuickStartTile.tsx +14 -6
- package/src/catalog/QuickStartTileHeader.scss +4 -0
- package/src/catalog/QuickStartTileHeader.tsx +11 -9
package/dist/index.es.js
CHANGED
|
@@ -1677,10 +1677,10 @@ const QuickStartTileHeader = ({ status, duration, name, type, quickStartId, acti
|
|
|
1677
1677
|
};
|
|
1678
1678
|
const ActionIcon = (action === null || action === void 0 ? void 0 : action.icon) || OutlinedBookmarkIcon;
|
|
1679
1679
|
return (React.createElement("div", { className: "pfext-quick-start-tile-header" },
|
|
1680
|
-
React.createElement(Flex, {
|
|
1680
|
+
React.createElement(Flex, { flexWrap: { default: 'nowrap' } },
|
|
1681
1681
|
React.createElement(Title, { headingLevel: "h3", "data-test": "title", id: quickStartId },
|
|
1682
1682
|
React.createElement(QuickStartMarkdownView, { content: name })),
|
|
1683
|
-
action && React.createElement(Button, Object.assign({ "aria-label": action['aria-label'], icon: React.createElement(ActionIcon, null), variant:
|
|
1683
|
+
action && (React.createElement(Button, Object.assign({ "aria-label": action['aria-label'], icon: React.createElement(ActionIcon, null), variant: "plain", onClick: action.onClick }, action.buttonProps)))),
|
|
1684
1684
|
React.createElement("div", { className: "pfext-quick-start-tile-header__status" },
|
|
1685
1685
|
type && (React.createElement(Label, { className: "pfext-quick-start-tile-header--margin", color: type.color }, type.text)),
|
|
1686
1686
|
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))),
|
|
@@ -1688,8 +1688,7 @@ const QuickStartTileHeader = ({ status, duration, name, type, quickStartId, acti
|
|
|
1688
1688
|
};
|
|
1689
1689
|
|
|
1690
1690
|
const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { }, action, }) => {
|
|
1691
|
-
const { metadata: { name
|
|
1692
|
-
const id = metaId || name;
|
|
1691
|
+
const { metadata: { name: id }, spec: { icon, tasks, displayName, description, durationMinutes, prerequisites, link, type }, } = quickStart;
|
|
1693
1692
|
const { setActiveQuickStart, footer } = React.useContext(QuickStartContext);
|
|
1694
1693
|
const ref = React.useRef(null);
|
|
1695
1694
|
let quickStartIcon;
|
|
@@ -1711,26 +1710,31 @@ const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { }, act
|
|
|
1711
1710
|
const handleClick = (e) => {
|
|
1712
1711
|
var _a;
|
|
1713
1712
|
if ((_a = ref.current) === null || _a === void 0 ? void 0 : _a.contains(e.target)) {
|
|
1714
|
-
if (link) {
|
|
1715
|
-
window.open(link.href);
|
|
1716
|
-
}
|
|
1717
|
-
else {
|
|
1713
|
+
if (!link) {
|
|
1718
1714
|
setActiveQuickStart(id, tasks === null || tasks === void 0 ? void 0 : tasks.length);
|
|
1719
1715
|
}
|
|
1720
1716
|
onClick();
|
|
1721
1717
|
}
|
|
1722
1718
|
};
|
|
1719
|
+
const linkProps = link
|
|
1720
|
+
? {
|
|
1721
|
+
href: link.href,
|
|
1722
|
+
target: '_blank',
|
|
1723
|
+
rel: 'noreferrer',
|
|
1724
|
+
}
|
|
1725
|
+
: {};
|
|
1723
1726
|
return (React.createElement("div", { ref: ref, onClick: handleClick },
|
|
1724
|
-
React.createElement(CatalogTile, { id: id + '-catalog-tile', style: {
|
|
1727
|
+
React.createElement(CatalogTile, Object.assign({ id: id + '-catalog-tile', style: {
|
|
1725
1728
|
cursor: 'pointer',
|
|
1726
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, action: action }), onKeyDown: (event) => {
|
|
1727
1730
|
if (event.key === 'Enter' || event.key === ' ') {
|
|
1728
1731
|
setActiveQuickStart(id, tasks === null || tasks === void 0 ? void 0 : tasks.length);
|
|
1729
1732
|
onClick();
|
|
1730
1733
|
}
|
|
1731
|
-
},
|
|
1732
|
-
//
|
|
1733
|
-
|
|
1734
|
+
} }, linkProps, { "data-test": `tile ${id}`, description: React.createElement(QuickStartTileDescription, { description: description, prerequisites: prerequisites }), footer: footerComponent, tabIndex: 0,
|
|
1735
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1736
|
+
// @ts-ignore-next-line
|
|
1737
|
+
isSelectableRaised: true }))));
|
|
1734
1738
|
};
|
|
1735
1739
|
|
|
1736
1740
|
const QuickStartCatalog = ({ quickStarts }) => {
|