From 3240f646284c062d8cca050f40d6cfeae88a7f71 Mon Sep 17 00:00:00 2001 From: Eelco Wiersma Date: Wed, 8 Jun 2022 13:29:45 +0200 Subject: [PATCH] Release 1.0.0-rc.5 --- .changeset/pre.json | 1 + packages/saas-ui-auth/CHANGELOG.md | 6 ++++++ packages/saas-ui-auth/package.json | 2 +- packages/saas-ui-clerk/CHANGELOG.md | 6 ++++++ packages/saas-ui-clerk/package.json | 2 +- packages/saas-ui-forms/CHANGELOG.md | 7 +++++++ packages/saas-ui-forms/package.json | 2 +- packages/saas-ui-forms/src/step-form.tsx | 2 +- packages/saas-ui-forms/src/use-step-form.tsx | 5 +++-- packages/saas-ui-modals/CHANGELOG.md | 6 ++++++ packages/saas-ui-modals/package.json | 2 +- packages/saas-ui-react/CHANGELOG.md | 11 +++++++++++ packages/saas-ui-react/package.json | 2 +- packages/saas-ui-stepper/CHANGELOG.md | 6 ++++++ packages/saas-ui-stepper/package.json | 2 +- packages/saas-ui-stepper/src/use-stepper.tsx | 4 ++-- 16 files changed, 55 insertions(+), 11 deletions(-) diff --git a/.changeset/pre.json b/.changeset/pre.json index 969e87e90..9673d0c11 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -49,6 +49,7 @@ "gorgeous-cars-doubt", "gorgeous-emus-grow", "lemon-ears-flash", + "mighty-swans-check", "moody-camels-sniff", "odd-squids-type", "quiet-gifts-fix", diff --git a/packages/saas-ui-auth/CHANGELOG.md b/packages/saas-ui-auth/CHANGELOG.md index 3762c0701..2a3a42b93 100644 --- a/packages/saas-ui-auth/CHANGELOG.md +++ b/packages/saas-ui-auth/CHANGELOG.md @@ -1,5 +1,11 @@ # @saas-ui/auth +## 1.0.0-rc.5 + +### Patch Changes + +- @saas-ui/forms@1.0.0-rc.4 + ## 1.0.0-rc.4 ### Minor Changes diff --git a/packages/saas-ui-auth/package.json b/packages/saas-ui-auth/package.json index 855cb3bfe..9d9ef4678 100644 --- a/packages/saas-ui-auth/package.json +++ b/packages/saas-ui-auth/package.json @@ -1,6 +1,6 @@ { "name": "@saas-ui/auth", - "version": "1.0.0-rc.4", + "version": "1.0.0-rc.5", "description": "Authentication provider and components for Chakra UI", "source": "src/index.ts", "exports": { diff --git a/packages/saas-ui-clerk/CHANGELOG.md b/packages/saas-ui-clerk/CHANGELOG.md index 457987e76..7beff98d1 100644 --- a/packages/saas-ui-clerk/CHANGELOG.md +++ b/packages/saas-ui-clerk/CHANGELOG.md @@ -1,5 +1,11 @@ # @saas-ui/clerk +## 1.0.0-rc.5 + +### Patch Changes + +- @saas-ui/auth@1.0.0-rc.5 + ## 1.0.0-rc.4 ### Minor Changes diff --git a/packages/saas-ui-clerk/package.json b/packages/saas-ui-clerk/package.json index 3af0dae93..926497551 100644 --- a/packages/saas-ui-clerk/package.json +++ b/packages/saas-ui-clerk/package.json @@ -1,6 +1,6 @@ { "name": "@saas-ui/clerk", - "version": "1.0.0-rc.4", + "version": "1.0.0-rc.5", "description": "Clerk Authentication Service for Saas UI", "source": "src/index.ts", "exports": { diff --git a/packages/saas-ui-forms/CHANGELOG.md b/packages/saas-ui-forms/CHANGELOG.md index 681091a42..4bc3c302d 100644 --- a/packages/saas-ui-forms/CHANGELOG.md +++ b/packages/saas-ui-forms/CHANGELOG.md @@ -1,5 +1,12 @@ # @saas-ui/forms +## 1.0.0-rc.4 + +### Patch Changes + +- Updated dependencies [9e9c601] + - @saas-ui/stepper@1.0.0-rc.3 + ## 1.0.0-rc.3 ### Minor Changes diff --git a/packages/saas-ui-forms/package.json b/packages/saas-ui-forms/package.json index 53f806ea1..0159ac99b 100644 --- a/packages/saas-ui-forms/package.json +++ b/packages/saas-ui-forms/package.json @@ -1,6 +1,6 @@ { "name": "@saas-ui/forms", - "version": "1.0.0-rc.3", + "version": "1.0.0-rc.4", "description": "Fully functional forms for Chakra UI.", "source": "src/index.ts", "exports": { diff --git a/packages/saas-ui-forms/src/step-form.tsx b/packages/saas-ui-forms/src/step-form.tsx index c403f4aff..39367b8e5 100644 --- a/packages/saas-ui-forms/src/step-form.tsx +++ b/packages/saas-ui-forms/src/step-form.tsx @@ -103,7 +103,7 @@ export const FormStepper: React.FC = (props) => { return child }) - const onChange = React.useCallback((name: string, i: number) => { + const onChange = React.useCallback((i: number) => { setIndex(i) }, []) diff --git a/packages/saas-ui-forms/src/use-step-form.tsx b/packages/saas-ui-forms/src/use-step-form.tsx index 49cfc6aed..78b6939ea 100644 --- a/packages/saas-ui-forms/src/use-step-form.tsx +++ b/packages/saas-ui-forms/src/use-step-form.tsx @@ -32,7 +32,7 @@ import { FormProps } from './form' export interface UseStepFormProps< TFieldValues extends FieldValues = FieldValues -> extends UseStepperProps, +> extends Omit, Omit, 'children'> { children: | React.ReactNode @@ -54,7 +54,8 @@ export interface UseStepFormReturn< export function useStepForm( props: UseStepFormProps ): UseStepFormReturn { - const stepper = useStepper(props) + const { onChange, ...rest } = props + const stepper = useStepper(rest) const { activeStep, isLastStep, nextStep } = stepper diff --git a/packages/saas-ui-modals/CHANGELOG.md b/packages/saas-ui-modals/CHANGELOG.md index 2f4036c96..faa5bba02 100644 --- a/packages/saas-ui-modals/CHANGELOG.md +++ b/packages/saas-ui-modals/CHANGELOG.md @@ -1,5 +1,11 @@ # @saas-ui/modals +## 1.0.0-rc.4 + +### Patch Changes + +- @saas-ui/forms@1.0.0-rc.4 + ## 1.0.0-rc.3 ### Minor Changes diff --git a/packages/saas-ui-modals/package.json b/packages/saas-ui-modals/package.json index 95a4fded7..64f337ae8 100644 --- a/packages/saas-ui-modals/package.json +++ b/packages/saas-ui-modals/package.json @@ -1,6 +1,6 @@ { "name": "@saas-ui/modals", - "version": "1.0.0-rc.3", + "version": "1.0.0-rc.4", "description": "A modal manager for Chakra UI", "source": "src/index.ts", "exports": { diff --git a/packages/saas-ui-react/CHANGELOG.md b/packages/saas-ui-react/CHANGELOG.md index 9742a1ade..90ebaa52e 100644 --- a/packages/saas-ui-react/CHANGELOG.md +++ b/packages/saas-ui-react/CHANGELOG.md @@ -1,5 +1,16 @@ # @saas-ui/react +## 1.0.0-rc.5 + +### Patch Changes + +- 9e9c601: Stepper now accepts an onChange handler. +- Updated dependencies [9e9c601] + - @saas-ui/stepper@1.0.0-rc.3 + - @saas-ui/forms@1.0.0-rc.4 + - @saas-ui/auth@1.0.0-rc.5 + - @saas-ui/modals@1.0.0-rc.4 + ## 1.0.0-rc.4 ### Minor Changes diff --git a/packages/saas-ui-react/package.json b/packages/saas-ui-react/package.json index eadfa739c..045574c74 100644 --- a/packages/saas-ui-react/package.json +++ b/packages/saas-ui-react/package.json @@ -1,6 +1,6 @@ { "name": "@saas-ui/react", - "version": "1.0.0-rc.4", + "version": "1.0.0-rc.5", "description": "Saas UI - The frontend stack for SaaS companies.", "source": "src/index.ts", "exports": { diff --git a/packages/saas-ui-stepper/CHANGELOG.md b/packages/saas-ui-stepper/CHANGELOG.md index 7b362b42d..659804f7c 100644 --- a/packages/saas-ui-stepper/CHANGELOG.md +++ b/packages/saas-ui-stepper/CHANGELOG.md @@ -1,5 +1,11 @@ # @saas-ui/stepper +## 1.0.0-rc.3 + +### Patch Changes + +- 9e9c601: Stepper now accepts an onChange handler. + ## 1.0.0-rc.2 ### Minor Changes diff --git a/packages/saas-ui-stepper/package.json b/packages/saas-ui-stepper/package.json index bb872745e..2ae7d2d25 100644 --- a/packages/saas-ui-stepper/package.json +++ b/packages/saas-ui-stepper/package.json @@ -1,6 +1,6 @@ { "name": "@saas-ui/stepper", - "version": "1.0.0-rc.2", + "version": "1.0.0-rc.3", "description": "A Stepper component for Chakra UI", "source": "src/index.ts", "exports": { diff --git a/packages/saas-ui-stepper/src/use-stepper.tsx b/packages/saas-ui-stepper/src/use-stepper.tsx index fe4106ea3..f50266d98 100644 --- a/packages/saas-ui-stepper/src/use-stepper.tsx +++ b/packages/saas-ui-stepper/src/use-stepper.tsx @@ -12,7 +12,7 @@ export const [StepperProvider, useStepperContext] = export interface UseStepperProps { step?: number | string isCompleted?: boolean - onChange?(name: string, index: number): void + onChange?(index: number): void } export function useStepper(props: UseStepperProps) { @@ -68,7 +68,7 @@ export function useStepper(props: UseStepperProps) { }, [step]) React.useEffect(() => { - onChange?.(stepsRef.current[activeIndex], activeIndex) + onChange?.(activeIndex) }, [activeIndex, onChange]) const context = {