@kbgarcia8/react-dynamic-form 1.1.2 → 1.1.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Button/Button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,QAAA,MAAM,MAAM,GAAI,gFAUd,WAAW,4CAoBZ,CAAA;AAED,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Button/Button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,QAAA,MAAM,MAAM,GAAI,gFAUd,WAAW,4CAgBZ,CAAA;AAED,eAAe,MAAM,CAAC"}
@@ -39,7 +39,7 @@
39
39
  display: flex;
40
40
  align-items: center;
41
41
  justify-content: center;
42
- `,$=({onClick:t,id:o,buttonType:i,source:s,svg:r,alt:d="alt-button-icon",text:m="",className:l="",dataAttributes:b={}})=>{const g=b?Object.fromEntries(Object.entries(b).map(([u,f])=>[`data-${u}`,f])):{};return e.jsx(V,{onClick:t,id:o,type:i,className:l,...g,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`
42
+ `,g=({onClick:t,id:o,buttonType:i,source:a,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:[a?e.jsx(Y,{src:a,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;
@@ -75,7 +75,7 @@
75
75
  align-items: center;
76
76
  `,ae=c.span`
77
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`
78
+ `,P=({htmlFor:t,textLabel:o,additionalInfo:i,$labelFlexDirection:a,source:r,svg:d,className:m,children:l})=>e.jsxs(ee,{htmlFor:t,className:m,$labelFlexDirection:a,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
81
  font-family: ${n.fonts.secondary}, ${n.fonts.fallback};
@@ -92,7 +92,7 @@
92
92
  &:focus{
93
93
  border: ${n.borderThickness.thin} solid ${({theme:t})=>t.colors.teal};
94
94
  }
95
- `,oe=c.textarea`
95
+ `,se=c.textarea`
96
96
  display: flex;
97
97
  place-content: center;
98
98
  border: ${n.borderThickness.light} solid ${({theme:t})=>t.colors.text};
@@ -105,7 +105,7 @@
105
105
  max-width: 100%;
106
106
  resize: none;
107
107
  overflow-y: auto;
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 g=t,{value:u,pattern:f,placeholderText:p,...C}=g;return e.jsx(W,{id:s,name:s,placeholder:p,onChange:r,value:u,type:i,required:d,...m,className:b,ref:o,disabled:l,pattern:f})}),F=t=>{const{className:o,type:i,id:s,textLabel:r,additionalInfo:d,$labelFlexDirection:m,svg:l,labelClass:b,onChange:g,isRequired:u,dataAttributes:f,inputClass:p,ref:C,disabled:j,isEditable:N,editIcon:T,onClickEdit:A,deleteIcon:R,onClickDelete:B,idx:S,children:O}=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:u,onChange:g,value:D,rows:k,cols:w,dataAttributes:f,className:p,ref:C,disabled:j})})(),i!=="radio"&&i!=="checkbox"&&i!=="textarea"&&(()=>{const k=t,{value:w,pattern:D,placeholderText:a,...y}=k;return e.jsx(z,{id:s,name:s,placeholderText:a,onChange:g,value:w,type:i,isRequired:u,dataAttributes: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:u,checked:k,onChange:g,disabled:j,className:p,dataAttributes: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($,{id:`editable-${s}-edit-btn`,svg:T,buttonType:"button",onClick:A,className:`edit-radio-${S}`,dataAttributes:f}),e.jsx($,{id:`editable-${s}-delete-btn`,svg:R,buttonType:"button",onClick:B,className:`delete-radio-${S}`,dataAttributes:f})]}),O]})},se=c.fieldset`
108
+ `,z=v.forwardRef((t,o)=>{const{type:i,id:a,onChange:r,isRequired:d,dataAttributes:m,disabled:l,className:b}=t;if(i==="textarea"){const{rows:j=5,cols:w=30,value:T,...A}=t;return e.jsx(se,{id:a,onChange:r,value:T,rows:j,cols:w,...m,className:b,ref:o,disabled:l,required:d})}if(i==="radio"||i==="checkbox"){const{checked:j,...w}=t;return e.jsx(W,{ref:o,type:"checkbox",id:a,checked:j,onChange:r,disabled:l,className:b,...m})}const u=t,{value:y,pattern:f,placeholderText:p,...N}=u;return e.jsx(W,{id:a,name:a,placeholder:p,onChange:r,value:y,type:i,required:d,...m,className:b,ref:o,disabled:l,pattern:f})}),F=t=>{const{className:o,type:i,id:a,textLabel:r,additionalInfo:d,$labelFlexDirection:m,svg:l,labelClass:b,onChange:u,isRequired:y,dataAttributes:f,inputClass:p,ref:N,disabled:j,isEditable:w,editIcon:T,onClickEdit:A,deleteIcon:R,onClickDelete:B,idx:S,children:q}=t;return e.jsxs(_,{className:`${o} ${a.replace("#","")}-label-input-container`,children:[i!=="radio"&&i!=="checkbox"&&e.jsx(P,{htmlFor:a,textLabel:r,additionalInfo:d,$labelFlexDirection:m,svg:l,className:b}),i!=="radio"&&i!=="checkbox"&&i==="textarea"&&(()=>{const{rows:k=5,cols:C=30,value:D,...s}=t;return e.jsx(z,{id:a,name:a,type:"textarea",isRequired:y,onChange:u,value:D,rows:k,cols:C,dataAttributes:f,className:p,ref:N,disabled:j})})(),i!=="radio"&&i!=="checkbox"&&i!=="textarea"&&(()=>{const k=t,{value:C,pattern:D,placeholderText:s,...$}=k;return e.jsx(z,{id:a,name:a,placeholderText:s,onChange:u,value:C,type:i,isRequired:y,dataAttributes:f,className:p,ref:N,disabled:j,pattern:D})})(),(i==="radio"||i==="checkbox")&&(()=>{const{checked:k,...C}=t;return e.jsxs(e.Fragment,{children:[e.jsx(z,{ref:N,type:"checkbox",name:a,id:a,isRequired:y,checked:k,onChange:u,disabled:j,className:p,dataAttributes:f}),e.jsx(P,{htmlFor:a,textLabel:r,additionalInfo:d,$labelFlexDirection:m,svg:l,className:b})]})})(),w&&e.jsxs(I,{className:"input-edit-buttons",children:[e.jsx(g,{id:`editable-${a}-edit-btn`,svg:T,buttonType:"button",onClick:A,className:`edit-radio-${S}`,dataAttributes:f}),e.jsx(g,{id:`editable-${a}-delete-btn`,svg:R,buttonType:"button",onClick:B,className:`delete-radio-${S}`,dataAttributes:f})]}),q]})},oe=c.fieldset`
109
109
  padding: 0;
110
110
  height: auto;
111
111
  width: 100%;
@@ -125,11 +125,11 @@
125
125
  display: flex;
126
126
  justify-content: space-between;
