shadcn-zod-formkit 1.0.5 → 1.2.0
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.
- package/README.md +23 -9
- package/dist/index.cjs +114 -279
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +3 -16
- package/dist/index.d.ts +3 -16
- package/dist/index.mjs +88 -253
- package/dist/index.mjs.map +1 -1
- package/dist/shadcn-zod-formkit-1.2.0.tgz +0 -0
- package/package.json +11 -1
package/README.md
CHANGED
|
@@ -44,6 +44,8 @@ import {
|
|
|
44
44
|
TextInputType
|
|
45
45
|
} from "shadcn-zod-formkit";
|
|
46
46
|
|
|
47
|
+
import { Mail, User } from 'lucide-react';
|
|
48
|
+
|
|
47
49
|
export default function Home() {
|
|
48
50
|
// Record From DB example (User),
|
|
49
51
|
// record is used for define default values
|
|
@@ -69,14 +71,26 @@ export default function Home() {
|
|
|
69
71
|
const mockFields: Array<FieldProps |FieldProps[]> = [
|
|
70
72
|
{
|
|
71
73
|
name: "username",
|
|
72
|
-
label: "
|
|
73
|
-
inputType: InputTypes.
|
|
74
|
-
|
|
74
|
+
label: "Username",
|
|
75
|
+
inputType: InputTypes.TEXT_GROUP,
|
|
76
|
+
inputGroupConfig:{
|
|
77
|
+
autoValidIcons: true,
|
|
78
|
+
iconsLeft: [User]
|
|
79
|
+
},
|
|
80
|
+
zodType: z.string().min(3).max(20),
|
|
75
81
|
},
|
|
76
82
|
{
|
|
77
83
|
name: "email",
|
|
78
|
-
label: "
|
|
79
|
-
inputType: InputTypes.
|
|
84
|
+
label: "Email",
|
|
85
|
+
inputType: InputTypes.TEXT_GROUP,
|
|
86
|
+
inputGroupConfig:{
|
|
87
|
+
autoValidIcons: true,
|
|
88
|
+
iconsLeft: [Mail],
|
|
89
|
+
},
|
|
90
|
+
zodType: z
|
|
91
|
+
.string()
|
|
92
|
+
.email("Invalid Email")
|
|
93
|
+
.optional(),
|
|
80
94
|
},
|
|
81
95
|
]
|
|
82
96
|
```
|
|
@@ -117,8 +131,8 @@ const mockFields: Array<FieldProps |FieldProps[]> = [
|
|
|
117
131
|
- Combine multiple FieldProps in arrays for grouped fields (like age + color).
|
|
118
132
|
|
|
119
133
|
## 🧠 Acknowledgements
|
|
120
|
-
React - A JavaScript library for building user interfaces.
|
|
121
|
-
Next.js - The React framework for production.
|
|
122
|
-
Tailwind CSS - A utility-first CSS framework for creating custom designs.
|
|
123
|
-
Zod - TypeScript-first schema declaration and validation.
|
|
134
|
+
- React - A JavaScript library for building user interfaces.
|
|
135
|
+
- Next.js - The React framework for production.
|
|
136
|
+
- Tailwind CSS - A utility-first CSS framework for creating custom designs.
|
|
137
|
+
- Zod - TypeScript-first schema declaration and validation.
|
|
124
138
|
|