@patternfly/quickstarts 5.0.0-prerelease.1 → 5.0.0

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 CHANGED
@@ -840,8 +840,8 @@ const CamelCaseWrap = ({ value, dataTest }) => {
840
840
  };
841
841
 
842
842
  class CatalogTile extends React.Component {
843
- constructor() {
844
- super(...arguments);
843
+ constructor(props) {
844
+ super(props);
845
845
  this.handleClick = (e) => {
846
846
  const { onClick, href } = this.props;
847
847
  if (!href) {
@@ -857,13 +857,18 @@ class CatalogTile extends React.Component {
857
857
  }
858
858
  return (React.createElement("div", { className: "catalog-tile-pf-badge-container" }, badges.map((badge, index) => (React.createElement("span", { key: `badge-${index}` }, badge)))));
859
859
  };
860
+ this.generatedId = getUniqueId('pf-catalog-tile');
860
861
  }
861
862
  render() {
862
863
  const _a = this.props, { id, className, featured, onClick, href, icon, iconImg, iconAlt, iconClass, badges, title, vendor, description, footer,
863
864
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
864
865
  ref, children } = _a, props = __rest(_a, ["id", "className", "featured", "onClick", "href", "icon", "iconImg", "iconAlt", "iconClass", "badges", "title", "vendor", "description", "footer", "ref", "children"]);
865
- return (React.createElement(Card, Object.assign({ component: href ? 'a' : 'div', id: id, href: href || '#', className: css('catalog-tile-pf', { featured }, className), isClickable: !!onClick }, props),
866
- (badges.length > 0 || iconImg || iconClass || icon || onClick) && (React.createElement(CardHeader, { actions: { actions: badges.length > 0 && this.renderBadges(badges) }, selectableActions: onClick && { selectableActionId: id + '-input', onClickAction: (e) => this.handleClick(e), selectableActionAriaLabelledby: id } },
866
+ return (React.createElement(Card, Object.assign({ component: href ? 'a' : 'div', id: id || this.generatedId, href: href || '#', className: css('catalog-tile-pf', { featured }, className), isClickable: !!onClick }, props),
867
+ (badges.length > 0 || iconImg || iconClass || icon || onClick) && (React.createElement(CardHeader, { actions: { actions: badges.length > 0 && this.renderBadges(badges) }, selectableActions: onClick && {
868
+ selectableActionId: id + '-input',
869
+ onClickAction: (e) => this.handleClick(e),
870
+ selectableActionAriaLabelledby: id
871
+ } },
867
872
  iconImg && React.createElement("img", { className: "catalog-tile-pf-icon", src: iconImg, alt: iconAlt }),
868
873
  !iconImg && (iconClass || icon) && React.createElement("span", { className: `catalog-tile-pf-icon ${iconClass}` }, icon))),
869
874
  React.createElement(CardTitle, { className: "catalog-tile-pf-header" },
@@ -878,7 +883,7 @@ class CatalogTile extends React.Component {
878
883
  }
879
884
  CatalogTile.displayName = 'CatalogTile';
880
885
  CatalogTile.defaultProps = {
881
- id: getUniqueId('pf-catalog-tile'),
886
+ id: null,
882
887
  className: '',
883
888
  featured: false,
884
889
  onClick: null,