@saas-ui/react 0.12.0-next.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/CHANGELOG.md +48 -31
  2. package/package.json +24 -24
package/CHANGELOG.md CHANGED
@@ -1,55 +1,72 @@
1
1
  # @saas-ui/react
2
2
 
3
- ## 0.12.0-next.0
3
+ ## 0.12.0
4
4
 
5
5
  ### Minor Changes
6
6
 
7
- - 9391c44: BREAKING: Removed yup dependency from forms and fixed peer dependency issues.
7
+ - 0e81abd: BREAKING: Removed Yup dependency, you now need to configure default Form resolvers
8
8
 
9
- <Form> doesn't accept a Yup `schema` any more by default.
9
+ <Form> no longer accepts a Yup `schema` by default.
10
10
 
11
11
  Use a schema resolver to use schema support. All hookform resolvers are supported.
12
12
 
13
- ```
14
- import {yupResolver} from '@hookform/resolvers/yup'
13
+ ```ts
14
+ import { yupResolver } from '@hookform/resolvers/yup'
15
15
 
16
- <Form resolver={yupResolver(schema)} />
16
+ const form = <Form resolver={yupResolver(schema)} />
17
17
  ```
18
18
 
19
19
  AutoForm only supports Yup for now and has a new API.
20
20
 
21
- ```
21
+ ```ts
22
22
  import { yupForm } from '@saas-ui/forms/yup'
23
23
 
24
- <AutoForm {...yupForm(schema)} />
24
+ const form = <AutoForm {...yupForm(schema)} />
25
25
  ```
26
26
 
27
+ Alternatively you can configure a default resolver for all forms.
28
+ Add this somewhere in the root of your project.
29
+
30
+ ```ts
31
+ import { Form } from '@saas-ui/react'
32
+ import { yupResolver, yupFieldResolver } from '@saas-ui/forms/yup' // yupResolver is exported from here as well for convenience.
33
+ import { AnyObjectSchema } from 'yup'
34
+
35
+ Form.getResolver = (schema: AnyObjectSchema) => yupResolver(schema) // @hookform/resolvers
36
+ Form.getFieldResolver = (schema: AnyObjectSchema) => yupFieldResolver(schema) // AutoForm field resolver
37
+ ```
38
+
39
+ - 9391c44: Fixed peer dependency issues.
40
+
27
41
  ### Patch Changes
28
42
 
43
+ - bf66fdf: Improved Auth forms types
44
+ - Updated dependencies [0e81abd]
45
+ - Updated dependencies [bf66fdf]
29
46
  - Updated dependencies [9391c44]
30
- - @saas-ui/auth@0.7.0-next.0
31
- - @saas-ui/button@0.4.0-next.0
32
- - @saas-ui/card@0.4.0-next.0
33
- - @saas-ui/data-table@0.3.0-next.0
34
- - @saas-ui/forms@0.6.0-next.0
35
- - @saas-ui/hooks@0.4.0-next.0
36
- - @saas-ui/hotkeys@0.5.0-next.0
37
- - @saas-ui/layout@0.3.0-next.0
38
- - @saas-ui/list@0.5.0-next.0
39
- - @saas-ui/menu@0.5.0-next.0
40
- - @saas-ui/modals@0.4.0-next.0
41
- - @saas-ui/nprogress@0.4.0-next.0
42
- - @saas-ui/persona@0.5.0-next.0
43
- - @saas-ui/search-input@0.5.0-next.0
44
- - @saas-ui/select@0.4.0-next.0
45
- - @saas-ui/snackbar@0.4.0-next.0
46
- - @saas-ui/stepper@0.2.0-next.0
47
- - @saas-ui/theme@0.7.0-next.0
48
- - @saas-ui/banner@0.0.2-next.0
49
- - @saas-ui/input-right-button@0.3.1-next.0
50
- - @saas-ui/property@0.3.1-next.0
51
- - @saas-ui/provider@0.3.5-next.0
52
- - @saas-ui/password-input@0.3.1-next.0
47
+ - @saas-ui/forms@0.6.0
48
+ - @saas-ui/auth@0.7.0
49
+ - @saas-ui/button@0.4.0
50
+ - @saas-ui/card@0.4.0
51
+ - @saas-ui/data-table@0.3.0
52
+ - @saas-ui/hooks@0.4.0
53
+ - @saas-ui/hotkeys@0.5.0
54
+ - @saas-ui/layout@0.3.0
55
+ - @saas-ui/list@0.5.0
56
+ - @saas-ui/menu@0.5.0
57
+ - @saas-ui/modals@0.4.0
58
+ - @saas-ui/nprogress@0.4.0
59
+ - @saas-ui/persona@0.5.0
60
+ - @saas-ui/search-input@0.5.0
61
+ - @saas-ui/select@0.4.0
62
+ - @saas-ui/snackbar@0.4.0
63
+ - @saas-ui/stepper@0.2.0
64
+ - @saas-ui/theme@0.7.0
65
+ - @saas-ui/banner@0.0.2
66
+ - @saas-ui/input-right-button@0.3.1
67
+ - @saas-ui/property@0.3.1
68
+ - @saas-ui/provider@0.3.5
69
+ - @saas-ui/password-input@0.3.1
53
70
 
