@ahmadmubarak98/namozaj 1.1.16 → 1.1.18

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 (2) hide show
  1. package/README.md +72 -1
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,3 +1,8 @@
1
+ [![@ahmadmubarak98/use-fetch](https://i.imgur.com/sgbyMJD.png)](https://github.com/ahmadmubarak98/use-fetch)
2
+
3
+ [!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/ahmadmubarak98)
4
+
5
+
1
6
  # @ahmadmubarak98/namozaj
2
7
 
3
8
  `@ahmadmubarak/namozaj` is a dynamic form component for React that allows you to create flexible and customizable forms with ease using JSON only.
@@ -16,8 +21,74 @@ or
16
21
  yarn add @ahmadmubarak98/namozaj
17
22
  ```
18
23
 
24
+ Make sure you also install the required peer dependencies:
25
+
26
+ ```
27
+ npm install @mui/material @emotion/react @emotion/styled
28
+ ```
29
+
30
+ ## Documentation
31
+ Soon
32
+
33
+ ## Fields
34
+ - text
35
+ - phone
36
+ - number
37
+ - slider
38
+ - select
39
+ - checkbox
40
+ - checkbox-group
41
+ - radio-group
42
+ - switch
43
+ - date
44
+ - time
45
+ - datetime
46
+ - file
47
+ - field-array
48
+ - repeater
49
+
50
+
51
+ ## Usage
52
+
53
+ ```javascript
54
+ import { Namozaj } from '@ahmadmubarak98/namozaj';
55
+
56
+ <Namozaj
57
+ fields={[
58
+ {
59
+ name: 'name',
60
+ type: 'text',
61
+ meta: {
62
+ label: 'Name',
63
+ grid: { xs: 12, sm: 6 },
64
+ validations: [
65
+ {
66
+ type: 'required',
67
+ errorMessage: 'Name is required',
68
+ }
69
+ ],
70
+ },
71
+ }
72
+ ]}
73
+ onSubmit={(data) => {
74
+ console.log('Form submitted with data:', data);
75
+ }}
76
+ />
77
+ ```
78
+
79
+ ## References
80
+
81
+ The following libraries are utilized in the creation this library.
82
+
83
+ [MUI](https://mui.com/)
84
+
85
+ [React Hook Form](https://react-hook-form.com/).
86
+
87
+ [react-international-phone](https://www.npmjs.com/package/react-international-phone).
88
+
89
+
19
90
  ## License
20
- This project is licensed under the MIT License.
91
+ This project is licensed under the MIT License. [![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)
21
92
 
22
93
  ## Attribution
23
94
  When using @ahmadmubarak98/namozaj in your project, please make sure to give credit to the author by mentioning @ahmadmubarak98 in your documentation or project credits.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ahmadmubarak98/namozaj",
3
3
  "private": false,
4
- "version": "1.1.16",
4
+ "version": "1.1.18",
5
5
  "type": "module",
6
6
  "main": "dist/namozaj.js",
7
7
  "types": "dist/main.d.ts",
@@ -84,7 +84,7 @@
84
84
  "url": "git+https://github.com/ahmadmubarak98/namozaj.git"
85
85
  },
86
86
  "author": "Ahmad Mubarak (ahmadmubarak98)",
87
- "license": "ISC",
87
+ "license": "MIT",
88
88
  "bugs": {
89
89
  "url": "https://github.com/ahmadmubarak98/namozaj/issues"
90
90
  },