Skip to content

Commit

Permalink
Release 1.0.0-rc.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Pagebakers committed Jun 8, 2022
1 parent 9e9c601 commit 3240f64
Show file tree
Hide file tree
Showing 16 changed files with 55 additions and 11 deletions.
1 change: 1 addition & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 6 additions & 0 deletions packages/saas-ui-auth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-auth/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
6 changes: 6 additions & 0 deletions packages/saas-ui-clerk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-clerk/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
7 changes: 7 additions & 0 deletions packages/saas-ui-forms/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-forms/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-forms/src/step-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const FormStepper: React.FC<StepperStepsProps> = (props) => {
return child
})

const onChange = React.useCallback((name: string, i: number) => {
const onChange = React.useCallback((i: number) => {
setIndex(i)
}, [])

Expand Down
5 changes: 3 additions & 2 deletions packages/saas-ui-forms/src/use-step-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import { FormProps } from './form'

export interface UseStepFormProps<
TFieldValues extends FieldValues = FieldValues
> extends UseStepperProps,
> extends Omit<UseStepperProps, 'onChange'>,
Omit<FormProps<TFieldValues>, 'children'> {
children:
| React.ReactNode
Expand All @@ -54,7 +54,8 @@ export interface UseStepFormReturn<
export function useStepForm<TFieldValues extends FieldValues = FieldValues>(
props: UseStepFormProps<TFieldValues>
): UseStepFormReturn<TFieldValues> {
const stepper = useStepper(props)
const { onChange, ...rest } = props
const stepper = useStepper(rest)

const { activeStep, isLastStep, nextStep } = stepper

Expand Down
6 changes: 6 additions & 0 deletions packages/saas-ui-modals/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-modals/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
11 changes: 11 additions & 0 deletions packages/saas-ui-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-react/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
6 changes: 6 additions & 0 deletions packages/saas-ui-stepper/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-stepper/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
4 changes: 2 additions & 2 deletions packages/saas-ui-stepper/src/use-stepper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -68,7 +68,7 @@ export function useStepper(props: UseStepperProps) {
}, [step])

React.useEffect(() => {
onChange?.(stepsRef.current[activeIndex], activeIndex)
onChange?.(activeIndex)
}, [activeIndex, onChange])

const context = {
Expand Down

0 comments on commit 3240f64

Please sign in to comment.