54
71
  ## 0.11.8
55
72
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saas-ui/react",
3
- "version": "0.12.0-next.0",
3
+ "version": "0.12.0",
4
4
  "description": "Saas UI - The frontend stack for SaaS companies.",
5
5
  "source": "src/index.ts",
6
6
  "exports": {
@@ -55,34 +55,34 @@
55
55
  "url": "https://storybook.saas-ui.dev"
56
56
  },
57
57
  "dependencies": {
58
- "@saas-ui/auth": "0.7.0-next.0",
59
- "@saas-ui/banner": "0.0.2-next.0",
60
- "@saas-ui/button": "0.4.0-next.0",
61
- "@saas-ui/card": "0.4.0-next.0",
58
+ "@saas-ui/auth": "0.7.0",
59
+ "@saas-ui/banner": "0.0.2",
60
+ "@saas-ui/button": "0.4.0",
61
+ "@saas-ui/card": "0.4.0",
62
62
  "@saas-ui/collapse": "0.3.0",
63
- "@saas-ui/data-table": "0.3.0-next.0",
64
- "@saas-ui/forms": "0.6.0-next.0",
65
- "@saas-ui/hooks": "0.4.0-next.0",
66
- "@saas-ui/hotkeys": "0.5.0-next.0",
67
- "@saas-ui/input-right-button": "0.3.1-next.0",
68
- "@saas-ui/layout": "0.3.0-next.0",
69
- "@saas-ui/list": "0.5.0-next.0",
70
- "@saas-ui/menu": "0.5.0-next.0",
71
- "@saas-ui/modals": "0.4.0-next.0",
72
- "@saas-ui/nprogress": "0.4.0-next.0",
63
+ "@saas-ui/data-table": "0.3.0",
64
+ "@saas-ui/forms": "0.6.0",
65
+ "@saas-ui/hooks": "0.4.0",
66
+ "@saas-ui/hotkeys": "0.5.0",
67
+ "@saas-ui/input-right-button": "0.3.1",
68
+ "@saas-ui/layout": "0.3.0",
69
+ "@saas-ui/list": "0.5.0",
70
+ "@saas-ui/menu": "0.5.0",
71
+ "@saas-ui/modals": "0.4.0",
72
+ "@saas-ui/nprogress": "0.4.0",
73
73
  "@saas-ui/number-input": "0.3.0",
74
74
  "@saas-ui/palette": "0.5.0",
75
- "@saas-ui/password-input": "0.3.1-next.0",
76
- "@saas-ui/persona": "0.5.0-next.0",
75
+ "@saas-ui/password-input": "0.3.1",
76
+ "@saas-ui/persona": "0.5.0",
77
77
  "@saas-ui/pin-input": "0.3.0",
78
- "@saas-ui/property": "0.3.1-next.0",
79
- "@saas-ui/provider": "0.3.5-next.0",
78
+ "@saas-ui/property": "0.3.1",
79
+ "@saas-ui/provider": "0.3.5",
80
80
  "@saas-ui/radio": "0.3.0",
81
- "@saas-ui/search-input": "0.5.0-next.0",
82
- "@saas-ui/select": "0.4.0-next.0",
83
- "@saas-ui/snackbar": "0.4.0-next.0",
84
- "@saas-ui/stepper": "0.2.0-next.0",
85
- "@saas-ui/theme": "0.7.0-next.0"
81
+ "@saas-ui/search-input": "0.5.0",
82
+ "@saas-ui/select": "0.4.0",
83
+ "@saas-ui/snackbar": "0.4.0",
84
+ "@saas-ui/stepper": "0.2.0",
85
+ "@saas-ui/theme": "0.7.0"
86
86
  },
87
87
  "peerDependencies": {
88
88
  "@chakra-ui/react": ">=1.8.0",