react-form-dto 0.0.2 → 0.0.3

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 CHANGED
@@ -86,13 +86,13 @@ The form in the image above is generated from this DTO.
86
86
  const profileForm: FormDTO = {
87
87
  title: "User Profile",
88
88
  description: "Fill out your personal information",
89
- layout: { columns: 12, gap: "1rem" }, // global form layout
89
+ layout: { cols: 12, gap: "1rem" }, // global form layout
90
90
  sections: [
91
91
  {
92
92
  id: "personal",
93
93
  heading: "Personal Information",
94
94
  description: "Basic details about you",
95
- layout: { columns: 12, gap: "1rem" }, // section layout
95
+ layout: { cols: 12, gap: "1rem" }, // section layout
96
96
  fields: [
97
97
  {
98
98
  id: "title",
@@ -152,7 +152,7 @@ const profileForm: FormDTO = {
152
152
  {
153
153
  id: "contact",
154
154
  heading: "Contact Information",
155
- layout: { columns: 12 },
155
+ layout: { cols: 12 },
156
156
  fields: [
157
157
  {
158
158
  id: "email",
@@ -1,5 +1,5 @@
1
1
  export type LayoutDTO = {
2
- columns?: number;
2
+ cols?: number;
3
3
  gap?: string;
4
4
  direction?: "row" | "column";
5
5
  align?: "start" | "center" | "end" | "stretch";
@@ -16,10 +16,7 @@ export type FieldDTO = {
16
16
  rows?: number;
17
17
  disabled?: boolean;
18
18
  defaultValue?: any;
19
- layout?: {
20
- col?: number;
21
- direction?: "row" | "column";
22
- };
19
+ layout?: LayoutDTO;
23
20
  validations?: Validations;
24
21
  };
25
22
  export type SectionDTO = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-form-dto",
3
3
  "description": "A React library for building forms using DTOs with MUI and TypeScript.",
4
- "version": "0.0.2",
4
+ "version": "0.0.3",
5
5
  "main": "dist/react-form-dto.umd.js",
6
6
  "module": "dist/react-form-dto.es.js",
7
7
  "types": "dist/index.d.ts",
@@ -18,21 +18,21 @@
18
18
  "docs:preview": "vitepress preview docs"
19
19
  },
20
20
  "peerDependencies": {
21
+ "@mui/material": ">=7",
21
22
  "react": ">=17",
22
- "react-dom": ">=17",
23
- "@mui/material": ">=7"
23
+ "react-dom": ">=17"
24
24
  },
25
25
  "devDependencies": {
26
+ "@types/node": "^24.10.1",
27
+ "@types/react": "^19.2.7",
28
+ "@types/react-dom": "^19.2.3",
26
29
  "@vitejs/plugin-react": "^5.1.1",
27
- "vite": "^7.2.4",
28
- "vite-plugin-dts": "^4.5.4",
29
- "typescript": "~5.9.3",
30
- "vitepress": "^1.6.4",
31
30
  "eslint": "^9.39.1",
31
+ "typescript": "~5.9.3",
32
32
  "typescript-eslint": "^8.46.4",
33
- "@types/react": "^19.2.5",
34
- "@types/react-dom": "^19.2.3",
35
- "@types/node": "^24.10.1"
33
+ "vite": "^7.2.4",
34
+ "vite-plugin-dts": "^4.5.4",
35
+ "vitepress": "^1.6.4"
36
36
  },
37
37
  "repository": {
38
38
  "type": "git",