@patternfly/react-core 5.0.0-alpha.34 → 5.0.0-alpha.35

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/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [5.0.0-alpha.35](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.0.0-alpha.34...@patternfly/react-core@5.0.0-alpha.35) (2023-03-15)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **Card:** fixed card view demo ([#8806](https://github.com/patternfly/patternfly-react/issues/8806)) ([0c37fc5](https://github.com/patternfly/patternfly-react/commit/0c37fc564897c4ca7c02e947216d8c63c72a6417))
11
+
6
12
  # [5.0.0-alpha.34](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.0.0-alpha.33...@patternfly/react-core@5.0.0-alpha.34) (2023-03-15)
7
13
 
8
14
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/react-core",
3
- "version": "5.0.0-alpha.34",
3
+ "version": "5.0.0-alpha.35",
4
4
  "description": "This library provides a set of common React components for use with the PatternFly reference implementation.",
5
5
  "main": "dist/js/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -70,5 +70,5 @@
70
70
  "react": "^16.8 || ^17 || ^18",
71
71
  "react-dom": "^16.8 || ^17 || ^18"
72
72
  },
73
- "gitHead": "9a3ab7a6248885619173e33a938ce22749be6c2b"
73
+ "gitHead": "1138b9fba01a2b0ef0d45b2daf11d0fcf6970ee5"
74
74
  }
@@ -560,36 +560,6 @@ class CardViewBasic extends React.Component {
560
560
  swaggerIcon
561
561
  };
562
562
 
563
- const headerActions = (
564
- <>
565
- <Dropdown
566
- isPlain
567
- position="right"
568
- onSelect={(e) => this.onCardKebabDropdownSelect(key, e)}
569
- toggle={
570
- <KebabToggle
571
- onToggle={(_event, isCardKebabDropdownOpen) =>
572
- this.onCardKebabDropdownToggle(key, isCardKebabDropdownOpen)
573
- }
574
- />
575
- }
576
- isOpen={this.state[key]}
577
- dropdownItems={[
578
- <DropdownItem key="trash" onClick={this.deleteItem(product)} position="right">
579
- <TrashIcon />
580
- Delete
581
- </DropdownItem>
582
- ]}
583
- />
584
- <Checkbox
585
- checked={isChecked}
586
- value={product.id}
587
- isChecked={selectedItems.includes(product.id)}
588
- aria-label="card checkbox example"
589
- id={`check-${product.id}`}
590
- />
591
- </>
592
- );
593
563
  return (
594
564
  <React.Fragment>
595
565
  <DashboardWrapper mainContainerId="main-content-card-view-default-nav" breadcrumb={null}>
@@ -631,7 +601,40 @@ class CardViewBasic extends React.Component {
631
601
  onSelectableInputChange={() => this.onClick(product.id)}
632
602
  isSelected={selectedItems.includes(product.id)}
633
603
  >
634
- <CardHeader actions={{ actions: headerActions }}>
604
+ <CardHeader
605
+ actions={{
606
+ actions: (
607
+ <>
608
+ <Dropdown
609
+ isPlain
610
+ position="right"
611
+ onSelect={(e) => this.onCardKebabDropdownSelect(key, e)}
612
+ toggle={
613
+ <KebabToggle
614
+ onToggle={(_event, isCardKebabDropdownOpen) =>
615
+ this.onCardKebabDropdownToggle(key, isCardKebabDropdownOpen)
616
+ }
617
+ />
618
+ }
619
+ isOpen={this.state[key]}
620
+ dropdownItems={[
621
+ <DropdownItem key="trash" onClick={this.deleteItem(product)} position="right">
622
+ <TrashIcon />
623
+ Delete
624
+ </DropdownItem>
625
+ ]}
626
+ />
627
+ <Checkbox
628
+ checked={isChecked}
629
+ value={product.id}
630
+ isChecked={selectedItems.includes(product.id)}
631
+ aria-label="card checkbox example"
632
+ id={`check-${product.id}`}
633
+ />
634
+ </>
635
+ )
636
+ }}
637
+ >
635
638
  <img src={icons[product.icon]} alt={`${product.name} icon`} style={{ maxWidth: '60px' }} />
636
639
  </CardHeader>
637
640
  <CardTitle>{product.name}</CardTitle>