@saas-ui/forms 0.8.0-next.4 → 1.0.0-rc.10

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 (46) hide show
  1. package/CHANGELOG.md +130 -58
  2. package/README.md +29 -0
  3. package/ajv/package.json +18 -0
  4. package/dist/ajv/ajv-resolver.d.ts +11 -0
  5. package/dist/ajv/ajv-resolver.d.ts.map +1 -0
  6. package/dist/ajv/index.d.ts +2 -0
  7. package/dist/ajv/index.d.ts.map +1 -0
  8. package/dist/ajv/index.js +97 -0
  9. package/dist/ajv/index.js.map +1 -0
  10. package/dist/ajv/index.modern.mjs +97 -0
  11. package/dist/ajv/index.modern.mjs.map +1 -0
  12. package/dist/array-field.d.ts +14 -3
  13. package/dist/array-field.d.ts.map +1 -1
  14. package/dist/auto-form.d.ts +13 -1
  15. package/dist/auto-form.d.ts.map +1 -1
  16. package/dist/field.d.ts +82 -27
  17. package/dist/field.d.ts.map +1 -1
  18. package/dist/form.d.ts.map +1 -1
  19. package/dist/index.js +1 -1
  20. package/dist/index.js.map +1 -1
  21. package/dist/index.modern.mjs +1 -1
  22. package/dist/index.modern.mjs.map +1 -1
  23. package/dist/step-form.d.ts +4 -4
  24. package/dist/step-form.d.ts.map +1 -1
  25. package/dist/use-step-form.d.ts +7 -3
  26. package/dist/use-step-form.d.ts.map +1 -1
  27. package/dist/yup/index.js +1 -1
  28. package/dist/yup/index.js.map +1 -1
  29. package/dist/yup/index.modern.mjs +1 -1
  30. package/dist/yup/index.modern.mjs.map +1 -1
  31. package/dist/zod/index.js +1 -1
  32. package/dist/zod/index.js.map +1 -1
  33. package/dist/zod/index.modern.mjs +1 -1
  34. package/dist/zod/index.modern.mjs.map +1 -1
  35. package/package.json +32 -17
  36. package/src/array-field.tsx +21 -22
  37. package/src/auto-form.tsx +22 -3
  38. package/src/field-resolver.ts +2 -2
  39. package/src/field.tsx +186 -71
  40. package/src/form.tsx +0 -1
  41. package/src/object-field.tsx +3 -3
  42. package/src/step-form.tsx +23 -17
  43. package/src/submit-button.tsx +1 -1
  44. package/src/use-step-form.tsx +27 -12
  45. package/yup/package.json +2 -2
  46. package/zod/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,70 +1,124 @@
1
1
  # @saas-ui/forms
2
2
 
3
- ## 0.8.0-next.4
3
+ ## 1.0.0-rc.10
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - Updated Chakra to 2.1.2
8
- - Updated dependencies
9
- - @saas-ui/button@0.5.0-next.4
10
- - @saas-ui/input-right-button@0.4.0-next.4
11
- - @saas-ui/number-input@0.4.0-next.4
12
- - @saas-ui/password-input@0.4.0-next.4
13
- - @saas-ui/pin-input@0.4.0-next.4
14
- - @saas-ui/radio@0.4.0-next.4
15
- - @saas-ui/react-utils@0.2.0-next.4
16
- - @saas-ui/select@0.5.0-next.4
17
- - @saas-ui/stepper@0.3.0-next.4
7
+ - bd3438d: FormStep now supports an onSubmit handler.
18
8
 
19
- ## 0.8.0-next.3
9
+ ## 1.0.0-rc.9
20
10
 
21
11
  ### Patch Changes
22
12
 
