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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. package/CHANGELOG.md +107 -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 +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/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/use-step-form.d.ts +7 -3
  28. package/dist/use-step-form.d.ts.map +1 -1
  29. package/dist/zod/index.js +1 -1
  30. package/dist/zod/index.js.map +1 -1
  31. package/dist/zod/index.modern.mjs +1 -1
  32. package/dist/zod/index.modern.mjs.map +1 -1
  33. package/package.json +32 -17
  34. package/src/array-field.tsx +21 -22
  35. package/src/auto-form.tsx +22 -3
  36. package/src/field-resolver.ts +2 -2
  37. package/src/field.tsx +186 -71
  38. package/src/form.tsx +0 -1
  39. package/src/object-field.tsx +3 -3
  40. package/src/step-form.tsx +23 -17
  41. package/src/submit-button.tsx +1 -1
  42. package/src/use-step-form.tsx +27 -12
  43. package/yup/package.json +2 -2
  44. package/zod/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,112 @@
1
1
  # @saas-ui/forms
2
2
 
3
+ ## 1.0.0-rc.10
4
+
5
+ ### Patch Changes
6
+
7
+ - bd3438d: FormStep now supports an onSubmit handler.
8
+
9
+ ## 1.0.0-rc.9
10
+
11
+ ### Patch Changes
12
+
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
21
+
22
+ ## 1.0.0-rc.8
23
+
24
+ ### Patch Changes
25
+
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
39
+
40
+ ## 1.0.0-rc.7
41
+
42
+ ### Patch Changes
43
+
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.
99
+ - Updated dependencies
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
+
3
110
  ## 1.0.0-rc.1
4
111
 
5
112
  ### 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"}