@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.js CHANGED
@@ -883,8 +883,8 @@ const CamelCaseWrap = ({ value, dataTest }) => {
883
883
  };
884
884
 
885
885
  class CatalogTile extends React__namespace.Component {
886
- constructor() {
887
- super(...arguments);
886
+ constructor(props) {
887
+ super(props);
888
888
  this.handleClick = (e) => {
889
889
  const { onClick, href } = this.props;
890
890
  if (!href) {
@@ -900,13 +900,18 @@ 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');
903
904
  }
904
905
  render() {
905
906
  const _a = this.props, { id, className, featured, onClick, href, icon, iconImg, iconAlt, iconClass, badges, title, vendor, description, footer,
906
907
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
907
908
  ref, children } = _a, props = tslib.__rest(_a, ["id", "className", "featured", "onClick", "href", "icon", "iconImg", "iconAlt", "iconClass", "badges", "title", "vendor", "description", "footer", "ref", "children"]);
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 } },
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
+ } },
910
915
  iconImg && React__namespace.createElement("img", { className: "catalog-tile-pf-icon", src: iconImg, alt: iconAlt }),
911
916
  !iconImg && (iconClass || icon) && React__namespace.createElement("span", { className: `catalog-tile-pf-icon ${iconClass}` }, icon))),
912
917
  React__namespace.createElement(reactCore.CardTitle, { className: "catalog-tile-pf-header" },
@@ -921,7 +926,7 @@ class CatalogTile extends React__namespace.Component {
921
926
  }
922
927
  CatalogTile.displayName = 'CatalogTile';
923
928
  CatalogTile.defaultProps = {
924
- id: reactCore.getUniqueId('pf-catalog-tile'),
929
+ id: null,
925
930
  className: '',
926
931
  featured: false,
927
932
  onClick: null,