23
- - Bump version
24
- - Updated dependencies
25
- - @saas-ui/button@0.5.0-next.3
26
- - @saas-ui/input-right-button@0.4.0-next.3
27
- - @saas-ui/number-input@0.4.0-next.3
28
- - @saas-ui/password-input@0.4.0-next.3
29
- - @saas-ui/pin-input@0.4.0-next.3
30
- - @saas-ui/radio@0.4.0-next.3
31
- - @saas-ui/react-utils@0.2.0-next.3
32
- - @saas-ui/select@0.5.0-next.3
33
- - @saas-ui/stepper@0.3.0-next.3
13
+ - 43dff99: Option labels are now optional.
14
+ - d4afda3: ArrayFieldRowFields now accepts all FormLayout props (#48).
15
+ - 43dff99: Field is now correctly typed based on the field type.
16
+ - 38f7171: #50 - Fixed StepForm render prop types.
17
+ - Updated dependencies [870db1f]
18
+ - @saas-ui/button@1.0.0-rc.4
19
+ - @saas-ui/input-right-button@1.0.0-rc.4
20
+ - @saas-ui/password-input@1.0.0-rc.4
34
21
 
35
- ## 0.8.0-next.2
22
+ ## 1.0.0-rc.8
36
23
 
37
24
  ### Patch Changes
38
25
 
39
- - 1fdf52a: Modern bundles now use .mjs extension.
40
- - Updated dependencies [1fdf52a]
41
- - @saas-ui/button@0.5.0-next.2
42
- - @saas-ui/input-right-button@0.4.0-next.2
43
- - @saas-ui/number-input@0.4.0-next.2
44
- - @saas-ui/password-input@0.4.0-next.2
45
- - @saas-ui/pin-input@0.4.0-next.2
46
- - @saas-ui/radio@0.4.0-next.2
47
- - @saas-ui/react-utils@0.2.0-next.2
48
- - @saas-ui/select@0.5.0-next.2
49
- - @saas-ui/stepper@0.3.0-next.2
26
+ - dc6376f: Updated all readme files, added better descriptions and links to docs and source code.
27
+ - 68f5d3b: Removed isPrimary and isSecondary Button properties, use colorScheme="primary" instead.
28
+ - Updated dependencies [dc6376f]
29
+ - Updated dependencies [68f5d3b]
30
+ - @saas-ui/button@1.0.0-rc.3
31
+ - @saas-ui/input-right-button@1.0.0-rc.3
32
+ - @saas-ui/number-input@1.0.0-rc.3
33
+ - @saas-ui/password-input@1.0.0-rc.3
34
+ - @saas-ui/pin-input@1.0.0-rc.4
35
+ - @saas-ui/radio@1.0.0-rc.3
36
+ - @saas-ui/react-utils@1.0.0-rc.3
37
+ - @saas-ui/select@1.0.0-rc.3
38
+ - @saas-ui/stepper@1.0.0-rc.4
50
39
 
51
- ## 0.8.0-next.1
40
+ ## 1.0.0-rc.7
52
41
 
53
42
  ### Patch Changes
54
43
 
55
- - Bump version
44
+ - Fix vertical orientation for FormStepper.
45
+
46
+ ## 1.0.0-rc.6
47
+
48
+ ### Patch Changes
49
+
50
+ - Add exports entry for ajv
51
+
52
+ ## 1.0.0-rc.5
53
+
54
+ ### Patch Changes
55
+
56
+ - fca06e4: Added Json Schema (ajv) support for AutoForm.
57
+
58
+ ## 1.0.0-rc.4
59
+
60
+ ### Patch Changes
61
+
62
+ - Updated dependencies [9e9c601]
63
+ - @saas-ui/stepper@1.0.0-rc.3
64
+
65
+ ## 1.0.0-rc.3
66
+
67
+ ### Minor Changes
68
+
69
+ - 532a7d4: Updated to Chakra UI 2.2.1
70
+ - 7a16ef7: Updated to Chakra UI 2.2.1
71
+
72
+ ### Patch Changes
73
+
74
+ - 6133901: No longer passing down label to input fields.
75
+ - ddec417: ArrayField no longer passing down items to the container element.
76
+ - 5f80cea: AutoForm now renders children.
77
+ - 532a7d4: Fixed all theme onconsistencies.
78
+ - 1c247cb: InputField now has type="text" by default.
79
+ - d1fb472: Select now renders a hidden input with the current value.
80
+ - Updated dependencies [c8621b8]
81
+ - Updated dependencies [532a7d4]
82
+ - Updated dependencies [7a16ef7]
83
+ - Updated dependencies [532a7d4]
84
+ - @saas-ui/select@1.0.0-rc.2
85
+ - @saas-ui/button@1.0.0-rc.2
86
+ - @saas-ui/input-right-button@1.0.0-rc.2
87
+ - @saas-ui/number-input@1.0.0-rc.2
88
+ - @saas-ui/password-input@1.0.0-rc.2
89
+ - @saas-ui/pin-input@1.0.0-rc.3
90
+ - @saas-ui/radio@1.0.0-rc.2
91
+ - @saas-ui/react-utils@1.0.0-rc.2
92
+ - @saas-ui/stepper@1.0.0-rc.2
93
+
94
+ ## 1.0.0-rc.2
95
+
96
+ ### Patch Changes
97
+
98
+ - Re-publish.
56
99
  - Updated dependencies
57
- - @saas-ui/button@0.5.0-next.1
58
- - @saas-ui/input-right-button@0.4.0-next.1
59
- - @saas-ui/number-input@0.4.0-next.1
60
- - @saas-ui/password-input@0.4.0-next.1
61
- - @saas-ui/pin-input@0.4.0-next.1
62
- - @saas-ui/radio@0.4.0-next.1
63
- - @saas-ui/react-utils@0.2.0-next.1
64
- - @saas-ui/select@0.5.0-next.1
65
- - @saas-ui/stepper@0.3.0-next.1
66
-
67
- ## 0.8.0-next.0
100
+ - @saas-ui/button@1.0.0-rc.1
101
+ - @saas-ui/input-right-button@1.0.0-rc.1
102
+ - @saas-ui/number-input@1.0.0-rc.1
103
+ - @saas-ui/password-input@1.0.0-rc.1
104
+ - @saas-ui/pin-input@1.0.0-rc.2
105
+ - @saas-ui/radio@1.0.0-rc.1
106
+ - @saas-ui/react-utils@1.0.0-rc.1
107
+ - @saas-ui/select@1.0.0-rc.1
108
+ - @saas-ui/stepper@1.0.0-rc.1
109
+
110
+ ## 1.0.0-rc.1
111
+
112
+ ### Patch Changes
113
+
114
+ - Updated dependencies [3dee538]
115
+ - @saas-ui/pin-input@1.0.0-rc.1
116
+
117
+ ## 1.0.0-rc.0
118
+
119
+ ### Major Changes
120
+
121
+ - 1db5bf9: Initial release candidate
68
122
 
69
123
  ### Minor Changes
70
124
 
@@ -73,17 +127,35 @@
73
127
 
74
128
  ### Patch Changes
75
129
 
130
+ - 1fdf52a: Modern bundles now use .mjs extension.
76
131
  - Updated dependencies [3ae6be1]
132
+ - Updated dependencies [1db5bf9]
133
+ - Updated dependencies [1fdf52a]
77
134
  - Updated dependencies [3ae6be1]
78
- - @saas-ui/button@0.5.0-next.0
79
- - @saas-ui/input-right-button@0.4.0-next.0
80
- - @saas-ui/number-input@0.4.0-next.0
81
- - @saas-ui/password-input@0.4.0-next.0
82
- - @saas-ui/pin-input@0.4.0-next.0
83
- - @saas-ui/radio@0.4.0-next.0
84
- - @saas-ui/react-utils@0.2.0-next.0
85
- - @saas-ui/select@0.5.0-next.0
86
- - @saas-ui/stepper@0.3.0-next.0
135
+ - @saas-ui/button@1.0.0-rc.0
136
+ - @saas-ui/input-right-button@1.0.0-rc.0
137
+ - @saas-ui/number-input@1.0.0-rc.0
138
+ - @saas-ui/password-input@1.0.0-rc.0
139
+ - @saas-ui/pin-input@1.0.0-rc.0
140
+ - @saas-ui/radio@1.0.0-rc.0
141
+ - @saas-ui/react-utils@1.0.0-rc.0
142
+ - @saas-ui/select@1.0.0-rc.0
143
+ - @saas-ui/stepper@1.0.0-rc.0
144
+
145
+ ## 0.7.10
146
+
147
+ ### Patch Changes
148
+
149
+ - Updated Chakra UI version range not to include 2.x
150
+ - Updated dependencies
151
+ - @saas-ui/button@0.4.2
152
+ - @saas-ui/input-right-button@0.3.3
153
+ - @saas-ui/number-input@0.3.1
154
+ - @saas-ui/password-input@0.3.4
155
+ - @saas-ui/pin-input@0.3.1
156
+ - @saas-ui/radio@0.3.1
157
+ - @saas-ui/select@0.4.1
158
+ - @saas-ui/stepper@0.2.3
87
159
 
88
160
  ## 0.7.9
89
161
 
package/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # @saas-ui/forms
2
+
3
+ Chakra UI Forms.
4
+
5
+ Create fully functional React forms with just a few lines of code.
6
+
7
+ Uses React Hook Form under the hood.
8
+
9
+ ## Installation
10
+
11
+ ```sh
12
+ $ yarn add @saas-ui/forms
13
+
14
+ #or
15
+
16
+ $ npm i @saas-ui/forms --save
17
+ ```
18
+
19
+ ## Docs
20
+
21
+ https://www.saas-ui.dev/docs/forms/form
22
+
23
+ ## Source
24
+
25
+ https://github.com/saas-js/saas-ui/tree/next/packages/saas-ui-forms
26
+
27
+ ## License
28
+
29
+ MIT - Appulse Software
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "ajv",
3
+ "description": "Saas UI Forms field resolver: ajv",
4
+ "version": "1.0.0",
5
+ "private": true,
6
+ "source": "./src/index.ts",
7
+ "main": "../dist/ajv/index.js",
8
+ "module": "../dist/ajv/index.modern.mjs",
9
+ "types": "../dist/ajv/index.d.ts",
10
+ "author": "Eelco Wiersma <eelco@appulse.nl>",
11
+ "license": "MIT",
12
+ "peerDependencies": {
13
+ "@chakra-ui/utils": "^2.0.2",
14
+ "@hookform/resolvers": "^2.9.0",
15
+ "react-hook-form": "^7.31.3",
16
+ "ajv": "^8.11.0"
17
+ }
18
+ }
@@ -0,0 +1,11 @@
1
+ import { ajvResolver } from '@hookform/resolvers/ajv';
2
+ import { FieldResolver } from '@saas-ui/forms';
3
+ import { JSONSchemaType } from 'ajv';
4
+ interface JsonSchemaFormReturn {
5
+ schema: JSONSchemaType<unknown>;
6
+ fieldResolver: FieldResolver;
7
+ resolver: ReturnType<typeof ajvResolver>;
8
+ }
9
+ export declare const jsonSchemaForm: (schema: JSONSchemaType<unknown>) => JsonSchemaFormReturn;
10
+ export {};
11
+ //# sourceMappingURL=ajv-resolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ajv-resolver.d.ts","sourceRoot":"","sources":["../../ajv/src/ajv-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAuB,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAEnE,OAAO,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AAMpC,UAAU,oBAAoB;IAC5B,MAAM,EAAE,cAAc,CAAC,OAAO,CAAC,CAAA;IAC/B,aAAa,EAAE,aAAa,CAAA;IAC5B,QAAQ,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,CAAA;CACzC;AAED,eAAO,MAAM,cAAc,WACjB,eAAe,OAAO,CAAC,KAC9B,oBAMF,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './ajv-resolver';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../ajv/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}