127
127
  width: 100%;
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($,{id:`editable-selection-${o}-submit`,buttonType:"submit",text:"Save",onClick:r,className:"editable-selection-btn",dataAttributes:{"data-index":o}}),e.jsx($,{id:`editable-selection-${o}-cancel`,buttonType:"button",text:"Cancel",onClick:d,className:"editable-selection-btn",dataAttributes:{"data-index":o}}),e.jsx($,{id:`editable-selection-${o}-delete`,buttonType:"button",text:"Delete",onClick:m,className:"editable-selection-btn",dataAttributes:{"data-index":o}})]})]}),re=c.div`
128
+ `,M=({legend:t,idx:o,editableInformation:i,onChangeOfEditableOption:a,onClickSaveEdit:r,onClickCancelEdit:d,onClickDeleteEntry:m})=>e.jsxs(oe,{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:a,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:t,hasSubmit:o,submitText:i,handleSubmit:s,hasEdit:r,editText:d,handleEdit:m,hasCancel:l,cancelText:b,handleCancel:g,hasDelete:u,deleteText:f,handleDelete:p})=>e.jsxs(re,{className:"form-main-button-container",children:[o&&e.jsx($,{id:`form-${t}-submit`,buttonType:"submit",text:i??"Submit",onClick:s,className:"submit-form-btn"}),r&&e.jsx($,{id:`form-${t}-edit`,buttonType:"button",text:d??"Edit",onClick:m,className:"edit-form-btn"}),l&&e.jsx($,{id:`form-${t}-cancel`,buttonType:"button",text:b??"Cancel",onClick:g,className:"cancel-form-btn"}),u&&e.jsx($,{id:`form-${t}-delete`,buttonType:"button",text:f??"Delete",onClick:p,className:"delete-form-btn"})]}),U=c.legend`
132
+ `,de=({id:t,hasSubmit:o,submitText:i,handleSubmit:a,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:a,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
133
  font-size: ${n.spacing.medium};
134
134
  font-weight: 500;
135
135
  margin-bottom: ${n.spacing.small};
@@ -168,4 +168,4 @@
168
168
  flex-direction: column;
169
169
  align-items: center;
170
170
  justify-content: center;
171
- `,be=({fieldsets:t=null,legendText:o,isExpandable:i,id:s,formInputs:r,labelAndInputContainerClass:d,labelClass:m,inputClass:l,handleEditableInputEntryChange:b,handleAddingInputEntry:g,hasSubmit:u=!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:O,handleEdit:k,className:w,children:D})=>e.jsxs(me,{id:`${s}-form`,className:w,onSubmit:N,children:[t?t.map((a,y)=>e.jsxs(G,{children:[e.jsxs(H,{id:`${s}-form-fieldset-${y}`,className:"form-fieldset",children:[a.legend&&e.jsx(U,{children:a.legend}),a.inputs.length!==0?a.inputs.map((h,E)=>e.jsxs(v.Fragment,{children:[h.type==="textarea"&&e.jsx(F,{...h,id:h.id??`${a.legend}-input`,labelClass:m,inputClass:l,idx:E,className:d}),(h.type==="radio"||h.type==="checkbox")&&e.jsx(F,{...h,id:h.id??`${a.legend}-input`,labelClass:m,inputClass:l,idx:E,className:d}),h.type!=="textarea"&&h.type!=="radio"&&h.type!=="checkbox"&&e.jsx(F,{...h,id:h.id??`${a.legend}-input`,labelClass:m,inputClass:l,idx:E,className:d}),h.isEditable&&h.editing&&e.jsx(M,{legend:`${a.legend} ${E+1}`,idx:E,editableInformation:h?.editableInformation,onChangeOfEditableOption:b,onClickSaveEdit:h?.onClickSave,onClickCancelEdit:h?.onClickCancel,onClickDeleteEntry:h?.onClickDelete})]},`form-${s}-${E}`)):a.isExpandable?e.jsx(J,{children:`No entry yet on ${a.legend}. Click "+" button to add entry.`}):""]}),a.isExpandable&&e.jsx(K,{className:"add-input-button-space",children:e.jsx($,{id:`expand-${a.legend}-inputs`,buttonType:"button",text:"+",onClick:g,className:"add-input-entry"})})]},`${a.legend}-${y}`)):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,y)=>e.jsxs(v.Fragment,{children:[a.type==="textarea"&&e.jsx(F,{...a,id:a.id??`${o}-input`,labelClass:m,inputClass:l,idx:y,className:d}),(a.type==="radio"||a.type==="checkbox")&&e.jsx(F,{...a,id:a.id??`${o}-input`,labelClass:m,inputClass:l,idx:y,className:d}),a.type!=="textarea"&&a.type!=="radio"&&a.type!=="checkbox"&&e.jsx(F,{...a,id:a.id??`${o}-input`,labelClass:m,inputClass:l,idx:y,className:d}),a.isEditable&&a.editing&&e.jsx(M,{legend:`${o} ${y+1}`,idx:y,editableInformation:a?.editableInformation,onChangeOfEditableOption:b,onClickSaveEdit:a?.onClickSave,onClickCancelEdit:a?.onClickEdit,onClickDeleteEntry:a?.onClickDelete})]},`form-${s}-${y}`)):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($,{id:`expand-${o}-inputs`,buttonType:"button",text:"+",onClick:g,className:"add-input-entry"})})]}),e.jsx(de,{id:s,hasSubmit:u,submitText:j,handleSubmit:T,hasEdit:C,editText:O,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")}},q=v.createContext(void 0),ge=({children:t})=>{const[o,i]=v.useState(L),s=()=>{i(r=>r===L?Q:L)};return e.jsx(q.Provider,{value:{currentTheme:o,toggleTheme:s},children:e.jsx(c.ThemeProvider,{theme:o,children:t})})},ue=()=>v.useContext(q);exports.DynamicForm=be;exports.ThemeContext=q;exports.ThemeContextProvider=ge;exports.breakpoints=fe;exports.darkTheme=Q;exports.lightTheme=L;exports.useTheme=ue;
171
+ `,be=({fieldsets:t=null,legendText:o,isExpandable:i,id:a,formInputs:r,labelAndInputContainerClass:d,labelClass:m,inputClass:l,handleEditableInputEntryChange:b,handleAddingInputEntry:u,hasSubmit:y=!1,hasCancel:f=!1,hasDelete:p=!1,hasEdit:N=!1,submitText:j,handleSubmitForm:w,handleSubmit:T,cancelText:A,handleCancel:R,deleteText:B,handleDelete:S,editText:q,handleEdit:k,className:C,children:D})=>e.jsxs(me,{id:`${a}-form`,className:C,onSubmit:w,children:[t?t.map((s,$)=>e.jsxs(G,{className:`${a}-fieldset-wrapper`,children:[e.jsxs(H,{id:`${a}-form-fieldset-${$}`,className:`${s.legend}-fieldset`,children:[s.legend&&e.jsx(U,{children:s.legend}),s.inputs.length!==0?s.inputs.map((h,E)=>e.jsxs(v.Fragment,{children:[h.type==="textarea"&&e.jsx(F,{...h,id:h.id??`${s.legend}-input`,labelClass:m,inputClass:l,idx:E,className:d}),(h.type==="radio"||h.type==="checkbox")&&e.jsx(F,{...h,id:h.id??`${s.legend}-input`,labelClass:m,inputClass:l,idx:E,className:d}),h.type!=="textarea"&&h.type!=="radio"&&h.type!=="checkbox"&&e.jsx(F,{...h,id:h.id??`${s.legend}-input`,labelClass:m,inputClass:l,idx:E,className:d}),h.isEditable&&h.editing&&e.jsx(M,{legend:`${s.legend} ${E+1}`,idx:E,editableInformation:h?.editableInformation,onChangeOfEditableOption:b,onClickSaveEdit:h?.onClickSave,onClickCancelEdit:h?.onClickCancel,onClickDeleteEntry:h?.onClickDelete})]},`form-${a}-${E}`)):s.isExpandable?e.jsx(J,{children:`No entry yet on ${s.legend}. Click "+" button to add entry.`}):""]}),s.isExpandable&&e.jsx(K,{className:"add-input-button-space",children:e.jsx(g,{id:`expand-${s.legend}-inputs`,buttonType:"button",text:"+",onClick:u,className:"add-input-entry"})})]},`${s.legend}-${$}`)):e.jsxs(G,{className:`${a}-fieldset-wrapper`,children:[e.jsxs(H,{id:`${a}-form-fieldset`,className:`${o}-fieldset`,children:[o&&e.jsx(U,{children:o}),!t&&r&&r.length!==0?r.map((s,$)=>e.jsxs(v.Fragment,{children:[s.type==="textarea"&&e.jsx(F,{...s,id:s.id??`${o}-input`,labelClass:m,inputClass:l,idx:$,className:d}),(s.type==="radio"||s.type==="checkbox")&&e.jsx(F,{...s,id:s.id??`${o}-input`,labelClass:m,inputClass:l,idx:$,className:d}),s.type!=="textarea"&&s.type!=="radio"&&s.type!=="checkbox"&&e.jsx(F,{...s,id:s.id??`${o}-input`,labelClass:m,inputClass:l,idx:$,className:d}),s.isEditable&&s.editing&&e.jsx(M,{legend:`${o} ${$+1}`,idx:$,editableInformation:s?.editableInformation,onChangeOfEditableOption:b,onClickSaveEdit:s?.onClickSave,onClickCancelEdit:s?.onClickEdit,onClickDeleteEntry:s?.onClickDelete})]},`form-${a}-${$}`)):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:a,hasSubmit:y,submitText:j,handleSubmit:T,hasEdit:N,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),a=()=>{i(r=>r===L?Q:L)};return e.jsx(O.Provider,{value:{currentTheme:o,toggleTheme:a},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
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
- import s, { ThemeProvider as I } from "styled-components";
4
- const n = {
3
+ import c, { ThemeProvider as I } from "styled-components";
4
+ const a = {
5
5
  fonts: {
6
6
  secondary: "Raleway",
7
7
  tertiary: "Lato",
@@ -32,15 +32,15 @@ const n = {
32
32
  thin: "0.0625rem",
33
33
  light: "0.125rem"
34
34
  }
35
- }, ee = s.button`
35
+ }, ee = c.button`
36
36
  display: flex;
37
37
  align-items: center;
38
38
  justify-content: center;
39
39
  background-color: ${({ theme: e }) => e.colors.blue || "blue"};
40
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};
41
+ border: ${a.borderThickness.light} solid ${({ theme: e }) => e.colors.text || "black"};
42
+ border-radius: ${a.borderRadius.xlarge};
43
+ padding: ${a.spacing.xxxsmall} ${a.spacing.small};
44
44
  margin: 0.125rem;
45
45
  width: auto;
46
46
  cursor: pointer;
@@ -48,7 +48,7 @@ const n = {
48
48
 
49
49
  &:hover {
50
50
  background-color: lightblue;
51
- border: ${n.borderThickness.light} solid gray;
51
+ border: ${a.borderThickness.light} solid gray;
52
52
  }
53
53
 
54
54
  & .button-icon-text-space {
@@ -58,70 +58,65 @@ const n = {
58
58
  & .button-icon-text-space svg {
59
59
  max-width: 100%;
60
60
  }
61
- `, te = s.div`
61
+ `, te = c.div`
62
62
  width: 100%;
63
63
  display: flex;
64
64
  flex-direction: row;
65
65
  align-items: center;
66
66
  justify-content: center;
67
- `, ne = s.img`
67
+ `, ae = c.img`
68
68
  maxwidth: 100%;
69
- `, ae = s.span`
70
- font-size: ${n.fontSize.xsmall};
71
- font-weight: ${n.fontWeight.medium};
72
- font-family: ${n.fonts.tertiary}, ${n.fonts.fallback};
69
+ `, ne = c.span`
70
+ font-size: ${a.fontSize.xsmall};
71
+ font-weight: ${a.fontWeight.medium};
72
+ font-family: ${a.fonts.tertiary}, ${a.fonts.fallback};
73
73
  display: flex;
74
74
  align-items: center;
75
75
  justify-content: center;
76
- `, y = ({
76
+ `, $ = ({
77
77
  onClick: e,
78
- id: o,
78
+ id: i,
79
79
  buttonType: l,
80
- source: i,
80
+ source: n,
81
81
  svg: r,
82
82
  alt: d = "alt-button-icon",
83
83
  text: m = "",
84
- className: c = "",
84
+ className: s = "",
85
85
  dataAttributes: h = {}
86
- }) => {
87
- const x = h ? Object.fromEntries(
88
- Object.entries(h).map(([$, u]) => [`data-${$}`, u])
89
- ) : {};
90
- return /* @__PURE__ */ t(
91
- ee,
92
- {
93
- onClick: e,
94
- id: o,
95
- type: l,
96
- className: c,
97
- ...x,
98
- children: /* @__PURE__ */ g(te, { className: "button-icon-text-space", children: [
99
- i ? /* @__PURE__ */ t(ne, { src: i, alt: d }) : r || "",
100
- m && /* @__PURE__ */ t(ae, { id: o, children: m })
101
- ] })
102
- }
103
- );
104
- }, oe = s.div`
86
+ }) => /* @__PURE__ */ t(
87
+ ee,
88
+ {
89
+ onClick: e,
90
+ id: i,
91
+ type: l,
92
+ className: s,
93
+ ...h,
94
+ children: /* @__PURE__ */ g(te, { className: "button-icon-text-space", children: [
95
+ n ? /* @__PURE__ */ t(ae, { src: n, alt: d }) : r || "",
96
+ m && /* @__PURE__ */ t(ne, { id: i, children: m })
97
+ ] })
98
+ }
99
+ ), oe = c.div`
105
100
  display: flex;
106
101
  flex-direction: column;
107
102
  align-items: left;
108
103
  width: 100%;
109
- margin-bottom: ${n.spacing.small};
110
- `, ie = s.div`
104
+ margin-bottom: ${a.spacing.small};
105
+ `, ie = c.div`
111
106
  display: flex;
112
- gap: ${n.spacing.xsmall};
107
+ gap: ${a.spacing.xsmall};
113
108
  width: auto;
114
109
  height: auto;
115
- `, le = s.label`
110
+ `, le = c.label`
116
111
  display: flex;
117
112
  align-items: center;
118
113
  justify-content:center;
119
114
  height: auto;
120
115
  flex-direction: ${(e) => e.$labelFlexDirection || "column"};
121
- font-family: ${n.fonts.secondary}, ${n.fonts.fallback};
122
- font-size: ${n.fontSize.xsmall};
123
- font-weight: ${n.fontWeight.bold};
124
- gap: ${n.spacing.xxsmall};
116
+ font-family: ${a.fonts.secondary}, ${a.fonts.fallback};
117
+ font-size: ${a.fontSize.xsmall};
118
+ font-weight: ${a.fontWeight.bold};
119
+ gap: ${a.spacing.xxsmall};
125
120
 
126
121
  & .label-icon-container img,
127
122
  & .label-icon-container svg {
@@ -129,74 +124,74 @@ const n = {
129
124
  height: auto;
130
125
  object-fit: contain;
131
126
  }
132
- `, ce = s.span`
133
- font-weight: ${n.fontWeight.bolder};
134
- `, se = s.div`
127
+ `, se = c.span`
128
+ font-weight: ${a.fontWeight.bolder};
129
+ `, ce = c.div`
135
130
  max-width: 100%;
136
131
  display: flex;
137
132
  align-items: center;
138
- `, re = s.span`
139
- font-weight: ${n.fontWeight.light};
133
+ `, re = c.span`
134
+ font-weight: ${a.fontWeight.light};
140
135
  `, P = ({
141
136
  htmlFor: e,
142
- textLabel: o,
137
+ textLabel: i,
143
138
  additionalInfo: l,
144
- $labelFlexDirection: i,
139
+ $labelFlexDirection: n,
145
140
  source: r,
146
141
  svg: d,
147
142
  className: m,
148
- children: c
149
- }) => /* @__PURE__ */ g(le, { htmlFor: e, className: m, $labelFlexDirection: i, children: [
150
- (r || d) && /* @__PURE__ */ t(se, { className: "label-icon-container", children: r ? /* @__PURE__ */ t("img", { src: r, alt: `${e}-label-icon` }) : d || "" }),
151
- /* @__PURE__ */ t(ce, { className: "main-label", children: o }),
143
+ children: s
144
+ }) => /* @__PURE__ */ g(le, { htmlFor: e, className: m, $labelFlexDirection: n, children: [
145
+ (r || d) && /* @__PURE__ */ t(ce, { className: "label-icon-container", children: r ? /* @__PURE__ */ t("img", { src: r, alt: `${e}-label-icon` }) : d || "" }),
146
+ /* @__PURE__ */ t(se, { className: "main-label", children: i }),
152
147
  l && /* @__PURE__ */ t(re, { className: "additional-info", children: l }),
153
- c
154
- ] }), q = s.input`
148
+ s
149
+ ] }), q = c.input`
155
150
  display: flex;
156
151
  place-content: center;
157
- font-family: ${n.fonts.secondary}, ${n.fonts.fallback};
158
- font-size: ${n.fontSize.xsmall};
152
+ font-family: ${a.fonts.secondary}, ${a.fonts.fallback};
153
+ font-size: ${a.fontSize.xsmall};
159
154
  line-height: 1.75;
160
- padding: ${n.spacing.xxxsmall} ${n.spacing.xsmall};
155
+ padding: ${a.spacing.xxxsmall} ${a.spacing.xsmall};
161
156
  max-width: 100%;
162
157
  height: auto;
163
158
  background-color: #FFFFFF;
164
159
  outline: none;
165
- border: ${n.borderThickness.thin} solid #000000;
166
- border-radius: ${n.borderRadius.xsmall};
160
+ border: ${a.borderThickness.thin} solid #000000;
161
+ border-radius: ${a.borderRadius.xsmall};
167
162
 
168
163
  &:focus{
169
- border: ${n.borderThickness.thin} solid ${({ theme: e }) => e.colors.teal};
164
+ border: ${a.borderThickness.thin} solid ${({ theme: e }) => e.colors.teal};
170
165
  }
171
- `, de = s.textarea`
166
+ `, de = c.textarea`
172
167
  display: flex;
173
168
  place-content: center;
174
- border: ${n.borderThickness.light} solid ${({ theme: e }) => e.colors.text};
175
- border-radius: ${n.borderRadius.small};
169
+ border: ${a.borderThickness.light} solid ${({ theme: e }) => e.colors.text};
170
+ border-radius: ${a.borderRadius.small};
176
171
  outline: none;
177
- line-height: ${n.spacing.small};
178
- padding: ${n.spacing.xxxsmall};
179
- font-family: ${n.fonts.secondary}, ${n.fonts.fallback};
180
- font-size: ${n.fontSize.xsmall};
172
+ line-height: ${a.spacing.small};
173
+ padding: ${a.spacing.xxxsmall};
174
+ font-family: ${a.fonts.secondary}, ${a.fonts.fallback};
175
+ font-size: ${a.fontSize.xsmall};
181
176
  max-width: 100%;
182
177
  resize: none;
183
178
  overflow-y: auto;
184
- `, z = X((e, o) => {
185
- const { type: l, id: i, onChange: r, isRequired: d, dataAttributes: m, disabled: c, className: h } = e;
179
+ `, j = X((e, i) => {
180
+ const { type: l, id: n, onChange: r, isRequired: d, dataAttributes: m, disabled: s, className: h } = e;
186
181
  if (l === "textarea") {
187
- const { rows: N = 5, cols: E = 30, value: D, ...S } = e;
182
+ const { rows: N = 5, cols: E = 30, value: A, ...S } = e;
188
183
  return /* @__PURE__ */ t(
189
184
  de,
190
185
  {
191
- id: i,
186
+ id: n,
192
187
  onChange: r,
193
- value: D,
188
+ value: A,
194
189
  rows: N,
195
190
  cols: E,
196
191
  ...m,
197
192
  className: h,
198
- ref: o,
199
- disabled: c,
193
+ ref: i,
194
+ disabled: s,
200
195
  required: d
201
196
  }
202
197
  );
@@ -206,72 +201,72 @@ const n = {
206
201
  return /* @__PURE__ */ t(
207
202
  q,
208
203
  {
209
- ref: o,
204
+ ref: i,
210
205
  type: "checkbox",
211
- id: i,
206
+ id: n,
212
207
  checked: N,
213
208
  onChange: r,
214
- disabled: c,
209
+ disabled: s,
215
210
  className: h,
216
211
  ...m
217
212
  }
218
213
  );
219
214
  }
220
- const x = e, { value: $, pattern: u, placeholderText: k, ...C } = x;
215
+ const x = e, { value: p, pattern: u, placeholderText: k, ...C } = x;
221
216
  return /* @__PURE__ */ t(
222
217
  q,
223
218
  {
224
- id: i,
225
- name: i,
219
+ id: n,
220
+ name: n,
226
221
  placeholder: k,
227
222
  onChange: r,
228
- value: $,
223
+ value: p,
229
224
  type: l,
230
225
  required: d,
231
226
  ...m,
232
227
  className: h,
233
- ref: o,
234
- disabled: c,
228
+ ref: i,
229
+ disabled: s,
235
230
  pattern: u
236
231
  }
237
232
  );
238
233
  }), T = (e) => {
239
234
  const {
240
- className: o,
235
+ className: i,
241
236
  type: l,
242
- id: i,
237
+ id: n,
243
238
  textLabel: r,
244
239
  additionalInfo: d,
245
240
  $labelFlexDirection: m,
246
- svg: c,
241
+ svg: s,
247
242
  labelClass: h,
248
243
  onChange: x,
249
- isRequired: $,
244
+ isRequired: p,
250
245
  dataAttributes: u,
251
246
  inputClass: k,
252
247
  ref: C,
253
248
  disabled: N,
254
249
  isEditable: E,
255
- editIcon: D,
250
+ editIcon: A,
256
251
  onClickEdit: S,
257
252
  deleteIcon: L,
258
253
  onClickDelete: B,
259
- idx: j,
254
+ idx: z,
260
255
  children: R
261
256
  } = e;
262
- return /* @__PURE__ */ g(oe, { className: `${o} ${i.replace("#", "")}-label-input-container`, children: [
263
- l !== "radio" && l !== "checkbox" && /* @__PURE__ */ t(P, { htmlFor: i, textLabel: r, additionalInfo: d, $labelFlexDirection: m, svg: c, className: h }),
257
+ return /* @__PURE__ */ g(oe, { className: `${i} ${n.replace("#", "")}-label-input-container`, children: [
258
+ l !== "radio" && l !== "checkbox" && /* @__PURE__ */ t(P, { htmlFor: n, textLabel: r, additionalInfo: d, $labelFlexDirection: m, svg: s, className: h }),
264
259
  l !== "radio" && l !== "checkbox" && l === "textarea" && (() => {
265
- const { rows: w = 5, cols: F = 30, value: A, ...a } = e;
260
+ const { rows: w = 5, cols: F = 30, value: D, ...o } = e;
266
261
  return /* @__PURE__ */ t(
267
- z,
262
+ j,
268
263
  {
269
- id: i,
270
- name: i,
264
+ id: n,
265
+ name: n,
271
266
  type: "textarea",
272
- isRequired: $,
267
+ isRequired: p,
273
268
  onChange: x,
274
- value: A,
269
+ value: D,
275
270
  rows: w,
276
271
  cols: F,
277
272
  dataAttributes: u,
@@ -282,22 +277,22 @@ const n = {
282
277
  );
283
278
  })(),
284
279
  l !== "radio" && l !== "checkbox" && l !== "textarea" && (() => {
285
- const w = e, { value: F, pattern: A, placeholderText: a, ...p } = w;
280
+ const w = e, { value: F, pattern: D, placeholderText: o, ...y } = w;
286
281
  return /* @__PURE__ */ t(
287
- z,
282
+ j,
288
283
  {
289
- id: i,
290
- name: i,
291
- placeholderText: a,
284
+ id: n,
285
+ name: n,
286
+ placeholderText: o,
292
287
  onChange: x,
293
288
  value: F,
294
289
  type: l,
295
- isRequired: $,
290
+ isRequired: p,
296
291
  dataAttributes: u,
297
292
  className: k,
298
293
  ref: C,
299
294
  disabled: N,
300
- pattern: A
295
+ pattern: D
301
296
  }
302
297
  );
303
298
  })(),
@@ -305,13 +300,13 @@ const n = {
305
300
  const { checked: w, ...F } = e;
306
301
  return /* @__PURE__ */ g(V, { children: [
307
302
  /* @__PURE__ */ t(
308
- z,
303
+ j,
309
304
  {
310
305
  ref: C,
311
306
  type: "checkbox",
312
- name: i,
313
- id: i,
314
- isRequired: $,
307
+ name: n,
308
+ id: n,
309
+ isRequired: p,
315
310
  checked: w,
316
311
  onChange: x,
317
312
  disabled: N,
@@ -319,125 +314,125 @@ const n = {
319
314
  dataAttributes: u
320
315
  }
321
316
  ),
322
- /* @__PURE__ */ t(P, { htmlFor: i, textLabel: r, additionalInfo: d, $labelFlexDirection: m, svg: c, className: h })
317
+ /* @__PURE__ */ t(P, { htmlFor: n, textLabel: r, additionalInfo: d, $labelFlexDirection: m, svg: s, className: h })
323
318
  ] });
324
319
  })(),
325
320
  E && /* @__PURE__ */ g(ie, { className: "input-edit-buttons", children: [
326
- /* @__PURE__ */ t(y, { id: `editable-${i}-edit-btn`, svg: D, buttonType: "button", onClick: S, className: `edit-radio-${j}`, dataAttributes: u }),
327
- /* @__PURE__ */ t(y, { id: `editable-${i}-delete-btn`, svg: L, buttonType: "button", onClick: B, className: `delete-radio-${j}`, dataAttributes: u })
321
+ /* @__PURE__ */ t($, { id: `editable-${n}-edit-btn`, svg: A, buttonType: "button", onClick: S, className: `edit-radio-${z}`, dataAttributes: u }),
322
+ /* @__PURE__ */ t($, { id: `editable-${n}-delete-btn`, svg: L, buttonType: "button", onClick: B, className: `delete-radio-${z}`, dataAttributes: u })
328
323
  ] }),
329
324
  R
330
325
  ] });
331
- }, me = s.fieldset`
326
+ }, me = c.fieldset`
332
327
  padding: 0;
333
328
  height: auto;
334
329
  width: 100%;
335
- `, be = s.legend`
336
- font-size: ${n.spacing.medium};
330
+ `, be = c.legend`
331
+ font-size: ${a.spacing.medium};
337
332
  font-weight: 500;
338
- margin: 0 auto ${n.spacing.small} auto;
333
+ margin: 0 auto ${a.spacing.small} auto;
339
334
  text-align: center;
340
- font-family: ${n.fonts.secondary}, ${n.fonts.fallback};
341
- `, he = s.div`
335
+ font-family: ${a.fonts.secondary}, ${a.fonts.fallback};
336
+ `, he = c.div`
342
337
  display: flex;
343
338
  flex-direction: column;
344
339
  align-items: flex-start;
345
340
  width: 100%;
346
- margin-bottom: ${n.spacing.small};
347
- `, fe = s.div`
341
+ margin-bottom: ${a.spacing.small};
342
+ `, fe = c.div`
348
343
  display: flex;
349
344
  justify-content: space-between;
350
345
  width: 100%;
351
346
  `, M = ({
352
347
  legend: e,
353
- idx: o,
348
+ idx: i,
354
349
  editableInformation: l,
355
- onChangeOfEditableOption: i,
350
+ onChangeOfEditableOption: n,
356
351
  onClickSaveEdit: r,
357
352
  onClickCancelEdit: d,
358
353
  onClickDeleteEntry: m
359
354
  }) => /* @__PURE__ */ g(me, { className: "editable-selection-fieldset", children: [
360
- /* @__PURE__ */ t(be, { children: `${e} ${o + 1}` }),
361
- l.map((c, h) => /* @__PURE__ */ t(he, { className: "editable-selection-container", children: /* @__PURE__ */ t(
362
- z,
355
+ /* @__PURE__ */ t(be, { children: `${e} ${i + 1}` }),
356
+ l.map((s, h) => /* @__PURE__ */ t(he, { className: "editable-selection-container", children: /* @__PURE__ */ t(
357
+ j,
363
358
  {
364
359
  id: `editable-selection-${h}`,
365
360
  name: `editable-selection-${h}`,
366
- placeholderText: c.name.charAt(0).toUpperCase() + c.name.slice(1),
367
- onChange: i,
368
- value: c.info,
369
- type: c.type,
361
+ placeholderText: s.name.charAt(0).toUpperCase() + s.name.slice(1),
362
+ onChange: n,
363
+ value: s.info,
364
+ type: s.type,
370
365
  isRequired: !0,
371
366
  className: "editable-selection",
372
367
  dataAttributes: {
373
368
  "data-index": h,
374
369
  //* should be idx to correspond to radio button index and not with input increment
375
- "data-key": c.info
370
+ "data-key": s.info
376
371
  }
377
372
  }
378
- ) }, `${c.name}-${h}`)),
373
+ ) }, `${s.name}-${h}`)),
379
374
  /* @__PURE__ */ g(fe, { className: "editable-selection-button-space", children: [
380
- /* @__PURE__ */ t(y, { id: `editable-selection-${o}-submit`, buttonType: "submit", text: "Save", onClick: r, className: "editable-selection-btn", dataAttributes: { "data-index": o } }),
381
- /* @__PURE__ */ t(y, { id: `editable-selection-${o}-cancel`, buttonType: "button", text: "Cancel", onClick: d, className: "editable-selection-btn", dataAttributes: { "data-index": o } }),
382
- /* @__PURE__ */ t(y, { id: `editable-selection-${o}-delete`, buttonType: "button", text: "Delete", onClick: m, className: "editable-selection-btn", dataAttributes: { "data-index": o } })
375
+ /* @__PURE__ */ t($, { id: `editable-selection-${i}-submit`, buttonType: "submit", text: "Save", onClick: r, className: "editable-selection-btn", dataAttributes: { "data-index": i } }),
376
+ /* @__PURE__ */ t($, { id: `editable-selection-${i}-cancel`, buttonType: "button", text: "Cancel", onClick: d, className: "editable-selection-btn", dataAttributes: { "data-index": i } }),
377
+ /* @__PURE__ */ t($, { id: `editable-selection-${i}-delete`, buttonType: "button", text: "Delete", onClick: m, className: "editable-selection-btn", dataAttributes: { "data-index": i } })
383
378
  ] })
384
- ] }), ge = s.div`
379
+ ] }), ge = c.div`
385
380
  display: flex;
386
381
  justify-content: space-between;
387
382
  max-width: 100%;
388
383
  `, ue = ({
389
384
  id: e,
390
- hasSubmit: o,
385
+ hasSubmit: i,
391
386
  submitText: l,
392
- handleSubmit: i,
387
+ handleSubmit: n,
393
388
  hasEdit: r,
394
389
  editText: d,
395
390
  handleEdit: m,
396
- hasCancel: c,
391
+ hasCancel: s,
397
392
  cancelText: h,
398
393
  handleCancel: x,
399
- hasDelete: $,
394
+ hasDelete: p,
400
395
  deleteText: u,
401
396
  handleDelete: k
402
397
  }) => /* @__PURE__ */ g(ge, { className: "form-main-button-container", children: [
403
- o && /* @__PURE__ */ t(y, { id: `form-${e}-submit`, buttonType: "submit", text: l ?? "Submit", onClick: i, className: "submit-form-btn" }),
404
- r && /* @__PURE__ */ t(y, { id: `form-${e}-edit`, buttonType: "button", text: d ?? "Edit", onClick: m, className: "edit-form-btn" }),
405
- c && /* @__PURE__ */ t(y, { id: `form-${e}-cancel`, buttonType: "button", text: h ?? "Cancel", onClick: x, className: "cancel-form-btn" }),
406
- $ && /* @__PURE__ */ t(y, { id: `form-${e}-delete`, buttonType: "button", text: u ?? "Delete", onClick: k, className: "delete-form-btn" })
407
- ] }), U = s.legend`
408
- font-size: ${n.spacing.medium};
398
+ i && /* @__PURE__ */ t($, { id: `form-${e}-submit`, buttonType: "submit", text: l ?? "Submit", onClick: n, className: "submit-form-btn" }),
399
+ r && /* @__PURE__ */ t($, { id: `form-${e}-edit`, buttonType: "button", text: d ?? "Edit", onClick: m, className: "edit-form-btn" }),
400
+ s && /* @__PURE__ */ t($, { id: `form-${e}-cancel`, buttonType: "button", text: h ?? "Cancel", onClick: x, className: "cancel-form-btn" }),
401
+ p && /* @__PURE__ */ t($, { id: `form-${e}-delete`, buttonType: "button", text: u ?? "Delete", onClick: k, className: "delete-form-btn" })
402
+ ] }), U = c.legend`
403
+ font-size: ${a.spacing.medium};
409
404
  font-weight: 500;
410
- margin-bottom: ${n.spacing.small};
405
+ margin-bottom: ${a.spacing.small};
411
406
  width: auto;
412
407
  text-align: center;
413
- font-family: ${n.fonts.secondary}, ${n.fonts.fallback};
414
- `, H = s.fieldset`
408
+ font-family: ${a.fonts.secondary}, ${a.fonts.fallback};
409
+ `, H = c.fieldset`
415
410
  padding: 0;
416
411
  height: auto;
417
412
  width: 100%;
418
- `, G = s.div`
419
- padding: ${n.spacing.small};
413
+ `, G = c.div`
414
+ padding: ${a.spacing.small};
420
415
  height: auto;
421
416
  width: 100%;
422
- `, J = s.div`
417
+ `, J = c.div`
423
418
  display: flex;
424
419
  justify-content: center;
425
420
  align-items: center;
426
421
  width: 100%;
427
422
  height: auto;
428
- font-family: ${n.fonts.tertiary}, ${n.fonts.fallback};
429
- font-size: ${n.fontSize.xsmall};
430
- font-weight: ${n.fontWeight.bold};
431
- `, xe = s.form`
423
+ font-family: ${a.fonts.tertiary}, ${a.fonts.fallback};
424
+ font-size: ${a.fontSize.xsmall};
425
+ font-weight: ${a.fontWeight.bold};
426
+ `, $e = c.form`
432
427
  display: flex;
433
428
  flex-direction: column;
434
429
  align-items: center;
435
430
  width: 100%;
436
- `, K = s.div`
431
+ `, K = c.div`
437
432
  display: flex;
438
433
  justify-content: space-between;
439
434
  width: 100%;
440
- `, $e = s.div`
435
+ `, xe = c.div`
441
436
  width: 100%;
442
437
  display: flex;
443
438
  flex-direction: column;
@@ -446,47 +441,47 @@ const n = {
446
441
  `, Ce = ({
447
442
  fieldsets: e = null,
448
443
  //* if a form has differrent fieldsets
449
- legendText: o,
444
+ legendText: i,
450
445
  //* if form has no fieldsets, depends if you have fieldset for solo form
451
446
  isExpandable: l,
452
447
  //* if form has no fieldsets this is default to false - to add inputs
453
- id: i,
448
+ id: n,
454
449
  formInputs: r,
455
450
  //* object that contains the input fields information to make it reusable
456
451
  labelAndInputContainerClass: d,
457
452
  labelClass: m,
458
- inputClass: c,
453
+ inputClass: s,
459
454
  handleEditableInputEntryChange: h,
460
455
  //* handles change on editable inputs
461
456
  handleAddingInputEntry: x,
462
- hasSubmit: $ = !1,
457
+ hasSubmit: p = !1,
463
458
  hasCancel: u = !1,
464
459
  hasDelete: k = !1,
465
460
  hasEdit: C = !1,
466
461
  submitText: N,
467
462
  handleSubmitForm: E,
468
- handleSubmit: D,
463
+ handleSubmit: A,
469
464
  cancelText: S,
470
465
  handleCancel: L,
471
466
  deleteText: B,
472
- handleDelete: j,
467
+ handleDelete: z,
473
468
  editText: R,
474
469
  handleEdit: w,
475
470
  className: F,
476
- children: A
471
+ children: D
477
472
  //* if there are nodes to be inserted after submit/edit/cancel buttons usually in login or signup forms
478
- }) => /* @__PURE__ */ g(xe, { id: `${i}-form`, className: F, onSubmit: E, children: [
479
- e ? e.map((a, p) => /* @__PURE__ */ g(G, { children: [
480
- /* @__PURE__ */ g(H, { id: `${i}-form-fieldset-${p}`, className: "form-fieldset", children: [
481
- a.legend && /* @__PURE__ */ t(U, { children: a.legend }),
482
- a.inputs.length !== 0 ? a.inputs.map((f, v) => /* @__PURE__ */ g(W.Fragment, { children: [
473
+ }) => /* @__PURE__ */ g($e, { id: `${n}-form`, className: F, onSubmit: E, children: [
474
+ e ? e.map((o, y) => /* @__PURE__ */ g(G, { className: `${n}-fieldset-wrapper`, children: [
475
+ /* @__PURE__ */ g(H, { id: `${n}-form-fieldset-${y}`, className: `${o.legend}-fieldset`, children: [
476
+ o.legend && /* @__PURE__ */ t(U, { children: o.legend }),
477
+ o.inputs.length !== 0 ? o.inputs.map((f, v) => /* @__PURE__ */ g(W.Fragment, { children: [
483
478
  f.type === "textarea" && /* @__PURE__ */ t(
484
479
  T,
485
480
  {
486
481
  ...f,
487
- id: f.id ?? `${a.legend}-input`,
482
+ id: f.id ?? `${o.legend}-input`,
488
483
  labelClass: m,
489
- inputClass: c,
484
+ inputClass: s,
490
485
  idx: v,
491
486
  className: d
492
487
  }
@@ -495,9 +490,9 @@ const n = {
495
490
  T,
496
491
  {
497
492
  ...f,
498
- id: f.id ?? `${a.legend}-input`,
493
+ id: f.id ?? `${o.legend}-input`,
499
494
  labelClass: m,
500
- inputClass: c,
495
+ inputClass: s,
501
496
  idx: v,
502
497
  className: d
503
498
  }
@@ -506,9 +501,9 @@ const n = {
506
501
  T,
507
502
  {
508
503
  ...f,
509
- id: f.id ?? `${a.legend}-input`,
504
+ id: f.id ?? `${o.legend}-input`,
510
505
  labelClass: m,
511
- inputClass: c,
506
+ inputClass: s,
512
507
  idx: v,
513
508
  className: d
514
509
  }
@@ -516,7 +511,7 @@ const n = {
516
511
  f.isEditable && f.editing && /* @__PURE__ */ t(
517
512
  M,
518
513
  {
519
- legend: `${a.legend} ${v + 1}`,
514
+ legend: `${o.legend} ${v + 1}`,
520
515
  idx: v,
521
516
  editableInformation: f?.editableInformation,
522
517
  onChangeOfEditableOption: h,
@@ -525,69 +520,69 @@ const n = {
525
520
  onClickDeleteEntry: f?.onClickDelete
526
521
  }
527
522
  )
528
- ] }, `form-${i}-${v}`)) : a.isExpandable ? /* @__PURE__ */ t(J, { children: `No entry yet on ${a.legend}. Click "+" button to add entry.` }) : ""
523
+ ] }, `form-${n}-${v}`)) : o.isExpandable ? /* @__PURE__ */ t(J, { children: `No entry yet on ${o.legend}. Click "+" button to add entry.` }) : ""
529
524
  ] }),
530
- a.isExpandable && /* @__PURE__ */ t(K, { className: "add-input-button-space", children: /* @__PURE__ */ t(y, { id: `expand-${a.legend}-inputs`, buttonType: "button", text: "+", onClick: x, className: "add-input-entry" }) })
531
- ] }, `${a.legend}-${p}`)) : /* @__PURE__ */ g(G, { children: [
532
- /* @__PURE__ */ g(H, { id: `${i}-form-fieldset`, className: "form-fieldset", children: [
533
- o && /* @__PURE__ */ t(U, { children: o }),
534
- !e && r && r.length !== 0 ? r.map((a, p) => /* @__PURE__ */ g(W.Fragment, { children: [
535
- a.type === "textarea" && /* @__PURE__ */ t(
525
+ o.isExpandable && /* @__PURE__ */ t(K, { className: "add-input-button-space", children: /* @__PURE__ */ t($, { id: `expand-${o.legend}-inputs`, buttonType: "button", text: "+", onClick: x, className: "add-input-entry" }) })
526
+ ] }, `${o.legend}-${y}`)) : /* @__PURE__ */ g(G, { className: `${n}-fieldset-wrapper`, children: [
527
+ /* @__PURE__ */ g(H, { id: `${n}-form-fieldset`, className: `${i}-fieldset`, children: [
528
+ i && /* @__PURE__ */ t(U, { children: i }),
529
+ !e && r && r.length !== 0 ? r.map((o, y) => /* @__PURE__ */ g(W.Fragment, { children: [
530
+ o.type === "textarea" && /* @__PURE__ */ t(
536
531
  T,
537
532
  {
538
- ...a,
539
- id: a.id ?? `${o}-input`,
533
+ ...o,
534
+ id: o.id ?? `${i}-input`,
540
535
  labelClass: m,
541
- inputClass: c,
542
- idx: p,
536
+ inputClass: s,
537
+ idx: y,
543
538
  className: d
544
539
  }
545
540
  ),
546
- (a.type === "radio" || a.type === "checkbox") && /* @__PURE__ */ t(
541
+ (o.type === "radio" || o.type === "checkbox") && /* @__PURE__ */ t(
547
542
  T,
548
543
  {
549
- ...a,
550
- id: a.id ?? `${o}-input`,
544
+ ...o,
545
+ id: o.id ?? `${i}-input`,
551
546
  labelClass: m,
552
- inputClass: c,
553
- idx: p,
547
+ inputClass: s,
548
+ idx: y,
554
549
  className: d
555
550
  }
556
551
  ),
557
- a.type !== "textarea" && a.type !== "radio" && a.type !== "checkbox" && /* @__PURE__ */ t(
552
+ o.type !== "textarea" && o.type !== "radio" && o.type !== "checkbox" && /* @__PURE__ */ t(
558
553
  T,
559
554
  {
560
- ...a,
561
- id: a.id ?? `${o}-input`,
555
+ ...o,
556
+ id: o.id ?? `${i}-input`,
562
557
  labelClass: m,
563
- inputClass: c,
564
- idx: p,
558
+ inputClass: s,
559
+ idx: y,
565
560
  className: d
566
561
  }
567
562
  ),
568
- a.isEditable && a.editing && /* @__PURE__ */ t(
563
+ o.isEditable && o.editing && /* @__PURE__ */ t(
569
564
  M,
570
565
  {
571
- legend: `${o} ${p + 1}`,
572
- idx: p,
573
- editableInformation: a?.editableInformation,
566
+ legend: `${i} ${y + 1}`,
567
+ idx: y,
568
+ editableInformation: o?.editableInformation,
574
569
  onChangeOfEditableOption: h,
575
- onClickSaveEdit: a?.onClickSave,
576
- onClickCancelEdit: a?.onClickEdit,
577
- onClickDeleteEntry: a?.onClickDelete
570
+ onClickSaveEdit: o?.onClickSave,
571
+ onClickCancelEdit: o?.onClickEdit,
572
+ onClickDeleteEntry: o?.onClickDelete
578
573
  }
579
574
  )
580
- ] }, `form-${i}-${p}`)) : l ? /* @__PURE__ */ t(J, { children: `No entry yet on ${o}. Please click "+" button to add` }) : ""
575
+ ] }, `form-${n}-${y}`)) : l ? /* @__PURE__ */ t(J, { children: `No entry yet on ${i}. Please click "+" button to add` }) : ""
581
576
  ] }),
582
- l && /* @__PURE__ */ t(K, { className: "add-input-button-space", children: /* @__PURE__ */ t(y, { id: `expand-${o}-inputs`, buttonType: "button", text: "+", onClick: x, className: "add-input-entry" }) })
577
+ l && /* @__PURE__ */ t(K, { className: "add-input-button-space", children: /* @__PURE__ */ t($, { id: `expand-${i}-inputs`, buttonType: "button", text: "+", onClick: x, className: "add-input-entry" }) })
583
578
  ] }),
584
579
  /* @__PURE__ */ t(
585
580
  ue,
586
581
  {
587
- id: i,
588
- hasSubmit: $,
582
+ id: n,
583
+ hasSubmit: p,
589
584
  submitText: N,
590
- handleSubmit: D,
585
+ handleSubmit: A,
591
586
  hasEdit: C,
592
587
  editText: R,
593
588
  handleEdit: w,
@@ -596,13 +591,13 @@ const n = {
596
591
  handleCancel: L,
597
592
  hasDelete: k,
598
593
  deleteText: B,
599
- handleDelete: j
594
+ handleDelete: z
600
595
  }
601
596
  ),
602
- /* @__PURE__ */ t($e, { className: "children-container", children: A })
597
+ /* @__PURE__ */ t(xe, { className: "children-container", children: D })
603
598
  ] }), ye = (e) => {
604
- 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*\)$/;
605
- return o.test(e) || l.test(e) || CSS.supports("color", e);
599
+ const i = /^#([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 i.test(e) || l.test(e) || CSS.supports("color", e);
606
601
  }, b = (e) => {
607
602
  if (!ye(e)) throw new Error(`Invalid color: ${e}`);
608
603
  return e;
@@ -646,10 +641,10 @@ const n = {
646
641
  error: b("#FAD4D4")
647
642
  }
648
643
  }, Q = Y(void 0), Fe = ({ children: e }) => {
649
- const [o, l] = Z(O), i = () => {
644
+ const [i, l] = Z(O), n = () => {
650
645
  l((r) => r === O ? pe : O);
651
646
  };
652
- return /* @__PURE__ */ t(Q.Provider, { value: { currentTheme: o, toggleTheme: i }, children: /* @__PURE__ */ t(I, { theme: o, children: e }) });
647
+ return /* @__PURE__ */ t(Q.Provider, { value: { currentTheme: i, toggleTheme: n }, children: /* @__PURE__ */ t(I, { theme: i, children: e }) });
653
648
  }, ve = () => _(Q);
654
649
  export {
655
650
  Ce as DynamicForm,
@@ -140,7 +140,6 @@ export type DynamicFormProps = FormActionButtonsProps & (({
140
140
  fieldsets: FieldsetShape[];
141
141
  formInputs?: never;
142
142
  legendText?: never;
143
- labelAndInputContainerClass?: never;
144
143
  } & ConditionalEditable<LabeledInputProps>) | ({
145
144
  fieldsets: null;
146
145
  formInputs: inputEntryShape<boolean>[];
@@ -158,6 +157,7 @@ export type DynamicFormProps = FormActionButtonsProps & (({
158
157
  className?: string;
159
158
  labelClass?: string;
160
159
  inputClass?: string;
160
+ labelAndInputContainerClass?: string;
161
161
  };
162
162
  export {};
163
163
  //# 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,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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;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2BAA2B,CAAC,EAAE,MAAM,CAAC;CACtC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kbgarcia8/react-dynamic-form",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "A form that can be nested with editable, expandable and flexible input-forms",
5
5
  "keywords": [
6
6
  "form",