@kbgarcia8/react-dynamic-form 1.0.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/LICENSE +21 -0
- package/README.md +2 -0
- package/dist/components/atoms/Button/Button.d.ts +4 -0
- package/dist/components/atoms/Button/Button.d.ts.map +1 -0
- package/dist/components/atoms/Button/Button.styles.d.ts +5 -0
- package/dist/components/atoms/Button/Button.styles.d.ts.map +1 -0
- package/dist/components/atoms/Button/index.d.ts +3 -0
- package/dist/components/atoms/Button/index.d.ts.map +1 -0
- package/dist/components/atoms/Input/Input.d.ts +5 -0
- package/dist/components/atoms/Input/Input.d.ts.map +1 -0
- package/dist/components/atoms/Input/Inputs.styles.d.ts +3 -0
- package/dist/components/atoms/Input/Inputs.styles.d.ts.map +1 -0
- package/dist/components/atoms/Input/index.d.ts +3 -0
- package/dist/components/atoms/Input/index.d.ts.map +1 -0
- package/dist/components/atoms/Label/Label.d.ts +5 -0
- package/dist/components/atoms/Label/Label.d.ts.map +1 -0
- package/dist/components/atoms/Label/Label.styles.d.ts +6 -0
- package/dist/components/atoms/Label/Label.styles.d.ts.map +1 -0
- package/dist/components/atoms/Label/index.d.ts +3 -0
- package/dist/components/atoms/Label/index.d.ts.map +1 -0
- package/dist/components/molecules/FormActionButtons/FormActionButtons.d.ts +4 -0
- package/dist/components/molecules/FormActionButtons/FormActionButtons.d.ts.map +1 -0
- package/dist/components/molecules/FormActionButtons/FormActionButtons.styles.d.ts +2 -0
- package/dist/components/molecules/FormActionButtons/FormActionButtons.styles.d.ts.map +1 -0
- package/dist/components/molecules/FormActionButtons/index.d.ts +3 -0
- package/dist/components/molecules/FormActionButtons/index.d.ts.map +1 -0
- package/dist/components/molecules/LabeledInput/LabeledInput.d.ts +5 -0
- package/dist/components/molecules/LabeledInput/LabeledInput.d.ts.map +1 -0
- package/dist/components/molecules/LabeledInput/LabeledInput.styles.d.ts +3 -0
- package/dist/components/molecules/LabeledInput/LabeledInput.styles.d.ts.map +1 -0
- package/dist/components/molecules/LabeledInput/index.d.ts +3 -0
- package/dist/components/molecules/LabeledInput/index.d.ts.map +1 -0
- package/dist/components/molecules/NestedEditableOption/NestedEditableOption.d.ts +4 -0
- package/dist/components/molecules/NestedEditableOption/NestedEditableOption.d.ts.map +1 -0
- package/dist/components/molecules/NestedEditableOption/NestedEditableOption.styles.d.ts +5 -0
- package/dist/components/molecules/NestedEditableOption/NestedEditableOption.styles.d.ts.map +1 -0
- package/dist/components/molecules/NestedEditableOption/index.d.ts +3 -0
- package/dist/components/molecules/NestedEditableOption/index.d.ts.map +1 -0
- package/dist/components/organisms/DynamicForm/DynamicForm.d.ts +5 -0
- package/dist/components/organisms/DynamicForm/DynamicForm.d.ts.map +1 -0
- package/dist/components/organisms/DynamicForm/DynamicForm.styles.d.ts +8 -0
- package/dist/components/organisms/DynamicForm/DynamicForm.styles.d.ts.map +1 -0
- package/dist/components/organisms/DynamicForm/index.d.ts +3 -0
- package/dist/components/organisms/DynamicForm/index.d.ts.map +1 -0
- package/dist/context/ThemeContext.d.ts +4 -0
- package/dist/context/ThemeContext.d.ts.map +1 -0
- package/dist/context/ThemeContextWrapper.d.ts +3 -0
- package/dist/context/ThemeContextWrapper.d.ts.map +1 -0
- package/dist/hooks/useTheme.d.ts +3 -0
- package/dist/hooks/useTheme.d.ts.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/react-dynamic-form.cjs.js +171 -0
- package/dist/react-dynamic-form.es.js +654 -0
- package/dist/styles/theme.d.ts +5 -0
- package/dist/styles/theme.d.ts.map +1 -0
- package/dist/styles/variables.d.ts +3 -0
- package/dist/styles/variables.d.ts.map +1 -0
- package/dist/type/constantTypes.d.ts +30 -0
- package/dist/type/constantTypes.d.ts.map +1 -0
- package/dist/type/propTypes.d.ts +144 -0
- package/dist/type/propTypes.d.ts.map +1 -0
- package/dist/utils/utils.d.ts +6 -0
- package/dist/utils/utils.d.ts.map +1 -0
- package/package.json +57 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import type { Theme } from './constantTypes';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
export interface themeContextValue {
|
|
4
|
+
currentTheme: Theme;
|
|
5
|
+
toggleTheme: () => void;
|
|
6
|
+
}
|
|
7
|
+
export type ChildrenProp = {
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
};
|
|
10
|
+
type stringType = string | undefined;
|
|
11
|
+
type dataAttributesType = Record<string, string | number | boolean> | undefined;
|
|
12
|
+
type ButtonType = 'button' | 'submit';
|
|
13
|
+
export interface ButtonProps {
|
|
14
|
+
onClick: React.MouseEventHandler<HTMLButtonElement>;
|
|
15
|
+
id: string;
|
|
16
|
+
buttonType: ButtonType;
|
|
17
|
+
source?: string;
|
|
18
|
+
svg?: React.ReactNode;
|
|
19
|
+
alt?: string;
|
|
20
|
+
text?: string;
|
|
21
|
+
className?: stringType;
|
|
22
|
+
pattern?: string | number | undefined;
|
|
23
|
+
dataAttributes?: dataAttributesType;
|
|
24
|
+
}
|
|
25
|
+
declare const InputTypes: readonly ["text", "password", "email", "number", "tel", "url", "search", "date", "file", "hidden"];
|
|
26
|
+
interface BaseInput {
|
|
27
|
+
id: string;
|
|
28
|
+
onChange: React.ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
|
29
|
+
isRequired: boolean;
|
|
30
|
+
dataAttributes?: dataAttributesType;
|
|
31
|
+
disabled?: boolean | undefined;
|
|
32
|
+
className?: stringType;
|
|
33
|
+
name: string;
|
|
34
|
+
}
|
|
35
|
+
export interface TextAreaInput extends BaseInput {
|
|
36
|
+
type: 'textarea';
|
|
37
|
+
value: string;
|
|
38
|
+
rows: number;
|
|
39
|
+
cols: number;
|
|
40
|
+
}
|
|
41
|
+
export interface CheckedInput extends BaseInput {
|
|
42
|
+
type: 'radio' | 'checkbox';
|
|
43
|
+
checked: boolean;
|
|
44
|
+
placeholderText?: never;
|
|
45
|
+
}
|
|
46
|
+
export interface GeneralInput extends BaseInput {
|
|
47
|
+
type: Exclude<typeof InputTypes[number], 'textarea' | 'radio' | 'checkbox'>;
|
|
48
|
+
value: string;
|
|
49
|
+
pattern?: stringType;
|
|
50
|
+
placeholderText?: stringType;
|
|
51
|
+
checked?: never;
|
|
52
|
+
rows?: never;
|
|
53
|
+
cols?: never;
|
|
54
|
+
}
|
|
55
|
+
export type InputProps = GeneralInput | TextAreaInput | CheckedInput;
|
|
56
|
+
export interface LabelProps {
|
|
57
|
+
htmlFor?: string;
|
|
58
|
+
textLabel: string;
|
|
59
|
+
additionalInfo: string;
|
|
60
|
+
$labelFlexDirection?: React.CSSProperties['flexDirection'];
|
|
61
|
+
source?: string;
|
|
62
|
+
svg?: React.ReactNode;
|
|
63
|
+
className?: stringType;
|
|
64
|
+
}
|
|
65
|
+
export type EditableInputProps = {
|
|
66
|
+
labelClass?: string | undefined;
|
|
67
|
+
inputClass?: string | undefined;
|
|
68
|
+
isEditable?: boolean;
|
|
69
|
+
editIcon?: React.ReactNode;
|
|
70
|
+
onClickEdit: React.MouseEventHandler<HTMLButtonElement>;
|
|
71
|
+
deleteIcon?: React.ReactNode;
|
|
72
|
+
onClickDelete: React.MouseEventHandler<HTMLButtonElement>;
|
|
73
|
+
idx?: number;
|
|
74
|
+
ref: React.Ref<HTMLInputElement | HTMLTextAreaElement>;
|
|
75
|
+
};
|
|
76
|
+
export type LabeledInputProps = (LabelProps & TextAreaInput & EditableInputProps) | (LabelProps & CheckedInput & EditableInputProps) | (LabelProps & GeneralInput & EditableInputProps);
|
|
77
|
+
export interface FormActionButtonsProps {
|
|
78
|
+
id: string;
|
|
79
|
+
hasSubmit: boolean;
|
|
80
|
+
submitText: string;
|
|
81
|
+
handleSubmit: React.MouseEventHandler<HTMLButtonElement>;
|
|
82
|
+
hasEdit: boolean;
|
|
83
|
+
editText: string;
|
|
84
|
+
handleEdit: React.MouseEventHandler<HTMLButtonElement>;
|
|
85
|
+
hasCancel: boolean;
|
|
86
|
+
cancelText: string;
|
|
87
|
+
handleCancel: React.MouseEventHandler<HTMLButtonElement>;
|
|
88
|
+
hasDelete: boolean;
|
|
89
|
+
deleteText: string;
|
|
90
|
+
handleDelete: React.MouseEventHandler<HTMLButtonElement>;
|
|
91
|
+
}
|
|
92
|
+
interface EditableInformation {
|
|
93
|
+
name: string;
|
|
94
|
+
info: string;
|
|
95
|
+
type: typeof InputTypes[number];
|
|
96
|
+
}
|
|
97
|
+
export interface NestedEditableOptionProps {
|
|
98
|
+
legend: string;
|
|
99
|
+
idx: number;
|
|
100
|
+
editableInformation: EditableInformation[];
|
|
101
|
+
onChangeOfEditableOption: React.ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
|
102
|
+
onClickSaveEdit: React.MouseEventHandler<HTMLButtonElement>;
|
|
103
|
+
onClickCancelEdit: React.MouseEventHandler<HTMLButtonElement>;
|
|
104
|
+
onClickDeleteEntry: React.MouseEventHandler<HTMLButtonElement>;
|
|
105
|
+
}
|
|
106
|
+
export type inputEntryShape<T extends boolean> = LabeledInputProps & {
|
|
107
|
+
uniqueClass?: string;
|
|
108
|
+
editing: boolean;
|
|
109
|
+
editable: T;
|
|
110
|
+
editableInformation: EditableInformation[];
|
|
111
|
+
} & (T extends true ? {
|
|
112
|
+
onClickEdit: React.MouseEventHandler<HTMLButtonElement>;
|
|
113
|
+
editIcon: React.ReactNode;
|
|
114
|
+
onClickDelete: React.MouseEventHandler<HTMLButtonElement>;
|
|
115
|
+
deleteIcon: React.ReactNode;
|
|
116
|
+
onClickSave: React.MouseEventHandler<HTMLButtonElement>;
|
|
117
|
+
onClickCancel: React.MouseEventHandler<HTMLButtonElement>;
|
|
118
|
+
} : {
|
|
119
|
+
onClickEdit?: never;
|
|
120
|
+
editIcon?: never;
|
|
121
|
+
onClickDelete?: never;
|
|
122
|
+
deleteIcon?: never;
|
|
123
|
+
onClickSave?: never;
|
|
124
|
+
onClickCancel?: never;
|
|
125
|
+
});
|
|
126
|
+
interface FieldsetShape {
|
|
127
|
+
legend: string;
|
|
128
|
+
inputs: inputEntryShape<boolean>[];
|
|
129
|
+
height: string;
|
|
130
|
+
expandable: boolean;
|
|
131
|
+
}
|
|
132
|
+
export type DynamicFormProps = FormActionButtonsProps & LabeledInputProps & {
|
|
133
|
+
fieldsets: FieldsetShape[] | null;
|
|
134
|
+
id: string;
|
|
135
|
+
formInputs: inputEntryShape<boolean>[];
|
|
136
|
+
legendText?: string;
|
|
137
|
+
isExpandable: boolean;
|
|
138
|
+
labelAndInputContainerClass: string;
|
|
139
|
+
handleSubmitForm: React.FormEventHandler<HTMLFormElement>;
|
|
140
|
+
handleEditableInputEntryChange: React.ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
|
141
|
+
handleAddingInputEntry: React.MouseEventHandler<HTMLButtonElement>;
|
|
142
|
+
};
|
|
143
|
+
export {};
|
|
144
|
+
//# sourceMappingURL=propTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"propTypes.d.ts","sourceRoot":"","sources":["../../src/type/propTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,KAAK,CAAC;IACpB,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,KAAK,UAAU,GAAG,MAAM,GAAG,SAAS,CAAC;AAErC,KAAK,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAC,MAAM,GAAC,OAAO,CAAC,GAAG,SAAS,CAAA;AAE3E,KAAK,UAAU,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEtC,MAAM,WAAW,WAAW;IACxB,OAAO,EAAE,KAAK,CAAC,iBAAiB,CAAC,i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B,EAAE,KAAK,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;IAC1D,8BAA8B,EAAE,KAAK,CAAC,kBAAkB,CAAC,gBAAgB,GAAG,mBAAmB,CAAC,CAAC;IACjG,sBAAsB,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;CACtE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAGxD,eAAO,MAAM,OAAO,GAAI,OAAO,MAAM,KAAG,OAIvC,CAAC;AAGF,eAAO,MAAM,OAAO,GAAI,OAAO,MAAM,KAAG,WAGvC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kbgarcia8/react-dynamic-form",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A form that can be nested with editable, expandable and flexible input-forms",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"form",
|
|
7
|
+
"dynamic",
|
|
8
|
+
"nested",
|
|
9
|
+
"editable",
|
|
10
|
+
"expandable"
|
|
11
|
+
],
|
|
12
|
+
"homepage": "https://github.com/kbgarcia8/react-dynamic-form#readme",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/kbgarcia8/react-dynamic-form/issues"
|
|
15
|
+
},
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/kbgarcia8/react-dynamic-form.git"
|
|
19
|
+
},
|
|
20
|
+
"license": "ISC",
|
|
21
|
+
"author": "kbgarcia8",
|
|
22
|
+
"main": "./dist/react-dynamic-form.cjs.js",
|
|
23
|
+
"module": "./dist/react-dynamic-form.es.js",
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"sideEffects": false,
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"import": "./dist/react-dynamic-form.es.js",
|
|
30
|
+
"require": "./dist/react-dynamic-form.cjs.js"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"dist"
|
|
35
|
+
],
|
|
36
|
+
"scripts": {
|
|
37
|
+
"dev": "vite",
|
|
38
|
+
"clear": "rm -rf dist",
|
|
39
|
+
"tscompile": "pnpm run clear && tsc",
|
|
40
|
+
"build": "pnpm run clear && vite build && tsc --emitDeclarationOnly",
|
|
41
|
+
"preview": "vite preview"
|
|
42
|
+
},
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"react": ">=17.0.0",
|
|
45
|
+
"react-dom": ">=17.0.0",
|
|
46
|
+
"styled-components": ">=6"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@types/node": "^24.10.1",
|
|
50
|
+
"@types/react": "^19.2.7",
|
|
51
|
+
"@types/react-dom": "^19.2.3",
|
|
52
|
+
"@vitejs/plugin-react": "^5.1.1",
|
|
53
|
+
"styled-components": "^6.1.19",
|
|
54
|
+
"typescript": "^5.9.3",
|
|
55
|
+
"vite": "^7.2.4"
|
|
56
|
+
}
|
|
57
|
+
}
|