From f995423ea3ae002b2ce93afa025f131d7c681b06 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 12:19:33 +0100 Subject: [PATCH] chore: version packages (#2478) Co-authored-by: eikeland --- .changeset/academy-unrest-linear.md | 61 -------------------------- packages/stepper/CHANGELOG.md | 63 +++++++++++++++++++++++++++ packages/stepper/package.json | 2 +- storybook/CHANGELOG.md | 66 +++++++++++++++++++++++++++++ storybook/package.json | 2 +- 5 files changed, 131 insertions(+), 63 deletions(-) delete mode 100644 .changeset/academy-unrest-linear.md diff --git a/.changeset/academy-unrest-linear.md b/.changeset/academy-unrest-linear.md deleted file mode 100644 index e027328a3..000000000 --- a/.changeset/academy-unrest-linear.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -'@equinor/fusion-react-stepper': major -'@equinor/fusion-react-components-stories': patch ---- - -Changed implementation of the Stepper component from being uncontrolled to having a both an uncontrolled and controlled mode. - -- Required 'activeStepKey' prop removed. Replaced with 'initialStepKey' and 'stepKey' (both optional) -- If 'stepKey' is set, then the component becomes controlled by that prop. -- If 'stepKey' is set and 'initialStepKey' is set, then the initial step will be that prop, but otherwise be uncontrolled. -- If none of these props are set then it will be uncontrolled, and default to the first step of the steps provided as the initial step. -- Updated 'Stepper' README and Storybook with examples of usage. - -This is a breaking change since the 'activeStepKey' was required, and now needs to be either removed or replaced with one of the two new optional props. - -## Migration guide: - -### Uncontrolled usage: -```tsx -import { Stepper } from '@equinor/fusion-react-stepper'; - -/** initialStepKey here is optional. If not set it defaults to the first step ('step1') */ - console.log('active: ', e, ' keys: ', k)} props> - - Step content 1 - - - Step content 2 - - - Step content 3 - - -``` - -### Controlled usage: -```tsx -import { Stepper } from '@equinor/fusion-react-stepper'; - -const [activeStep, setActiveStep] = useState('step1'); -const onChangeStep = (stepKey: string, allSteps: StepKey[]) => { - console.log('active: ', stepKey, ' keys: ', allSteps) - if (activeStep !== stepKey) { - setActiveStep(String(stepKey)); - } -}; - -return ( - - - Step content 1 - - - Step content 2 - - - Step content 3 - - -); -``` diff --git a/packages/stepper/CHANGELOG.md b/packages/stepper/CHANGELOG.md index 391d64ca3..bd1cedcb4 100644 --- a/packages/stepper/CHANGELOG.md +++ b/packages/stepper/CHANGELOG.md @@ -1,5 +1,68 @@ # Change Log +## 2.0.0 + +### Major Changes + +- eba9cf6: Changed implementation of the Stepper component from being uncontrolled to having a both an uncontrolled and controlled mode. + + - Required 'activeStepKey' prop removed. Replaced with 'initialStepKey' and 'stepKey' (both optional) + - If 'stepKey' is set, then the component becomes controlled by that prop. + - If 'stepKey' is set and 'initialStepKey' is set, then the initial step will be that prop, but otherwise be uncontrolled. + - If none of these props are set then it will be uncontrolled, and default to the first step of the steps provided as the initial step. + - Updated 'Stepper' README and Storybook with examples of usage. + + This is a breaking change since the 'activeStepKey' was required, and now needs to be either removed or replaced with one of the two new optional props. + + ## Migration guide: + + ### Uncontrolled usage: + + ```tsx + import { Stepper } from '@equinor/fusion-react-stepper'; + + /** initialStepKey here is optional. If not set it defaults to the first step ('step1') */ + console.log('active: ', e, ' keys: ', k)} props> + + Step content 1 + + + Step content 2 + + + Step content 3 + + ; + ``` + + ### Controlled usage: + + ```tsx + import { Stepper } from '@equinor/fusion-react-stepper'; + + const [activeStep, setActiveStep] = useState('step1'); + const onChangeStep = (stepKey: string, allSteps: StepKey[]) => { + console.log('active: ', stepKey, ' keys: ', allSteps); + if (activeStep !== stepKey) { + setActiveStep(String(stepKey)); + } + }; + + return ( + + + Step content 1 + + + Step content 2 + + + Step content 3 + + + ); + ``` + ## 1.0.1 ### Patch Changes diff --git a/packages/stepper/package.json b/packages/stepper/package.json index 4740c5766..26b4cc3fd 100644 --- a/packages/stepper/package.json +++ b/packages/stepper/package.json @@ -1,6 +1,6 @@ { "name": "@equinor/fusion-react-stepper", - "version": "1.0.1", + "version": "2.0.0", "description": "Component for displaying and using stepps in stepper", "keywords": [ "stepper", diff --git a/storybook/CHANGELOG.md b/storybook/CHANGELOG.md index b3fff94f7..08fbc83c9 100644 --- a/storybook/CHANGELOG.md +++ b/storybook/CHANGELOG.md @@ -1,5 +1,71 @@ # Change Log +## 4.1.13 + +### Patch Changes + +- eba9cf6: Changed implementation of the Stepper component from being uncontrolled to having a both an uncontrolled and controlled mode. + + - Required 'activeStepKey' prop removed. Replaced with 'initialStepKey' and 'stepKey' (both optional) + - If 'stepKey' is set, then the component becomes controlled by that prop. + - If 'stepKey' is set and 'initialStepKey' is set, then the initial step will be that prop, but otherwise be uncontrolled. + - If none of these props are set then it will be uncontrolled, and default to the first step of the steps provided as the initial step. + - Updated 'Stepper' README and Storybook with examples of usage. + + This is a breaking change since the 'activeStepKey' was required, and now needs to be either removed or replaced with one of the two new optional props. + + ## Migration guide: + + ### Uncontrolled usage: + + ```tsx + import { Stepper } from '@equinor/fusion-react-stepper'; + + /** initialStepKey here is optional. If not set it defaults to the first step ('step1') */ + console.log('active: ', e, ' keys: ', k)} props> + + Step content 1 + + + Step content 2 + + + Step content 3 + + ; + ``` + + ### Controlled usage: + + ```tsx + import { Stepper } from '@equinor/fusion-react-stepper'; + + const [activeStep, setActiveStep] = useState('step1'); + const onChangeStep = (stepKey: string, allSteps: StepKey[]) => { + console.log('active: ', stepKey, ' keys: ', allSteps); + if (activeStep !== stepKey) { + setActiveStep(String(stepKey)); + } + }; + + return ( + + + Step content 1 + + + Step content 2 + + + Step content 3 + + + ); + ``` + +- Updated dependencies [eba9cf6] + - @equinor/fusion-react-stepper@2.0.0 + ## 4.1.12 ### Patch Changes diff --git a/storybook/package.json b/storybook/package.json index 7a8607750..4123b02bb 100644 --- a/storybook/package.json +++ b/storybook/package.json @@ -1,6 +1,6 @@ { "name": "@equinor/fusion-react-components-stories", - "version": "4.1.12", + "version": "4.1.13", "description": "", "private": true, "scripts": {