@patternfly/react-core 4.225.11 → 4.226.2

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.
Files changed (33) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/esm/components/CalendarMonth/CalendarMonth.d.ts +3 -1
  3. package/dist/esm/components/CalendarMonth/CalendarMonth.d.ts.map +1 -1
  4. package/dist/esm/components/CalendarMonth/CalendarMonth.js +9 -6
  5. package/dist/esm/components/CalendarMonth/CalendarMonth.js.map +1 -1
  6. package/dist/esm/components/Wizard/Wizard.d.ts +4 -0
  7. package/dist/esm/components/Wizard/Wizard.d.ts.map +1 -1
  8. package/dist/esm/components/Wizard/Wizard.js +28 -13
  9. package/dist/esm/components/Wizard/Wizard.js.map +1 -1
  10. package/dist/js/components/CalendarMonth/CalendarMonth.d.ts +3 -1
  11. package/dist/js/components/CalendarMonth/CalendarMonth.d.ts.map +1 -1
  12. package/dist/js/components/CalendarMonth/CalendarMonth.js +9 -6
  13. package/dist/js/components/CalendarMonth/CalendarMonth.js.map +1 -1
  14. package/dist/js/components/Wizard/Wizard.d.ts +4 -0
  15. package/dist/js/components/Wizard/Wizard.d.ts.map +1 -1
  16. package/dist/js/components/Wizard/Wizard.js +28 -13
  17. package/dist/js/components/Wizard/Wizard.js.map +1 -1
  18. package/dist/umd/react-core.css +4 -3
  19. package/dist/umd/react-core.js +37 -19
  20. package/dist/umd/react-core.min.css +38 -37
  21. package/dist/umd/react-core.min.js +2 -2
  22. package/package.json +6 -6
  23. package/src/components/CalendarMonth/CalendarMonth.tsx +22 -5
  24. package/src/components/CalendarMonth/examples/CalendarMonth.md +0 -5
  25. package/src/components/CalendarMonth/examples/CalendarMonthSelectableDate.tsx +6 -1
  26. package/src/components/Pagination/examples/Pagination.md +14 -14
  27. package/src/components/Toolbar/examples/Toolbar.md +2 -2
  28. package/src/components/Truncate/__tests__/Truncate.test.tsx +143 -4
  29. package/src/components/Truncate/__tests__/__snapshots__/Truncate.test.tsx.snap +34 -29
  30. package/src/components/Wizard/Wizard.tsx +34 -12
  31. package/src/components/Wizard/__tests__/Wizard.test.tsx +59 -0
  32. package/src/components/Wizard/examples/Wizard.md +9 -19
  33. package/src/components/CalendarMonth/examples/CalendarMonthDefault.tsx +0 -4
@@ -782,36 +782,29 @@ class ProgressiveWizard extends React.Component {
782
782
  }
783
783
  ```
784
784
 
785
- ### Remember last step
785
+ ### Get current step
786
786
 
787
787
  ```js
788
788
  import React from 'react';
789
789
  import { Button, Wizard } from '@patternfly/react-core';
790
790
 
791
- class RememberLastStepWizard extends React.Component {
791
+ class GetCurrentStepWizard extends React.Component {
792
792
  constructor(props) {
793
793
  super(props);
794
794
  this.state = {
795
795
  step: 1
796
796
  };
797
+ this.onCurrentStepChanged = ({ id }) => {
798
+ this.setState({
799
+ step: id
800
+ });
801
+ }
797
802
  this.closeWizard = () => {
798
803
  console.log('close wizard');
799
804
  };
800
- this.onMove = (curr, prev) => {
801
- this.setState({
802
- step: curr.id
803
- });
804
- };
805
- this.onSave = () => {
806
- this.setState({
807
- step: 1
808
- });
809
- };
810
805
  }
811
806
 
812
807
  render() {
813
- const { step } = this.state;
814
-
815
808
  const steps = [
816
809
  { id: 1, name: 'First step', component: <p>Step 1 content</p> },
817
810
  { id: 2, name: 'Second step', component: <p>Step 2 content</p> },
@@ -819,19 +812,16 @@ class RememberLastStepWizard extends React.Component {
819
812
  { id: 4, name: 'Fourth step', component: <p>Step 4 content</p> },
820
813
  { id: 5, name: 'Review', component: <p>Review step content</p>, nextButtonText: 'Finish' }
821
814
  ];
822
- const title = 'Remember last step wizard';
815
+ const title = 'Get current step wizard';
823
816
  return (
824
817
  <Wizard
825
818
  navAriaLabel={`${title} steps`}
826
819
  mainAriaLabel={`${title} content`}
827
- startAtStep={step}
828
- onNext={this.onMove}
829
- onBack={this.onMove}
830
- onSave={this.onSave}
831
820
  onClose={this.closeWizard}
832
821
  description="Simple Wizard Description"
833
822
  steps={steps}
834
823
  height={400}
824
+ onCurrentStepChanged={this.onCurrentStepChanged}
835
825
  />
836
826
  );
837
827
  }
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import { CalendarMonth } from '@patternfly/react-core';
3
-
4
- export const CalendarMonthDefault: React.FunctionComponent = () => <CalendarMonth date={new Date()} />;