@saas-ui/forms 1.0.0-rc.1 → 1.0.0-rc.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. package/CHANGELOG.md +129 -0
  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 +104 -0
  9. package/dist/ajv/index.js.map +1 -0
  10. package/dist/ajv/index.modern.mjs +104 -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/layout.d.ts +0 -1
  24. package/dist/layout.d.ts.map +1 -1
  25. package/dist/step-form.d.ts +4 -4
  26. package/dist/step-form.d.ts.map +1 -1
  27. package/dist/submit-button.d.ts +2 -1
  28. package/dist/submit-button.d.ts.map +1 -1
  29. package/dist/use-step-form.d.ts +7 -3
  30. package/dist/use-step-form.d.ts.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/dist/zod/zod-resolver.d.ts +2 -2
  36. package/dist/zod/zod-resolver.d.ts.map +1 -1
  37. package/package.json +32 -17
  38. package/src/array-field.tsx +21 -22
  39. package/src/auto-form.tsx +22 -3
  40. package/src/field-resolver.ts +2 -2
  41. package/src/field.tsx +184 -73
  42. package/src/form.tsx +0 -1
  43. package/src/object-field.tsx +3 -3
  44. package/src/step-form.tsx +27 -20
  45. package/src/submit-button.tsx +32 -24
  46. package/src/use-step-form.tsx +27 -12
  47. package/yup/package.json +2 -2
  48. package/zod/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,134 @@
1
1
  # @saas-ui/forms
2
2
 
3
+ ## 1.0.0-rc.12
4
+
5
+ ### Patch Changes
6
+
7
+ - @saas-ui/stepper@1.0.0-rc.6
8
+
9
+ ## 1.0.0-rc.11
10
+
11
+ ### Patch Changes
12
+
13
+ - 1744543: Updated dependencies.
14
+ - Updated dependencies [1744543]
15
+ - @saas-ui/button@1.0.0-rc.5
16
+ - @saas-ui/input-right-button@1.0.0-rc.5
17
+ - @saas-ui/number-input@1.0.0-rc.4
18
+ - @saas-ui/password-input@1.0.0-rc.5
19
+ - @saas-ui/pin-input@1.0.0-rc.5
20
+ - @saas-ui/radio@1.0.0-rc.4
21
+ - @saas-ui/react-utils@1.0.0-rc.4
22
+ - @saas-ui/select@1.0.0-rc.4
23
+ - @saas-ui/stepper@1.0.0-rc.5
24
+
25
+ ## 1.0.0-rc.10
26
+
27
+ ### Patch Changes
28
+
29
+ - bd3438d: FormStep now supports an onSubmit handler.
30
+
31
+ ## 1.0.0-rc.9
32
+
33
+ ### Patch Changes
34
+
35
+ - 43dff99: Option labels are now optional.
36
+ - d4afda3: ArrayFieldRowFields now accepts all FormLayout props (#48).
37
+ - 43dff99: Field is now correctly typed based on the field type.
38
+ - 38f7171: #50 - Fixed StepForm render prop types.
39
+ - Updated dependencies [870db1f]
40
+ - @saas-ui/button@1.0.0-rc.4
41
+ - @saas-ui/input-right-button@1.0.0-rc.4
42
+ - @saas-ui/password-input@1.0.0-rc.4
43
+
44
+ ## 1.0.0-rc.8
45
+
46
+ ### Patch Changes
47
+
48
+ - dc6376f: Updated all readme files, added better descriptions and links to docs and source code.
49
+ - 68f5d3b: Removed isPrimary and isSecondary Button properties, use colorScheme="primary" instead.
50
+ - Updated dependencies [dc6376f]
51
+ - Updated dependencies [68f5d3b]
52
+ - @saas-ui/button@1.0.0-rc.3
53
+ - @saas-ui/input-right-button@1.0.0-rc.3
54
+ - @saas-ui/number-input@1.0.0-rc.3
55
+ - @saas-ui/password-input@1.0.0-rc.3
56
+ - @saas-ui/pin-input@1.0.0-rc.4
57
+ - @saas-ui/radio@1.0.0-rc.3
58
+ - @saas-ui/react-utils@1.0.0-rc.3
59
+ - @saas-ui/select@1.0.0-rc.3
60
+ - @saas-ui/stepper@1.0.0-rc.4
61
+
62
+ ## 1.0.0-rc.7
63
+
64
+ ### Patch Changes
65
+
66
+ - Fix vertical orientation for FormStepper.
67
+
68
+ ## 1.0.0-rc.6
69
+
70
+ ### Patch Changes
71
+
72
+ - Add exports entry for ajv
73
+
74
+ ## 1.0.0-rc.5
75
+
76
+ ### Patch Changes
77
+
78
+ - fca06e4: Added Json Schema (ajv) support for AutoForm.
79
+
80
+ ## 1.0.0-rc.4
81
+
82
+ ### Patch Changes
83
+
84
+ - Updated dependencies [9e9c601]
85
+ - @saas-ui/stepper@1.0.0-rc.3
86
+
87
+ ## 1.0.0-rc.3
88
+
89
+ ### Minor Changes
90
+
91
+ - 532a7d4: Updated to Chakra UI 2.2.1
92
+ - 7a16ef7: Updated to Chakra UI 2.2.1
93
+
94
+ ### Patch Changes
95
+
96
+ - 6133901: No longer passing down label to input fields.
97
+ - ddec417: ArrayField no longer passing down items to the container element.
98
+ - 5f80cea: AutoForm now renders children.
99
+ - 532a7d4: Fixed all theme onconsistencies.
100
+ - 1c247cb: InputField now has type="text" by default.
101
+ - d1fb472: Select now renders a hidden input with the current value.
102
+ - Updated dependencies [c8621b8]
103
+ - Updated dependencies [532a7d4]
104
+ - Updated dependencies [7a16ef7]
105
+ - Updated dependencies [532a7d4]
106
+ - @saas-ui/select@1.0.0-rc.2
107
+ - @saas-ui/button@1.0.0-rc.2
108
+ - @saas-ui/input-right-button@1.0.0-rc.2
109
+ - @saas-ui/number-input@1.0.0-rc.2
110
+ - @saas-ui/password-input@1.0.0-rc.2
111
+ - @saas-ui/pin-input@1.0.0-rc.3
112
+ - @saas-ui/radio@1.0.0-rc.2
113
+ - @saas-ui/react-utils@1.0.0-rc.2
114
+ - @saas-ui/stepper@1.0.0-rc.2
115
+
116
+ ## 1.0.0-rc.2
117
+
118
+ ### Patch Changes
119
+
120
+ - Re-publish.
121
+ - Updated dependencies
122
+ - @saas-ui/button@1.0.0-rc.1
123
+ - @saas-ui/input-right-button@1.0.0-rc.1
124
+ - @saas-ui/number-input@1.0.0-rc.1
125
+ - @saas-ui/password-input@1.0.0-rc.1
126
+ - @saas-ui/pin-input@1.0.0-rc.2
127
+ - @saas-ui/radio@1.0.0-rc.1
128
+ - @saas-ui/react-utils@1.0.0-rc.1
129
+ - @saas-ui/select@1.0.0-rc.1
130
+ - @saas-ui/stepper@1.0.0-rc.1
131
+
3
132
  ## 1.0.0-rc.1
4
133
 
5
134
  ### Patch Changes
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"}