@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.js
CHANGED
|
@@ -1721,10 +1721,10 @@ const QuickStartTileHeader = ({ status, duration, name, type, quickStartId, acti
|
|
|
1721
1721
|
};
|
|
1722
1722
|
const ActionIcon = (action === null || action === void 0 ? void 0 : action.icon) || OutlinedBookmarkIcon__default['default'];
|
|
1723
1723
|
return (React__namespace.createElement("div", { className: "pfext-quick-start-tile-header" },
|
|
1724
|
-
React__namespace.createElement(reactCore.Flex, {
|
|
1724
|
+
React__namespace.createElement(reactCore.Flex, { flexWrap: { default: 'nowrap' } },
|
|
1725
1725
|
React__namespace.createElement(reactCore.Title, { headingLevel: "h3", "data-test": "title", id: quickStartId },
|
|
1726
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:
|
|
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)))),
|
|
1728
1728
|
React__namespace.createElement("div", { className: "pfext-quick-start-tile-header__status" },
|
|
1729
1729
|
type && (React__namespace.createElement(reactCore.Label, { className: "pfext-quick-start-tile-header--margin", color: type.color }, type.text)),
|
|
1730
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))),
|
|
@@ -1732,8 +1732,7 @@ const QuickStartTileHeader = ({ status, duration, name, type, quickStartId, acti
|
|
|
1732
1732
|
};
|
|
1733
1733
|
|
|
1734
1734
|
const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { }, action, }) => {
|
|
1735
|
-
const { metadata: { name
|
|
1736
|
-
const id = metaId || name;
|
|
1735
|
+
const { metadata: { name: id }, spec: { icon, tasks, displayName, description, durationMinutes, prerequisites, link, type }, } = quickStart;
|
|
1737
1736
|
const { setActiveQuickStart, footer } = React__namespace.useContext(QuickStartContext);
|
|
1738
1737
|
const ref = React__namespace.useRef(null);
|
|
1739
1738
|
let quickStartIcon;
|
|
@@ -1755,26 +1754,31 @@ const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { }, act
|
|
|
1755
1754
|
const handleClick = (e) => {
|
|
1756
1755
|
var _a;
|
|
1757
1756
|
if ((_a = ref.current) === null || _a === void 0 ? void 0 : _a.contains(e.target)) {
|
|
1758
|
-
if (link) {
|
|
1759
|
-
window.open(link.href);
|
|
1760
|
-
}
|
|
1761
|
-
else {
|
|
1757
|
+
if (!link) {
|
|
1762
1758
|
setActiveQuickStart(id, tasks === null || tasks === void 0 ? void 0 : tasks.length);
|
|
1763
1759
|
}
|
|
1764
1760
|
onClick();
|
|
1765
1761
|
}
|
|
1766
1762
|
};
|
|
1763
|
+
const linkProps = link
|
|
1764
|
+
? {
|
|
1765
|
+
href: link.href,
|
|
1766
|
+
target: '_blank',
|
|
1767
|
+
rel: 'noreferrer',
|
|
1768
|
+
}
|
|
1769
|
+
: {};
|
|
1767
1770
|
return (React__namespace.createElement("div", { ref: ref, onClick: handleClick },
|
|
1768
|
-
React__namespace.createElement(CatalogTile, { id: id + '-catalog-tile', style: {
|
|
1771
|
+
React__namespace.createElement(CatalogTile, Object.assign({ id: id + '-catalog-tile', style: {
|
|
1769
1772
|
cursor: 'pointer',
|
|
1770
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, action: action }), onKeyDown: (event) => {
|
|
1771
1774
|
if (event.key === 'Enter' || event.key === ' ') {
|
|
1772
1775
|
setActiveQuickStart(id, tasks === null || tasks === void 0 ? void 0 : tasks.length);
|
|
1773
1776
|
onClick();
|
|
1774
1777
|
}
|
|
1775
|
-
},
|
|
1776
|
-
//
|
|
1777
|
-
|
|
1778
|
+
} }, linkProps, { "data-test": `tile ${id}`, description: React__namespace.createElement(QuickStartTileDescription, { description: description, prerequisites: prerequisites }), footer: footerComponent, tabIndex: 0,
|
|
1779
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1780
|
+
// @ts-ignore-next-line
|
|
1781
|
+
isSelectableRaised: true }))));
|
|
1778
1782
|
};
|
|
1779
1783
|
|
|
1780
1784
|
const QuickStartCatalog = ({ quickStarts }) => {
|