@patternfly/quickstarts 5.0.0-prerelease.0 → 5.0.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.js CHANGED
@@ -883,8 +883,8 @@ const CamelCaseWrap = ({ value, dataTest }) => {
883
883
  };
884
884
 
885
885
  class CatalogTile extends React__namespace.Component {
886
- constructor(props) {
887
- super(props);
886
+ constructor() {
887
+ super(...arguments);
888
888
  this.handleClick = (e) => {
889
889
  const { onClick, href } = this.props;
890
890
  if (!href) {
@@ -900,18 +900,13 @@ class CatalogTile extends React__namespace.Component {
900
900
  }
901
901
  return (React__namespace.createElement("div", { className: "catalog-tile-pf-badge-container" }, badges.map((badge, index) => (React__namespace.createElement("span", { key: `badge-${index}` }, badge)))));
902
902
  };
903
- this.generatedId = reactCore.getUniqueId('pf-catalog-tile');
904
903
  }
905
904
  render() {
906
905
  const _a = this.props, { id, className, featured, onClick, href, icon, iconImg, iconAlt, iconClass, badges, title, vendor, description, footer,
907
906
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
908
907
  ref, children } = _a, props = tslib.__rest(_a, ["id", "className", "featured", "onClick", "href", "icon", "iconImg", "iconAlt", "iconClass", "badges", "title", "vendor", "description", "footer", "ref", "children"]);
909
- 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),
910
- (badges.length > 0 || iconImg || iconClass || icon || onClick) && (React__namespace.createElement(reactCore.CardHeader, { actions: { actions: badges.length > 0 && this.renderBadges(badges) }, selectableActions: onClick && {
911
- selectableActionId: id + '-input',
912
- onClickAction: (e) => this.handleClick(e),
913
- selectableActionAriaLabelledby: id
914
- } },
908
+ return (React__namespace.createElement(reactCore.Card, Object.assign({ component: href ? 'a' : 'div', id: id, href: href || '#', className: reactStyles.css('catalog-tile-pf', { featured }, className), isClickable: !!onClick }, props),
909
+ (badges.length > 0 || iconImg || iconClass || icon || onClick) && (React__namespace.createElement(reactCore.CardHeader, { actions: { actions: badges.length > 0 && this.renderBadges(badges) }, selectableActions: onClick && { selectableActionId: id + '-input', onClickAction: (e) => this.handleClick(e), selectableActionAriaLabelledby: id } },
915
910
  iconImg && React__namespace.createElement("img", { className: "catalog-tile-pf-icon", src: iconImg, alt: iconAlt }),
916
911
  !iconImg && (iconClass || icon) && React__namespace.createElement("span", { className: `catalog-tile-pf-icon ${iconClass}` }, icon))),
917
912
  React__namespace.createElement(reactCore.CardTitle, { className: "catalog-tile-pf-header" },
@@ -926,7 +921,7 @@ class CatalogTile extends React__namespace.Component {
926
921
  }
927
922
  CatalogTile.displayName = 'CatalogTile';
928
923
  CatalogTile.defaultProps = {
929
- id: null,
924
+ id: reactCore.getUniqueId('pf-catalog-tile'),
930
925
  className: '',
931
926
  featured: false,
932
927
  onClick: null,
@@ -1759,7 +1754,7 @@ const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { }, })
1759
1754
  }
1760
1755
  };
1761
1756
  return (React__namespace.createElement("div", { ref: ref },
1762
- React__namespace.createElement(CatalogTile, { style: {
1757
+ React__namespace.createElement(CatalogTile, { id: id + '-catalog-tile', style: {
1763
1758
  cursor: 'pointer',
1764
1759
  }, 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) => {
1765
1760
  if (event.key === 'Enter' || event.key === ' ') {