@kbgarcia8/react-dynamic-form 1.0.6 → 1.0.8
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/dist/components/organisms/DynamicForm/DynamicForm.d.ts +1 -1
- package/dist/components/organisms/DynamicForm/DynamicForm.d.ts.map +1 -1
- package/dist/react-dynamic-form.cjs.js +48 -48
- package/dist/react-dynamic-form.es.js +110 -110
- package/dist/type/propTypes.d.ts +17 -15
- package/dist/type/propTypes.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { DynamicFormProps } from "../../../type/propTypes";
|
|
3
|
-
declare const DynamicForm: ({ fieldsets, legendText, isExpandable, id, formInputs, labelAndInputContainerClass, labelClass, inputClass, handleEditableInputEntryChange, handleAddingInputEntry, hasSubmit, hasCancel, hasDelete, hasEdit, submitText, handleSubmitForm, handleSubmit, cancelText, handleCancel, deleteText, handleDelete, editText, handleEdit, className, children }: React.PropsWithChildren<DynamicFormProps
|
|
3
|
+
declare const DynamicForm: ({ fieldsets, legendText, isExpandable, id, formInputs, labelAndInputContainerClass, labelClass, inputClass, handleEditableInputEntryChange, handleAddingInputEntry, hasSubmit, hasCancel, hasDelete, hasEdit, submitText, handleSubmitForm, handleSubmit, cancelText, handleCancel, deleteText, handleDelete, editText, handleEdit, className, children }: React.PropsWithChildren<DynamicFormProps>) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default DynamicForm;
|
|
5
5
|
//# sourceMappingURL=DynamicForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DynamicForm.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/DynamicForm/DynamicForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAgB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"DynamicForm.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/DynamicForm/DynamicForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAgB,gBAAgB,EAA+D,MAAM,yBAAyB,CAAC;AAE3I,QAAA,MAAM,WAAW,GAAI,2VA0BnB,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,4CAmJ1C,CAAA;AAGD,eAAe,WAAW,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),v=require("react"),c=require("styled-components"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),v=require("react"),c=require("styled-components"),n={fonts:{secondary:"Raleway",tertiary:"Lato",fallback:"system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif"},fontWeight:{light:300,medium:500,bold:700,bolder:900},fontSize:{xsmall:"0.75rem"},spacing:{xxxsmall:"0.25rem",xxsmall:"0.375rem",xsmall:"0.5rem",small:"0.75rem",medium:"1.25rem"},borderRadius:{xsmall:"0.125rem",small:"0.25rem",xlarge:"2rem"},borderThickness:{thin:"0.0625rem",light:"0.125rem"}},V=c.button`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
5
|
-
background-color: ${({theme:
|
|
6
|
-
color: ${({theme:
|
|
7
|
-
border: ${
|
|
8
|
-
border-radius: ${
|
|
9
|
-
padding: ${
|
|
5
|
+
background-color: ${({theme:t})=>t.colors.blue||"blue"};
|
|
6
|
+
color: ${({theme:t})=>t.colors.bg||"white"};
|
|
7
|
+
border: ${n.borderThickness.light} solid ${({theme:t})=>t.colors.text||"black"};
|
|
8
|
+
border-radius: ${n.borderRadius.xlarge};
|
|
9
|
+
padding: ${n.spacing.xxxsmall} ${n.spacing.small};
|
|
10
10
|
margin: 0.125rem;
|
|
11
11
|
width: auto;
|
|
12
12
|
cursor: pointer;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
&:hover {
|
|
16
16
|
background-color: lightblue;
|
|
17
|
-
border: ${
|
|
17
|
+
border: ${n.borderThickness.light} solid gray;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
& .button-icon-text-space {
|
|
@@ -33,21 +33,21 @@
|
|
|
33
33
|
`,Y=c.img`
|
|
34
34
|
maxwidth: 100%;
|
|
35
35
|
`,Z=c.span`
|
|
36
|
-
font-size: ${
|
|
37
|
-
font-weight: ${
|
|
38
|
-
font-family: ${
|
|
36
|
+
font-size: ${n.fontSize.xsmall};
|
|
37
|
+
font-weight: ${n.fontWeight.medium};
|
|
38
|
+
font-family: ${n.fonts.tertiary}, ${n.fonts.fallback};
|
|
39
39
|
display: flex;
|
|
40
40
|
align-items: center;
|
|
41
41
|
justify-content: center;
|
|
42
|
-
`,g=({onClick:
|
|
42
|
+
`,g=({onClick:t,id:o,buttonType:i,source:s,svg:r,alt:d="alt-button-icon",text:m="",className:l="",dataAttributes:b={}})=>e.jsx(V,{onClick:t,id:o,type:i,className:l,...b,children:e.jsxs(X,{className:"button-icon-text-space",children:[s?e.jsx(Y,{src:s,alt:d}):r||"",m&&e.jsx(Z,{id:o,children:m})]})}),_=c.div`
|
|
43
43
|
display: flex;
|
|
44
44
|
flex-direction: column;
|
|
45
45
|
align-items: left;
|
|
46
46
|
width: 100%;
|
|
47
|
-
margin-bottom: ${
|
|
47
|
+
margin-bottom: ${n.spacing.small};
|
|
48
48
|
`,I=c.div`
|
|
49
49
|
display: flex;
|
|
50
|
-
gap: ${
|
|
50
|
+
gap: ${n.spacing.xsmall};
|
|
51
51
|
width: auto;
|
|
52
52
|
height: auto;
|
|
53
53
|
`,ee=c.label`
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
align-items: center;
|
|
56
56
|
justify-content:center;
|
|
57
57
|
height: auto;
|
|
58
|
-
flex-direction: ${
|
|
59
|
-
font-family: ${
|
|
60
|
-
font-size: ${
|
|
61
|
-
font-weight: ${
|
|
62
|
-
gap: ${
|
|
58
|
+
flex-direction: ${t=>t.$labelFlexDirection||"column"};
|
|
59
|
+
font-family: ${n.fonts.secondary}, ${n.fonts.fallback};
|
|
60
|
+
font-size: ${n.fontSize.xsmall};
|
|
61
|
+
font-weight: ${n.fontWeight.bold};
|
|
62
|
+
gap: ${n.spacing.xxsmall};
|
|
63
63
|
|
|
64
64
|
& .label-icon-container img,
|
|
65
65
|
& .label-icon-container svg {
|
|
@@ -68,80 +68,80 @@
|
|
|
68
68
|
object-fit: contain;
|
|
69
69
|
}
|
|
70
70
|
`,te=c.span`
|
|
71
|
-
font-weight: ${
|
|
71
|
+
font-weight: ${n.fontWeight.bolder};
|
|
72
72
|
`,ne=c.div`
|
|
73
73
|
max-width: 100%;
|
|
74
74
|
display: flex;
|
|
75
75
|
align-items: center;
|
|
76
76
|
`,ae=c.span`
|
|
77
|
-
font-weight: ${
|
|
78
|
-
`,P=({htmlFor:
|
|
77
|
+
font-weight: ${n.fontWeight.light};
|
|
78
|
+
`,P=({htmlFor:t,textLabel:o,additionalInfo:i,$labelFlexDirection:s,source:r,svg:d,className:m,children:l})=>e.jsxs(ee,{htmlFor:t,className:m,$labelFlexDirection:s,children:[(r||d)&&e.jsx(ne,{className:"label-icon-container",children:r?e.jsx("img",{src:r,alt:`${t}-label-icon`}):d||""}),e.jsx(te,{className:"main-label",children:o}),i&&e.jsx(ae,{className:"additional-info",children:i}),l]}),W=c.input`
|
|
79
79
|
display: flex;
|
|
80
80
|
place-content: center;
|
|
81
|
-
font-family: ${
|
|
82
|
-
font-size: ${
|
|
81
|
+
font-family: ${n.fonts.secondary}, ${n.fonts.fallback};
|
|
82
|
+
font-size: ${n.fontSize.xsmall};
|
|
83
83
|
line-height: 1.75;
|
|
84
|
-
padding: ${
|
|
84
|
+
padding: ${n.spacing.xxxsmall} ${n.spacing.xsmall};
|
|
85
85
|
max-width: 100%;
|
|
86
86
|
height: auto;
|
|
87
87
|
background-color: #FFFFFF;
|
|
88
88
|
outline: none;
|
|
89
|
-
border: ${
|
|
90
|
-
border-radius: ${
|
|
89
|
+
border: ${n.borderThickness.thin} solid #000000;
|
|
90
|
+
border-radius: ${n.borderRadius.xsmall};
|
|
91
91
|
|
|
92
92
|
&:focus{
|
|
93
|
-
border: ${
|
|
93
|
+
border: ${n.borderThickness.thin} solid ${({theme:t})=>t.colors.teal};
|
|
94
94
|
}
|
|
95
95
|
`,oe=c.textarea`
|
|
96
96
|
display: flex;
|
|
97
97
|
place-content: center;
|
|
98
|
-
border: ${
|
|
99
|
-
border-radius: ${
|
|
98
|
+
border: ${n.borderThickness.light} solid ${({theme:t})=>t.colors.text};
|
|
99
|
+
border-radius: ${n.borderRadius.small};
|
|
100
100
|
outline: none;
|
|
101
|
-
line-height: ${
|
|
102
|
-
padding: ${
|
|
103
|
-
font-family: ${
|
|
104
|
-
font-size: ${
|
|
101
|
+
line-height: ${n.spacing.small};
|
|
102
|
+
padding: ${n.spacing.xxxsmall};
|
|
103
|
+
font-family: ${n.fonts.secondary}, ${n.fonts.fallback};
|
|
104
|
+
font-size: ${n.fontSize.xsmall};
|
|
105
105
|
max-width: 100%;
|
|
106
106
|
resize: none;
|
|
107
107
|
overflow-y: auto;
|
|
108
|
-
`,z=v.forwardRef((
|
|
108
|
+
`,z=v.forwardRef((t,o)=>{const{type:i,id:s,onChange:r,isRequired:d,dataAttributes:m,disabled:l,className:b}=t;if(i==="textarea"){const{rows:j=5,cols:N=30,value:T,...A}=t;return e.jsx(oe,{id:s,onChange:r,value:T,rows:j,cols:N,...m,className:b,ref:o,disabled:l,required:d})}if(i==="radio"||i==="checkbox"){const{checked:j,...N}=t;return e.jsx(W,{ref:o,type:"checkbox",id:s,checked:j,onChange:r,disabled:l,className:b,...m})}const u=t,{value:y,pattern:f,placeholderText:p,...C}=u;return e.jsx(W,{id:s,name:s,placeholder:p,onChange:r,value:y,type:i,required:d,...m,className:b,ref:o,disabled:l,pattern:f})}),E=t=>{const{className:o,type:i,id:s,textLabel:r,additionalInfo:d,$labelFlexDirection:m,svg:l,labelClass:b,onChange:u,isRequired:y,dataAttributes:f,inputClass:p,ref:C,disabled:j,isEditable:N,editIcon:T,onClickEdit:A,deleteIcon:R,onClickDelete:B,idx:S,children:q}=t;return e.jsxs(_,{className:`${o} ${s.replace("#","")}-label-input-container`,children:[i!=="radio"&&i!=="checkbox"&&e.jsx(P,{htmlFor:s,textLabel:r,additionalInfo:d,$labelFlexDirection:m,svg:l,className:b}),i!=="radio"&&i!=="checkbox"&&i==="textarea"&&(()=>{const{rows:k=5,cols:w=30,value:D,...a}=t;return e.jsx(z,{id:s,name:s,type:"textarea",isRequired:y,onChange:u,value:D,rows:k,cols:w,...f,className:p,ref:C,disabled:j})})(),i!=="radio"&&i!=="checkbox"&&i!=="textarea"&&(()=>{const k=t,{value:w,pattern:D,placeholderText:a,...$}=k;return e.jsx(z,{id:s,name:s,placeholderText:a,onChange:u,value:w,type:i,isRequired:y,...f,className:p,ref:C,disabled:j,pattern:D})})(),(i==="radio"||i==="checkbox")&&(()=>{const{checked:k,...w}=t;return e.jsxs(e.Fragment,{children:[e.jsx(z,{ref:C,type:"checkbox",name:s,id:s,isRequired:y,checked:k,onChange:u,disabled:j,className:p,...f}),e.jsx(P,{htmlFor:s,textLabel:r,additionalInfo:d,$labelFlexDirection:m,svg:l,className:b})]})})(),N&&e.jsxs(I,{className:"input-edit-buttons",children:[e.jsx(g,{id:`editable-${s}-edit-btn`,svg:T,buttonType:"button",onClick:A,className:`edit-radio-${S}`,dataAttributes:f}),e.jsx(g,{id:`editable-${s}-delete-btn`,svg:R,buttonType:"button",onClick:B,className:`delete-radio-${S}`,dataAttributes:f})]}),q]})},se=c.fieldset`
|
|
109
109
|
padding: 0;
|
|
110
110
|
height: auto;
|
|
111
111
|
width: 100%;
|
|
112
112
|
`,ie=c.legend`
|
|
113
|
-
font-size: ${
|
|
113
|
+
font-size: ${n.spacing.medium};
|
|
114
114
|
font-weight: 500;
|
|
115
|
-
margin: 0 auto ${
|
|
115
|
+
margin: 0 auto ${n.spacing.small} auto;
|
|
116
116
|
text-align: center;
|
|
117
|
-
font-family: ${
|
|
117
|
+
font-family: ${n.fonts.secondary}, ${n.fonts.fallback};
|
|
118
118
|
`,le=c.div`
|
|
119
119
|
display: flex;
|
|
120
120
|
flex-direction: column;
|
|
121
121
|
align-items: flex-start;
|
|
122
122
|
width: 100%;
|
|
123
|
-
margin-bottom: ${
|
|
123
|
+
margin-bottom: ${n.spacing.small};
|
|
124
124
|
`,ce=c.div`
|
|
125
125
|
display: flex;
|
|
126
126
|
justify-content: space-between;
|
|
127
127
|
width: 100%;
|
|
128
|
-
`,M=({legend:
|
|
128
|
+
`,M=({legend:t,idx:o,editableInformation:i,onChangeOfEditableOption:s,onClickSaveEdit:r,onClickCancelEdit:d,onClickDeleteEntry:m})=>e.jsxs(se,{className:"editable-selection-fieldset",children:[e.jsx(ie,{children:`${t} ${o+1}`}),i.map((l,b)=>e.jsx(le,{className:"editable-selection-container",children:e.jsx(z,{id:`editable-selection-${b}`,name:`editable-selection-${b}`,placeholderText:l.name.charAt(0).toUpperCase()+l.name.slice(1),onChange:s,value:l.info,type:l.type,isRequired:!0,className:"editable-selection",dataAttributes:{"data-index":b,"data-key":l.info}})},`${l.name}-${b}`)),e.jsxs(ce,{className:"editable-selection-button-space",children:[e.jsx(g,{id:`editable-selection-${o}-submit`,buttonType:"submit",text:"Save",onClick:r,className:"editable-selection-btn",dataAttributes:{"data-index":o}}),e.jsx(g,{id:`editable-selection-${o}-cancel`,buttonType:"button",text:"Cancel",onClick:d,className:"editable-selection-btn",dataAttributes:{"data-index":o}}),e.jsx(g,{id:`editable-selection-${o}-delete`,buttonType:"button",text:"Delete",onClick:m,className:"editable-selection-btn",dataAttributes:{"data-index":o}})]})]}),re=c.div`
|
|
129
129
|
display: flex;
|
|
130
130
|
justify-content: space-between;
|
|
131
131
|
max-width: 100%;
|
|
132
|
-
`,de=({id:
|
|
133
|
-
font-size: ${
|
|
132
|
+
`,de=({id:t,hasSubmit:o,submitText:i,handleSubmit:s,hasEdit:r,editText:d,handleEdit:m,hasCancel:l,cancelText:b,handleCancel:u,hasDelete:y,deleteText:f,handleDelete:p})=>e.jsxs(re,{className:"form-main-button-container",children:[o&&e.jsx(g,{id:`form-${t}-submit`,buttonType:"submit",text:i??"Submit",onClick:s,className:"submit-form-btn"}),r&&e.jsx(g,{id:`form-${t}-edit`,buttonType:"button",text:d??"Edit",onClick:m,className:"edit-form-btn"}),l&&e.jsx(g,{id:`form-${t}-cancel`,buttonType:"button",text:b??"Cancel",onClick:u,className:"cancel-form-btn"}),y&&e.jsx(g,{id:`form-${t}-delete`,buttonType:"button",text:f??"Delete",onClick:p,className:"delete-form-btn"})]}),U=c.legend`
|
|
133
|
+
font-size: ${n.spacing.medium};
|
|
134
134
|
font-weight: 500;
|
|
135
|
-
margin-bottom: ${
|
|
135
|
+
margin-bottom: ${n.spacing.small};
|
|
136
136
|
width: auto;
|
|
137
137
|
text-align: center;
|
|
138
|
-
font-family: ${
|
|
138
|
+
font-family: ${n.fonts.secondary}, ${n.fonts.fallback};
|
|
139
139
|
`,H=c.fieldset`
|
|
140
140
|
padding: 0;
|
|
141
141
|
height: auto;
|
|
142
142
|
width: 100%;
|
|
143
143
|
`,G=c.div`
|
|
144
|
-
padding: ${
|
|
144
|
+
padding: ${n.spacing.small};
|
|
145
145
|
height: auto;
|
|
146
146
|
width: 100%;
|
|
147
147
|
`,J=c.div`
|
|
@@ -150,9 +150,9 @@
|
|
|
150
150
|
align-items: center;
|
|
151
151
|
width: 100%;
|
|
152
152
|
height: auto;
|
|
153
|
-
font-family: ${
|
|
154
|
-
font-size: ${
|
|
155
|
-
font-weight: ${
|
|
153
|
+
font-family: ${n.fonts.tertiary}, ${n.fonts.fallback};
|
|
154
|
+
font-size: ${n.fontSize.xsmall};
|
|
155
|
+
font-weight: ${n.fontWeight.bold};
|
|
156
156
|
`,me=c.form`
|
|
157
157
|
display: flex;
|
|
158
158
|
flex-direction: column;
|
|
@@ -168,4 +168,4 @@
|
|
|
168
168
|
flex-direction: column;
|
|
169
169
|
align-items: center;
|
|
170
170
|
justify-content: center;
|
|
171
|
-
`,be=({fieldsets:
|
|
171
|
+
`,be=({fieldsets:t=null,legendText:o,isExpandable:i,id:s,formInputs:r,labelAndInputContainerClass:d,labelClass:m,inputClass:l,handleEditableInputEntryChange:b,handleAddingInputEntry:u,hasSubmit:y=!1,hasCancel:f=!1,hasDelete:p=!1,hasEdit:C=!1,submitText:j,handleSubmitForm:N,handleSubmit:T,cancelText:A,handleCancel:R,deleteText:B,handleDelete:S,editText:q,handleEdit:k,className:w,children:D})=>e.jsxs(me,{id:`${s}-form`,className:w,onSubmit:N,children:[t?t.map((a,$)=>e.jsxs(G,{children:[e.jsxs(H,{id:`${s}-form-fieldset-${$}`,className:"form-fieldset",children:[a.legend&&e.jsx(U,{children:a.legend}),a.inputs.length!==0?a.inputs.map((h,F)=>e.jsxs(v.Fragment,{children:[h.type==="textarea"&&e.jsx(E,{...h,id:h.id??`${a.legend}-input`,labelClass:m,inputClass:l,idx:F,className:d}),(h.type==="radio"||h.type==="checkbox")&&e.jsx(E,{...h,id:h.id??`${a.legend}-input`,labelClass:m,inputClass:l,idx:F,className:d}),h.type!=="textarea"&&h.type!=="radio"&&h.type!=="checkbox"&&e.jsx(E,{...h,id:h.id??`${a.legend}-input`,labelClass:m,inputClass:l,idx:F,className:d}),h.isEditable&&h.editing&&e.jsx(M,{legend:`${a.legend} ${F+1}`,idx:F,editableInformation:h?.editableInformation,onChangeOfEditableOption:b,onClickSaveEdit:h?.onClickSave,onClickCancelEdit:h?.onClickCancel,onClickDeleteEntry:h?.onClickDelete})]},`form-${s}-${F}`)):a.expandable?e.jsx(J,{children:`No entry yet on ${a.legend}. Click "+" button to add entry.`}):""]}),a.expandable&&e.jsx(K,{className:"add-input-button-space",children:e.jsx(g,{id:`expand-${a.legend}-inputs`,buttonType:"button",text:"+",onClick:u,className:"add-input-entry"})})]},`${a.legend}-${$}`)):e.jsxs(G,{children:[e.jsxs(H,{id:`${s}-form-fieldset`,className:"form-fieldset",children:[o&&e.jsx(U,{children:o}),!t&&r&&r.length!==0?r.map((a,$)=>e.jsxs(v.Fragment,{children:[a.type==="textarea"&&e.jsx(E,{...a,id:a.id??`${o}-input`,labelClass:m,inputClass:l,idx:$,className:d}),(a.type==="radio"||a.type==="checkbox")&&e.jsx(E,{...a,id:a.id??`${o}-input`,labelClass:m,inputClass:l,idx:$,className:d}),a.type!=="textarea"&&a.type!=="radio"&&a.type!=="checkbox"&&e.jsx(E,{...a,id:a.id??`${o}-input`,labelClass:m,inputClass:l,idx:$,className:d}),a.isEditable&&a.editing&&e.jsx(M,{legend:`${o} ${$+1}`,idx:$,editableInformation:a?.editableInformation,onChangeOfEditableOption:b,onClickSaveEdit:a?.onClickSave,onClickCancelEdit:a?.onClickEdit,onClickDeleteEntry:a?.onClickDelete})]},`form-${s}-${$}`)):i?e.jsx(J,{children:`No entry yet on ${o}. Please click "+" button to add`}):""]}),i&&e.jsx(K,{className:"add-input-button-space",children:e.jsx(g,{id:`expand-${o}-inputs`,buttonType:"button",text:"+",onClick:u,className:"add-input-entry"})})]}),e.jsx(de,{id:s,hasSubmit:y,submitText:j,handleSubmit:T,hasEdit:C,editText:q,handleEdit:k,hasCancel:f,cancelText:A,handleCancel:R,hasDelete:p,deleteText:B,handleDelete:S}),e.jsx(xe,{className:"children-container",children:D})]}),he=t=>{const o=/^#([0-9A-Fa-f]{3}){1,2}$/,i=/^rgb(a)?\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}(?:\s*,\s*(0|1|0?\.\d+))?\s*\)$/;return o.test(t)||i.test(t)||CSS.supports("color",t)},x=t=>{if(!he(t))throw new Error(`Invalid color: ${t}`);return t},fe={mobile:"320px",tablet:"768px",desktop:"992px",largeDesktop:"1200px",largerDesktop:"1400px"},L={name:"light",colors:{text:x("#333446"),bg:x("#EEEEEE"),blue:x("#7F8CAA"),blue2:x("#80A6FF"),teal:x("#5b8280ff"),teal2:x("#AEEAE7"),gray:x("#AEAEAE"),information:x("#202234"),success:x("#123524"),warning:x("#F2C265"),error:x("#990000")}},Q={name:"dark",colors:{bg:x("#333446"),text:x("#EEEEEE"),blue:x("#80A6FF"),blue2:x("#7F8CAA"),teal:x("#AEEAE7"),teal2:x("#5b8280ff"),gray:x("#D0D0DD"),information:x("#C9E6F0"),success:x("#9EDF9C"),warning:x("#FCFFC1"),error:x("#FAD4D4")}},O=v.createContext(void 0),ge=({children:t})=>{const[o,i]=v.useState(L),s=()=>{i(r=>r===L?Q:L)};return e.jsx(O.Provider,{value:{currentTheme:o,toggleTheme:s},children:e.jsx(c.ThemeProvider,{theme:o,children:t})})},ue=()=>v.useContext(O);exports.DynamicForm=be;exports.ThemeContext=O;exports.ThemeContextProvider=ge;exports.breakpoints=fe;exports.darkTheme=Q;exports.lightTheme=L;exports.useTheme=ue;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t, jsxs as g, Fragment as V } from "react/jsx-runtime";
|
|
2
2
|
import W, { forwardRef as X, createContext as Y, useState as Z, useContext as _ } from "react";
|
|
3
3
|
import s, { ThemeProvider as I } from "styled-components";
|
|
4
|
-
const
|
|
4
|
+
const n = {
|
|
5
5
|
fonts: {
|
|
6
6
|
secondary: "Raleway",
|
|
7
7
|
tertiary: "Lato",
|
|
@@ -36,11 +36,11 @@ const t = {
|
|
|
36
36
|
display: flex;
|
|
37
37
|
align-items: center;
|
|
38
38
|
justify-content: center;
|
|
39
|
-
background-color: ${({ theme:
|
|
40
|
-
color: ${({ theme:
|
|
41
|
-
border: ${
|
|
42
|
-
border-radius: ${
|
|
43
|
-
padding: ${
|
|
39
|
+
background-color: ${({ theme: e }) => e.colors.blue || "blue"};
|
|
40
|
+
color: ${({ theme: e }) => e.colors.bg || "white"};
|
|
41
|
+
border: ${n.borderThickness.light} solid ${({ theme: e }) => e.colors.text || "black"};
|
|
42
|
+
border-radius: ${n.borderRadius.xlarge};
|
|
43
|
+
padding: ${n.spacing.xxxsmall} ${n.spacing.small};
|
|
44
44
|
margin: 0.125rem;
|
|
45
45
|
width: auto;
|
|
46
46
|
cursor: pointer;
|
|
@@ -48,7 +48,7 @@ const t = {
|
|
|
48
48
|
|
|
49
49
|
&:hover {
|
|
50
50
|
background-color: lightblue;
|
|
51
|
-
border: ${
|
|
51
|
+
border: ${n.borderThickness.light} solid gray;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
& .button-icon-text-space {
|
|
@@ -67,14 +67,14 @@ const t = {
|
|
|
67
67
|
`, ne = s.img`
|
|
68
68
|
maxwidth: 100%;
|
|
69
69
|
`, ae = s.span`
|
|
70
|
-
font-size: ${
|
|
71
|
-
font-weight: ${
|
|
72
|
-
font-family: ${
|
|
70
|
+
font-size: ${n.fontSize.xsmall};
|
|
71
|
+
font-weight: ${n.fontWeight.medium};
|
|
72
|
+
font-family: ${n.fonts.tertiary}, ${n.fonts.fallback};
|
|
73
73
|
display: flex;
|
|
74
74
|
align-items: center;
|
|
75
75
|
justify-content: center;
|
|
76
76
|
`, x = ({
|
|
77
|
-
onClick:
|
|
77
|
+
onClick: e,
|
|
78
78
|
id: o,
|
|
79
79
|
buttonType: l,
|
|
80
80
|
source: i,
|
|
@@ -83,17 +83,17 @@ const t = {
|
|
|
83
83
|
text: m = "",
|
|
84
84
|
className: c = "",
|
|
85
85
|
dataAttributes: h = {}
|
|
86
|
-
}) => /* @__PURE__ */
|
|
86
|
+
}) => /* @__PURE__ */ t(
|
|
87
87
|
ee,
|
|
88
88
|
{
|
|
89
|
-
onClick:
|
|
89
|
+
onClick: e,
|
|
90
90
|
id: o,
|
|
91
91
|
type: l,
|
|
92
92
|
className: c,
|
|
93
93
|
...h,
|
|
94
94
|
children: /* @__PURE__ */ g(te, { className: "button-icon-text-space", children: [
|
|
95
|
-
i ? /* @__PURE__ */
|
|
96
|
-
m && /* @__PURE__ */
|
|
95
|
+
i ? /* @__PURE__ */ t(ne, { src: i, alt: d }) : r || "",
|
|
96
|
+
m && /* @__PURE__ */ t(ae, { id: o, children: m })
|
|
97
97
|
] })
|
|
98
98
|
}
|
|
99
99
|
), oe = s.div`
|
|
@@ -101,10 +101,10 @@ const t = {
|
|
|
101
101
|
flex-direction: column;
|
|
102
102
|
align-items: left;
|
|
103
103
|
width: 100%;
|
|
104
|
-
margin-bottom: ${
|
|
104
|
+
margin-bottom: ${n.spacing.small};
|
|
105
105
|
`, ie = s.div`
|
|
106
106
|
display: flex;
|
|
107
|
-
gap: ${
|
|
107
|
+
gap: ${n.spacing.xsmall};
|
|
108
108
|
width: auto;
|
|
109
109
|
height: auto;
|
|
110
110
|
`, le = s.label`
|
|
@@ -112,11 +112,11 @@ const t = {
|
|
|
112
112
|
align-items: center;
|
|
113
113
|
justify-content:center;
|
|
114
114
|
height: auto;
|
|
115
|
-
flex-direction: ${(
|
|
116
|
-
font-family: ${
|
|
117
|
-
font-size: ${
|
|
118
|
-
font-weight: ${
|
|
119
|
-
gap: ${
|
|
115
|
+
flex-direction: ${(e) => e.$labelFlexDirection || "column"};
|
|
116
|
+
font-family: ${n.fonts.secondary}, ${n.fonts.fallback};
|
|
117
|
+
font-size: ${n.fontSize.xsmall};
|
|
118
|
+
font-weight: ${n.fontWeight.bold};
|
|
119
|
+
gap: ${n.spacing.xxsmall};
|
|
120
120
|
|
|
121
121
|
& .label-icon-container img,
|
|
122
122
|
& .label-icon-container svg {
|
|
@@ -125,15 +125,15 @@ const t = {
|
|
|
125
125
|
object-fit: contain;
|
|
126
126
|
}
|
|
127
127
|
`, ce = s.span`
|
|
128
|
-
font-weight: ${
|
|
128
|
+
font-weight: ${n.fontWeight.bolder};
|
|
129
129
|
`, se = s.div`
|
|
130
130
|
max-width: 100%;
|
|
131
131
|
display: flex;
|
|
132
132
|
align-items: center;
|
|
133
133
|
`, re = s.span`
|
|
134
|
-
font-weight: ${
|
|
134
|
+
font-weight: ${n.fontWeight.light};
|
|
135
135
|
`, P = ({
|
|
136
|
-
htmlFor:
|
|
136
|
+
htmlFor: e,
|
|
137
137
|
textLabel: o,
|
|
138
138
|
additionalInfo: l,
|
|
139
139
|
$labelFlexDirection: i,
|
|
@@ -141,46 +141,46 @@ const t = {
|
|
|
141
141
|
svg: d,
|
|
142
142
|
className: m,
|
|
143
143
|
children: c
|
|
144
|
-
}) => /* @__PURE__ */ g(le, { htmlFor:
|
|
145
|
-
(r || d) && /* @__PURE__ */
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
l && /* @__PURE__ */
|
|
144
|
+
}) => /* @__PURE__ */ g(le, { htmlFor: e, className: m, $labelFlexDirection: i, children: [
|
|
145
|
+
(r || d) && /* @__PURE__ */ t(se, { className: "label-icon-container", children: r ? /* @__PURE__ */ t("img", { src: r, alt: `${e}-label-icon` }) : d || "" }),
|
|
146
|
+
/* @__PURE__ */ t(ce, { className: "main-label", children: o }),
|
|
147
|
+
l && /* @__PURE__ */ t(re, { className: "additional-info", children: l }),
|
|
148
148
|
c
|
|
149
149
|
] }), q = s.input`
|
|
150
150
|
display: flex;
|
|
151
151
|
place-content: center;
|
|
152
|
-
font-family: ${
|
|
153
|
-
font-size: ${
|
|
152
|
+
font-family: ${n.fonts.secondary}, ${n.fonts.fallback};
|
|
153
|
+
font-size: ${n.fontSize.xsmall};
|
|
154
154
|
line-height: 1.75;
|
|
155
|
-
padding: ${
|
|
155
|
+
padding: ${n.spacing.xxxsmall} ${n.spacing.xsmall};
|
|
156
156
|
max-width: 100%;
|
|
157
157
|
height: auto;
|
|
158
158
|
background-color: #FFFFFF;
|
|
159
159
|
outline: none;
|
|
160
|
-
border: ${
|
|
161
|
-
border-radius: ${
|
|
160
|
+
border: ${n.borderThickness.thin} solid #000000;
|
|
161
|
+
border-radius: ${n.borderRadius.xsmall};
|
|
162
162
|
|
|
163
163
|
&:focus{
|
|
164
|
-
border: ${
|
|
164
|
+
border: ${n.borderThickness.thin} solid ${({ theme: e }) => e.colors.teal};
|
|
165
165
|
}
|
|
166
166
|
`, de = s.textarea`
|
|
167
167
|
display: flex;
|
|
168
168
|
place-content: center;
|
|
169
|
-
border: ${
|
|
170
|
-
border-radius: ${
|
|
169
|
+
border: ${n.borderThickness.light} solid ${({ theme: e }) => e.colors.text};
|
|
170
|
+
border-radius: ${n.borderRadius.small};
|
|
171
171
|
outline: none;
|
|
172
|
-
line-height: ${
|
|
173
|
-
padding: ${
|
|
174
|
-
font-family: ${
|
|
175
|
-
font-size: ${
|
|
172
|
+
line-height: ${n.spacing.small};
|
|
173
|
+
padding: ${n.spacing.xxxsmall};
|
|
174
|
+
font-family: ${n.fonts.secondary}, ${n.fonts.fallback};
|
|
175
|
+
font-size: ${n.fontSize.xsmall};
|
|
176
176
|
max-width: 100%;
|
|
177
177
|
resize: none;
|
|
178
178
|
overflow-y: auto;
|
|
179
|
-
`, j = X((
|
|
180
|
-
const { type: l, id: i, onChange: r, isRequired: d, dataAttributes: m, disabled: c, className: h } =
|
|
179
|
+
`, j = X((e, o) => {
|
|
180
|
+
const { type: l, id: i, onChange: r, isRequired: d, dataAttributes: m, disabled: c, className: h } = e;
|
|
181
181
|
if (l === "textarea") {
|
|
182
|
-
const { rows: N = 5, cols: F = 30, value: A, ...S } =
|
|
183
|
-
return /* @__PURE__ */
|
|
182
|
+
const { rows: N = 5, cols: F = 30, value: A, ...S } = e;
|
|
183
|
+
return /* @__PURE__ */ t(
|
|
184
184
|
de,
|
|
185
185
|
{
|
|
186
186
|
id: i,
|
|
@@ -197,8 +197,8 @@ const t = {
|
|
|
197
197
|
);
|
|
198
198
|
}
|
|
199
199
|
if (l === "radio" || l === "checkbox") {
|
|
200
|
-
const { checked: N, ...F } =
|
|
201
|
-
return /* @__PURE__ */
|
|
200
|
+
const { checked: N, ...F } = e;
|
|
201
|
+
return /* @__PURE__ */ t(
|
|
202
202
|
q,
|
|
203
203
|
{
|
|
204
204
|
ref: o,
|
|
@@ -212,8 +212,8 @@ const t = {
|
|
|
212
212
|
}
|
|
213
213
|
);
|
|
214
214
|
}
|
|
215
|
-
const $ =
|
|
216
|
-
return /* @__PURE__ */
|
|
215
|
+
const $ = e, { value: p, pattern: u, placeholderText: k, ...C } = $;
|
|
216
|
+
return /* @__PURE__ */ t(
|
|
217
217
|
q,
|
|
218
218
|
{
|
|
219
219
|
id: i,
|
|
@@ -230,7 +230,7 @@ const t = {
|
|
|
230
230
|
pattern: u
|
|
231
231
|
}
|
|
232
232
|
);
|
|
233
|
-
}), T = (
|
|
233
|
+
}), T = (e) => {
|
|
234
234
|
const {
|
|
235
235
|
className: o,
|
|
236
236
|
type: l,
|
|
@@ -253,12 +253,12 @@ const t = {
|
|
|
253
253
|
onClickDelete: B,
|
|
254
254
|
idx: z,
|
|
255
255
|
children: R
|
|
256
|
-
} =
|
|
256
|
+
} = e;
|
|
257
257
|
return /* @__PURE__ */ g(oe, { className: `${o} ${i.replace("#", "")}-label-input-container`, children: [
|
|
258
|
-
l !== "radio" && l !== "checkbox" && /* @__PURE__ */
|
|
258
|
+
l !== "radio" && l !== "checkbox" && /* @__PURE__ */ t(P, { htmlFor: i, textLabel: r, additionalInfo: d, $labelFlexDirection: m, svg: c, className: h }),
|
|
259
259
|
l !== "radio" && l !== "checkbox" && l === "textarea" && (() => {
|
|
260
|
-
const { rows: w = 5, cols: E = 30, value: D, ...a } =
|
|
261
|
-
return /* @__PURE__ */
|
|
260
|
+
const { rows: w = 5, cols: E = 30, value: D, ...a } = e;
|
|
261
|
+
return /* @__PURE__ */ t(
|
|
262
262
|
j,
|
|
263
263
|
{
|
|
264
264
|
id: i,
|
|
@@ -277,8 +277,8 @@ const t = {
|
|
|
277
277
|
);
|
|
278
278
|
})(),
|
|
279
279
|
l !== "radio" && l !== "checkbox" && l !== "textarea" && (() => {
|
|
280
|
-
const w =
|
|
281
|
-
return /* @__PURE__ */
|
|
280
|
+
const w = e, { value: E, pattern: D, placeholderText: a, ...y } = w;
|
|
281
|
+
return /* @__PURE__ */ t(
|
|
282
282
|
j,
|
|
283
283
|
{
|
|
284
284
|
id: i,
|
|
@@ -297,9 +297,9 @@ const t = {
|
|
|
297
297
|
);
|
|
298
298
|
})(),
|
|
299
299
|
(l === "radio" || l === "checkbox") && (() => {
|
|
300
|
-
const { checked: w, ...E } =
|
|
300
|
+
const { checked: w, ...E } = e;
|
|
301
301
|
return /* @__PURE__ */ g(V, { children: [
|
|
302
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ t(
|
|
303
303
|
j,
|
|
304
304
|
{
|
|
305
305
|
ref: C,
|
|
@@ -314,12 +314,12 @@ const t = {
|
|
|
314
314
|
...u
|
|
315
315
|
}
|
|
316
316
|
),
|
|
317
|
-
/* @__PURE__ */
|
|
317
|
+
/* @__PURE__ */ t(P, { htmlFor: i, textLabel: r, additionalInfo: d, $labelFlexDirection: m, svg: c, className: h })
|
|
318
318
|
] });
|
|
319
319
|
})(),
|
|
320
320
|
F && /* @__PURE__ */ g(ie, { className: "input-edit-buttons", children: [
|
|
321
|
-
/* @__PURE__ */
|
|
322
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ t(x, { id: `editable-${i}-edit-btn`, svg: A, buttonType: "button", onClick: S, className: `edit-radio-${z}`, dataAttributes: u }),
|
|
322
|
+
/* @__PURE__ */ t(x, { id: `editable-${i}-delete-btn`, svg: L, buttonType: "button", onClick: B, className: `delete-radio-${z}`, dataAttributes: u })
|
|
323
323
|
] }),
|
|
324
324
|
R
|
|
325
325
|
] });
|
|
@@ -328,23 +328,23 @@ const t = {
|
|
|
328
328
|
height: auto;
|
|
329
329
|
width: 100%;
|
|
330
330
|
`, be = s.legend`
|
|
331
|
-
font-size: ${
|
|
331
|
+
font-size: ${n.spacing.medium};
|
|
332
332
|
font-weight: 500;
|
|
333
|
-
margin: 0 auto ${
|
|
333
|
+
margin: 0 auto ${n.spacing.small} auto;
|
|
334
334
|
text-align: center;
|
|
335
|
-
font-family: ${
|
|
335
|
+
font-family: ${n.fonts.secondary}, ${n.fonts.fallback};
|
|
336
336
|
`, he = s.div`
|
|
337
337
|
display: flex;
|
|
338
338
|
flex-direction: column;
|
|
339
339
|
align-items: flex-start;
|
|
340
340
|
width: 100%;
|
|
341
|
-
margin-bottom: ${
|
|
341
|
+
margin-bottom: ${n.spacing.small};
|
|
342
342
|
`, fe = s.div`
|
|
343
343
|
display: flex;
|
|
344
344
|
justify-content: space-between;
|
|
345
345
|
width: 100%;
|
|
346
346
|
`, M = ({
|
|
347
|
-
legend:
|
|
347
|
+
legend: e,
|
|
348
348
|
idx: o,
|
|
349
349
|
editableInformation: l,
|
|
350
350
|
onChangeOfEditableOption: i,
|
|
@@ -352,8 +352,8 @@ const t = {
|
|
|
352
352
|
onClickCancelEdit: d,
|
|
353
353
|
onClickDeleteEntry: m
|
|
354
354
|
}) => /* @__PURE__ */ g(me, { className: "editable-selection-fieldset", children: [
|
|
355
|
-
/* @__PURE__ */
|
|
356
|
-
l.map((c, h) => /* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ t(be, { children: `${e} ${o + 1}` }),
|
|
356
|
+
l.map((c, h) => /* @__PURE__ */ t(he, { className: "editable-selection-container", children: /* @__PURE__ */ t(
|
|
357
357
|
j,
|
|
358
358
|
{
|
|
359
359
|
id: `editable-selection-${h}`,
|
|
@@ -372,16 +372,16 @@ const t = {
|
|
|
372
372
|
}
|
|
373
373
|
) }, `${c.name}-${h}`)),
|
|
374
374
|
/* @__PURE__ */ g(fe, { className: "editable-selection-button-space", children: [
|
|
375
|
-
/* @__PURE__ */
|
|
376
|
-
/* @__PURE__ */
|
|
377
|
-
/* @__PURE__ */
|
|
375
|
+
/* @__PURE__ */ t(x, { id: `editable-selection-${o}-submit`, buttonType: "submit", text: "Save", onClick: r, className: "editable-selection-btn", dataAttributes: { "data-index": o } }),
|
|
376
|
+
/* @__PURE__ */ t(x, { id: `editable-selection-${o}-cancel`, buttonType: "button", text: "Cancel", onClick: d, className: "editable-selection-btn", dataAttributes: { "data-index": o } }),
|
|
377
|
+
/* @__PURE__ */ t(x, { id: `editable-selection-${o}-delete`, buttonType: "button", text: "Delete", onClick: m, className: "editable-selection-btn", dataAttributes: { "data-index": o } })
|
|
378
378
|
] })
|
|
379
379
|
] }), ge = s.div`
|
|
380
380
|
display: flex;
|
|
381
381
|
justify-content: space-between;
|
|
382
382
|
max-width: 100%;
|
|
383
383
|
`, ue = ({
|
|
384
|
-
id:
|
|
384
|
+
id: e,
|
|
385
385
|
hasSubmit: o,
|
|
386
386
|
submitText: l,
|
|
387
387
|
handleSubmit: i,
|
|
@@ -395,23 +395,23 @@ const t = {
|
|
|
395
395
|
deleteText: u,
|
|
396
396
|
handleDelete: k
|
|
397
397
|
}) => /* @__PURE__ */ g(ge, { className: "form-main-button-container", children: [
|
|
398
|
-
o && /* @__PURE__ */
|
|
399
|
-
r && /* @__PURE__ */
|
|
400
|
-
c && /* @__PURE__ */
|
|
401
|
-
p && /* @__PURE__ */
|
|
398
|
+
o && /* @__PURE__ */ t(x, { id: `form-${e}-submit`, buttonType: "submit", text: l ?? "Submit", onClick: i, className: "submit-form-btn" }),
|
|
399
|
+
r && /* @__PURE__ */ t(x, { id: `form-${e}-edit`, buttonType: "button", text: d ?? "Edit", onClick: m, className: "edit-form-btn" }),
|
|
400
|
+
c && /* @__PURE__ */ t(x, { id: `form-${e}-cancel`, buttonType: "button", text: h ?? "Cancel", onClick: $, className: "cancel-form-btn" }),
|
|
401
|
+
p && /* @__PURE__ */ t(x, { id: `form-${e}-delete`, buttonType: "button", text: u ?? "Delete", onClick: k, className: "delete-form-btn" })
|
|
402
402
|
] }), U = s.legend`
|
|
403
|
-
font-size: ${
|
|
403
|
+
font-size: ${n.spacing.medium};
|
|
404
404
|
font-weight: 500;
|
|
405
|
-
margin-bottom: ${
|
|
405
|
+
margin-bottom: ${n.spacing.small};
|
|
406
406
|
width: auto;
|
|
407
407
|
text-align: center;
|
|
408
|
-
font-family: ${
|
|
408
|
+
font-family: ${n.fonts.secondary}, ${n.fonts.fallback};
|
|
409
409
|
`, H = s.fieldset`
|
|
410
410
|
padding: 0;
|
|
411
411
|
height: auto;
|
|
412
412
|
width: 100%;
|
|
413
413
|
`, G = s.div`
|
|
414
|
-
padding: ${
|
|
414
|
+
padding: ${n.spacing.small};
|
|
415
415
|
height: auto;
|
|
416
416
|
width: 100%;
|
|
417
417
|
`, J = s.div`
|
|
@@ -420,9 +420,9 @@ const t = {
|
|
|
420
420
|
align-items: center;
|
|
421
421
|
width: 100%;
|
|
422
422
|
height: auto;
|
|
423
|
-
font-family: ${
|
|
424
|
-
font-size: ${
|
|
425
|
-
font-weight: ${
|
|
423
|
+
font-family: ${n.fonts.tertiary}, ${n.fonts.fallback};
|
|
424
|
+
font-size: ${n.fontSize.xsmall};
|
|
425
|
+
font-weight: ${n.fontWeight.bold};
|
|
426
426
|
`, xe = s.form`
|
|
427
427
|
display: flex;
|
|
428
428
|
flex-direction: column;
|
|
@@ -439,7 +439,7 @@ const t = {
|
|
|
439
439
|
align-items: center;
|
|
440
440
|
justify-content: center;
|
|
441
441
|
`, Ce = ({
|
|
442
|
-
fieldsets:
|
|
442
|
+
fieldsets: e = null,
|
|
443
443
|
//* if a form has differrent fieldsets
|
|
444
444
|
legendText: o,
|
|
445
445
|
//* if form has no fieldsets, depends if you have fieldset for solo form
|
|
@@ -471,11 +471,11 @@ const t = {
|
|
|
471
471
|
children: D
|
|
472
472
|
//* if there are nodes to be inserted after submit/edit/cancel buttons usually in login or signup forms
|
|
473
473
|
}) => /* @__PURE__ */ g(xe, { id: `${i}-form`, className: E, onSubmit: F, children: [
|
|
474
|
-
|
|
474
|
+
e ? e.map((a, y) => /* @__PURE__ */ g(G, { children: [
|
|
475
475
|
/* @__PURE__ */ g(H, { id: `${i}-form-fieldset-${y}`, className: "form-fieldset", children: [
|
|
476
|
-
a.legend && /* @__PURE__ */
|
|
476
|
+
a.legend && /* @__PURE__ */ t(U, { children: a.legend }),
|
|
477
477
|
a.inputs.length !== 0 ? a.inputs.map((f, v) => /* @__PURE__ */ g(W.Fragment, { children: [
|
|
478
|
-
f.type === "textarea" && /* @__PURE__ */
|
|
478
|
+
f.type === "textarea" && /* @__PURE__ */ t(
|
|
479
479
|
T,
|
|
480
480
|
{
|
|
481
481
|
...f,
|
|
@@ -486,7 +486,7 @@ const t = {
|
|
|
486
486
|
className: d
|
|
487
487
|
}
|
|
488
488
|
),
|
|
489
|
-
(f.type === "radio" || f.type === "checkbox") && /* @__PURE__ */
|
|
489
|
+
(f.type === "radio" || f.type === "checkbox") && /* @__PURE__ */ t(
|
|
490
490
|
T,
|
|
491
491
|
{
|
|
492
492
|
...f,
|
|
@@ -497,7 +497,7 @@ const t = {
|
|
|
497
497
|
className: d
|
|
498
498
|
}
|
|
499
499
|
),
|
|
500
|
-
f.type !== "textarea" && f.type !== "radio" && f.type !== "checkbox" && /* @__PURE__ */
|
|
500
|
+
f.type !== "textarea" && f.type !== "radio" && f.type !== "checkbox" && /* @__PURE__ */ t(
|
|
501
501
|
T,
|
|
502
502
|
{
|
|
503
503
|
...f,
|
|
@@ -508,7 +508,7 @@ const t = {
|
|
|
508
508
|
className: d
|
|
509
509
|
}
|
|
510
510
|
),
|
|
511
|
-
f.
|
|
511
|
+
f.isEditable && f.editing && /* @__PURE__ */ t(
|
|
512
512
|
M,
|
|
513
513
|
{
|
|
514
514
|
legend: `${a.legend} ${v + 1}`,
|
|
@@ -520,14 +520,14 @@ const t = {
|
|
|
520
520
|
onClickDeleteEntry: f?.onClickDelete
|
|
521
521
|
}
|
|
522
522
|
)
|
|
523
|
-
] }, `form-${i}-${v}`)) : a.expandable ? /* @__PURE__ */
|
|
523
|
+
] }, `form-${i}-${v}`)) : a.expandable ? /* @__PURE__ */ t(J, { children: `No entry yet on ${a.legend}. Click "+" button to add entry.` }) : ""
|
|
524
524
|
] }),
|
|
525
|
-
a.expandable && /* @__PURE__ */
|
|
525
|
+
a.expandable && /* @__PURE__ */ t(K, { className: "add-input-button-space", children: /* @__PURE__ */ t(x, { id: `expand-${a.legend}-inputs`, buttonType: "button", text: "+", onClick: $, className: "add-input-entry" }) })
|
|
526
526
|
] }, `${a.legend}-${y}`)) : /* @__PURE__ */ g(G, { children: [
|
|
527
527
|
/* @__PURE__ */ g(H, { id: `${i}-form-fieldset`, className: "form-fieldset", children: [
|
|
528
|
-
o && /* @__PURE__ */
|
|
529
|
-
r.length !== 0 ? r.map((a, y) => /* @__PURE__ */ g(W.Fragment, { children: [
|
|
530
|
-
a.type === "textarea" && /* @__PURE__ */
|
|
528
|
+
o && /* @__PURE__ */ t(U, { children: o }),
|
|
529
|
+
!e && r && r.length !== 0 ? r.map((a, y) => /* @__PURE__ */ g(W.Fragment, { children: [
|
|
530
|
+
a.type === "textarea" && /* @__PURE__ */ t(
|
|
531
531
|
T,
|
|
532
532
|
{
|
|
533
533
|
...a,
|
|
@@ -538,7 +538,7 @@ const t = {
|
|
|
538
538
|
className: d
|
|
539
539
|
}
|
|
540
540
|
),
|
|
541
|
-
(a.type === "radio" || a.type === "checkbox") && /* @__PURE__ */
|
|
541
|
+
(a.type === "radio" || a.type === "checkbox") && /* @__PURE__ */ t(
|
|
542
542
|
T,
|
|
543
543
|
{
|
|
544
544
|
...a,
|
|
@@ -549,7 +549,7 @@ const t = {
|
|
|
549
549
|
className: d
|
|
550
550
|
}
|
|
551
551
|
),
|
|
552
|
-
a.type !== "textarea" && a.type !== "radio" && a.type !== "checkbox" && /* @__PURE__ */
|
|
552
|
+
a.type !== "textarea" && a.type !== "radio" && a.type !== "checkbox" && /* @__PURE__ */ t(
|
|
553
553
|
T,
|
|
554
554
|
{
|
|
555
555
|
...a,
|
|
@@ -560,7 +560,7 @@ const t = {
|
|
|
560
560
|
className: d
|
|
561
561
|
}
|
|
562
562
|
),
|
|
563
|
-
a.
|
|
563
|
+
a.isEditable && a.editing && /* @__PURE__ */ t(
|
|
564
564
|
M,
|
|
565
565
|
{
|
|
566
566
|
legend: `${o} ${y + 1}`,
|
|
@@ -572,11 +572,11 @@ const t = {
|
|
|
572
572
|
onClickDeleteEntry: a?.onClickDelete
|
|
573
573
|
}
|
|
574
574
|
)
|
|
575
|
-
] }, `form-${i}-${y}`)) : l ? /* @__PURE__ */
|
|
575
|
+
] }, `form-${i}-${y}`)) : l ? /* @__PURE__ */ t(J, { children: `No entry yet on ${o}. Please click "+" button to add` }) : ""
|
|
576
576
|
] }),
|
|
577
|
-
l && /* @__PURE__ */
|
|
577
|
+
l && /* @__PURE__ */ t(K, { className: "add-input-button-space", children: /* @__PURE__ */ t(x, { id: `expand-${o}-inputs`, buttonType: "button", text: "+", onClick: $, className: "add-input-entry" }) })
|
|
578
578
|
] }),
|
|
579
|
-
/* @__PURE__ */
|
|
579
|
+
/* @__PURE__ */ t(
|
|
580
580
|
ue,
|
|
581
581
|
{
|
|
582
582
|
id: i,
|
|
@@ -594,13 +594,13 @@ const t = {
|
|
|
594
594
|
handleDelete: z
|
|
595
595
|
}
|
|
596
596
|
),
|
|
597
|
-
/* @__PURE__ */
|
|
598
|
-
] }), ye = (
|
|
597
|
+
/* @__PURE__ */ t($e, { className: "children-container", children: D })
|
|
598
|
+
] }), ye = (e) => {
|
|
599
599
|
const o = /^#([0-9A-Fa-f]{3}){1,2}$/, l = /^rgb(a)?\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}(?:\s*,\s*(0|1|0?\.\d+))?\s*\)$/;
|
|
600
|
-
return o.test(
|
|
601
|
-
}, b = (
|
|
602
|
-
if (!ye(
|
|
603
|
-
return
|
|
600
|
+
return o.test(e) || l.test(e) || CSS.supports("color", e);
|
|
601
|
+
}, b = (e) => {
|
|
602
|
+
if (!ye(e)) throw new Error(`Invalid color: ${e}`);
|
|
603
|
+
return e;
|
|
604
604
|
}, Fe = {
|
|
605
605
|
mobile: "320px",
|
|
606
606
|
//Small iPhone SE & Medium: iPhone 12-15
|
|
@@ -640,11 +640,11 @@ const t = {
|
|
|
640
640
|
warning: b("#FCFFC1"),
|
|
641
641
|
error: b("#FAD4D4")
|
|
642
642
|
}
|
|
643
|
-
}, Q = Y(void 0), Ee = ({ children:
|
|
643
|
+
}, Q = Y(void 0), Ee = ({ children: e }) => {
|
|
644
644
|
const [o, l] = Z(O), i = () => {
|
|
645
645
|
l((r) => r === O ? pe : O);
|
|
646
646
|
};
|
|
647
|
-
return /* @__PURE__ */
|
|
647
|
+
return /* @__PURE__ */ t(Q.Provider, { value: { currentTheme: o, toggleTheme: i }, children: /* @__PURE__ */ t(I, { theme: o, children: e }) });
|
|
648
648
|
}, ve = () => _(Q);
|
|
649
649
|
export {
|
|
650
650
|
Ce as DynamicForm,
|
package/dist/type/propTypes.d.ts
CHANGED
|
@@ -71,7 +71,7 @@ export type EditableInputProps = {
|
|
|
71
71
|
deleteIcon?: React.ReactNode;
|
|
72
72
|
onClickDelete: React.MouseEventHandler<HTMLButtonElement>;
|
|
73
73
|
idx?: number;
|
|
74
|
-
ref
|
|
74
|
+
ref?: React.Ref<HTMLInputElement | HTMLTextAreaElement>;
|
|
75
75
|
};
|
|
76
76
|
export type LabeledInputProps = (LabelProps & TextAreaInput & EditableInputProps) | (LabelProps & CheckedInput & EditableInputProps) | (LabelProps & GeneralInput & EditableInputProps);
|
|
77
77
|
export interface FormActionButtonsProps {
|
|
@@ -106,7 +106,7 @@ export interface NestedEditableOptionProps {
|
|
|
106
106
|
export type inputEntryShape<T extends boolean> = LabeledInputProps & {
|
|
107
107
|
uniqueClass?: string;
|
|
108
108
|
editing: boolean;
|
|
109
|
-
|
|
109
|
+
isEditable: T;
|
|
110
110
|
editableInformation: EditableInformation[];
|
|
111
111
|
} & (T extends true ? {
|
|
112
112
|
onClickEdit: React.MouseEventHandler<HTMLButtonElement>;
|
|
@@ -136,23 +136,25 @@ type ConditionalEditable<P> = P extends {
|
|
|
136
136
|
} : {
|
|
137
137
|
handleEditableInputEntryChange?: never;
|
|
138
138
|
};
|
|
139
|
-
export type DynamicFormProps
|
|
140
|
-
fieldsets: FieldsetShape[]
|
|
141
|
-
id: string;
|
|
142
|
-
isExpandable: K;
|
|
143
|
-
handleSubmitForm: React.FormEventHandler<HTMLFormElement>;
|
|
144
|
-
} & (T extends null ? {
|
|
145
|
-
formInputs: inputEntryShape<boolean>[];
|
|
146
|
-
legendText?: string;
|
|
147
|
-
labelAndInputContainerClass?: string;
|
|
148
|
-
} : {
|
|
139
|
+
export type DynamicFormProps = LabeledInputProps & FormActionButtonsProps & ({
|
|
140
|
+
fieldsets: FieldsetShape[];
|
|
149
141
|
formInputs?: never;
|
|
150
142
|
legendText?: never;
|
|
151
143
|
labelAndInputContainerClass?: never;
|
|
152
|
-
}
|
|
144
|
+
} | {
|
|
145
|
+
fieldsets: null;
|
|
146
|
+
formInputs: inputEntryShape<boolean>[];
|
|
147
|
+
legendText?: string;
|
|
148
|
+
labelAndInputContainerClass?: string;
|
|
149
|
+
}) & ConditionalEditable<LabeledInputProps> & ({
|
|
150
|
+
isExpandable: true;
|
|
153
151
|
handleAddingInputEntry: React.MouseEventHandler<HTMLButtonElement>;
|
|
154
|
-
}
|
|
152
|
+
} | {
|
|
153
|
+
isExpandable: false;
|
|
155
154
|
handleAddingInputEntry?: never;
|
|
156
|
-
})
|
|
155
|
+
}) & {
|
|
156
|
+
id: string;
|
|
157
|
+
handleSubmitForm: React.FormEventHandler<HTMLFormElement>;
|
|
158
|
+
};
|
|
157
159
|
export {};
|
|
158
160
|
//# sourceMappingURL=propTypes.d.ts.map
|
|
@@ -1 +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,EA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