@kbgarcia8/react-dynamic-form 1.1.3 → 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.
@@ -39,7 +39,7 @@
39
39
  display: flex;
40
40
  align-items: center;
41
41
  justify-content: center;
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`
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 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})}),F=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,dataAttributes: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,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:y,checked:k,onChange:u,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(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`
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(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`
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: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`
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: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,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(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(F,{...a,id:a.id??`${o}-input`,labelClass:m,inputClass:l,idx:$,className:d}),(a.type==="radio"||a.type==="checkbox")&&e.jsx(F,{...a,id:a.id??`${o}-input`,labelClass:m,inputClass:l,idx:$,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:$,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;
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,65 +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
- `, x = ({
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
86
  }) => /* @__PURE__ */ t(
87
87
  ee,
88
88
  {
89
89
  onClick: e,
90
- id: o,
90
+ id: i,
91
91
  type: l,
92
- className: c,
92
+ className: s,
93
93
  ...h,
94
94
  children: /* @__PURE__ */ g(te, { className: "button-icon-text-space", children: [
95
- i ? /* @__PURE__ */ t(ne, { src: i, alt: d }) : r || "",
96
- m && /* @__PURE__ */ t(ae, { id: o, children: m })
95
+ n ? /* @__PURE__ */ t(ae, { src: n, alt: d }) : r || "",
96
+ m && /* @__PURE__ */ t(ne, { id: i, children: m })
97
97
  ] })
98
98
  }
99
- ), oe = s.div`
99
+ ), oe = c.div`
100
100
  display: flex;
101
101
  flex-direction: column;
102
102
  align-items: left;
103
103
  width: 100%;
104
- margin-bottom: ${n.spacing.small};
105
- `, ie = s.div`
104
+ margin-bottom: ${a.spacing.small};
105
+ `, ie = c.div`
106
106
  display: flex;
107
- gap: ${n.spacing.xsmall};
107
+ gap: ${a.spacing.xsmall};
108
108
  width: auto;
109
109
  height: auto;
110
- `, le = s.label`
110
+ `, le = c.label`
111
111
  display: flex;
112
112
  align-items: center;
113
113
  justify-content:center;
114
114
  height: auto;
115
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};
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};
120
120
 
121
121
  & .label-icon-container img,
122
122
  & .label-icon-container svg {
@@ -124,74 +124,74 @@ const n = {
124
124
  height: auto;
125
125
  object-fit: contain;
126
126
  }
127
- `, ce = s.span`
128
- font-weight: ${n.fontWeight.bolder};
129
- `, se = s.div`
127
+ `, se = c.span`
128
+ font-weight: ${a.fontWeight.bolder};
129
+ `, ce = c.div`
130
130
  max-width: 100%;
131
131
  display: flex;
132
132
  align-items: center;
133
- `, re = s.span`
134
- font-weight: ${n.fontWeight.light};
133
+ `, re = c.span`
134
+ font-weight: ${a.fontWeight.light};
135
135
  `, P = ({
136
136
  htmlFor: e,
137
- textLabel: o,
137
+ textLabel: i,
138
138
  additionalInfo: l,
139
- $labelFlexDirection: i,
139
+ $labelFlexDirection: n,
140
140
  source: r,
141
141
  svg: d,
142
142
  className: m,
143
- children: c
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 }),
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 }),
147
147
  l && /* @__PURE__ */ t(re, { className: "additional-info", children: l }),
148
- c
149
- ] }), q = s.input`
148
+ s
149
+ ] }), q = c.input`
150
150
  display: flex;
151
151
  place-content: center;
152
- font-family: ${n.fonts.secondary}, ${n.fonts.fallback};
153
- font-size: ${n.fontSize.xsmall};
152
+ font-family: ${a.fonts.secondary}, ${a.fonts.fallback};
153
+ font-size: ${a.fontSize.xsmall};
154
154
  line-height: 1.75;
155
- padding: ${n.spacing.xxxsmall} ${n.spacing.xsmall};
155
+ padding: ${a.spacing.xxxsmall} ${a.spacing.xsmall};
156
156
  max-width: 100%;
157
157
  height: auto;
158
158
  background-color: #FFFFFF;
159
159
  outline: none;
160
- border: ${n.borderThickness.thin} solid #000000;
161
- border-radius: ${n.borderRadius.xsmall};
160
+ border: ${a.borderThickness.thin} solid #000000;
161
+ border-radius: ${a.borderRadius.xsmall};
162
162
 
163
163
  &:focus{
164
- border: ${n.borderThickness.thin} solid ${({ theme: e }) => e.colors.teal};
164
+ border: ${a.borderThickness.thin} solid ${({ theme: e }) => e.colors.teal};
165
165
  }
166
- `, de = s.textarea`
166
+ `, de = c.textarea`
167
167
  display: flex;
168
168
  place-content: center;
169
- border: ${n.borderThickness.light} solid ${({ theme: e }) => e.colors.text};
170
- border-radius: ${n.borderRadius.small};
169
+ border: ${a.borderThickness.light} solid ${({ theme: e }) => e.colors.text};
170
+ border-radius: ${a.borderRadius.small};
171
171
  outline: none;
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};
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};
176
176
  max-width: 100%;
177
177
  resize: none;
178
178
  overflow-y: auto;
179
- `, j = X((e, o) => {
180
- 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;
181
181
  if (l === "textarea") {
182
182
  const { rows: N = 5, cols: E = 30, value: A, ...S } = e;
183
183
  return /* @__PURE__ */ t(
184
184
  de,
185
185
  {
186
- id: i,
186
+ id: n,
187
187
  onChange: r,
188
188
  value: A,
189
189
  rows: N,
190
190
  cols: E,
191
191
  ...m,
192
192
  className: h,
193
- ref: o,
194
- disabled: c,
193
+ ref: i,
194
+ disabled: s,
195
195
  required: d
196
196
  }
197
197
  );
@@ -201,23 +201,23 @@ const n = {
201
201
  return /* @__PURE__ */ t(
202
202
  q,
203
203
  {
204
- ref: o,
204
+ ref: i,
205
205
  type: "checkbox",
206
- id: i,
206
+ id: n,
207
207
  checked: N,
208
208
  onChange: r,
209
- disabled: c,
209
+ disabled: s,
210
210
  className: h,
211
211
  ...m
212
212
  }
213
213
  );
214
214
  }
215
- const $ = e, { value: p, pattern: u, placeholderText: k, ...C } = $;
215
+ const x = e, { value: p, pattern: u, placeholderText: k, ...C } = x;
216
216
  return /* @__PURE__ */ t(
217
217
  q,
218
218
  {
219
- id: i,
220
- name: i,
219
+ id: n,
220
+ name: n,
221
221
  placeholder: k,
222
222
  onChange: r,
223
223
  value: p,
@@ -225,22 +225,22 @@ const n = {
225
225
  required: d,
226
226
  ...m,
227
227
  className: h,
228
- ref: o,
229
- disabled: c,
228
+ ref: i,
229
+ disabled: s,
230
230
  pattern: u
231
231
  }
232
232
  );
233
233
  }), T = (e) => {
234
234
  const {
235
- className: o,
235
+ className: i,
236
236
  type: l,
237
- id: i,
237
+ id: n,
238
238
  textLabel: r,
239
239
  additionalInfo: d,
240
240
  $labelFlexDirection: m,
241
- svg: c,
241
+ svg: s,
242
242
  labelClass: h,
243
- onChange: $,
243
+ onChange: x,
244
244
  isRequired: p,
245
245
  dataAttributes: u,
246
246
  inputClass: k,
@@ -254,18 +254,18 @@ const n = {
254
254
  idx: z,
255
255
  children: R
256
256
  } = e;
257
- return /* @__PURE__ */ g(oe, { className: `${o} ${i.replace("#", "")}-label-input-container`, children: [
258
- 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 }),
259
259
  l !== "radio" && l !== "checkbox" && l === "textarea" && (() => {
260
- const { rows: w = 5, cols: F = 30, value: D, ...a } = e;
260
+ const { rows: w = 5, cols: F = 30, value: D, ...o } = e;
261
261
  return /* @__PURE__ */ t(
262
262
  j,
263
263
  {
264
- id: i,
265
- name: i,
264
+ id: n,
265
+ name: n,
266
266
  type: "textarea",
267
267
  isRequired: p,
268
- onChange: $,
268
+ onChange: x,
269
269
  value: D,
270
270
  rows: w,
271
271
  cols: F,
@@ -277,14 +277,14 @@ const n = {
277
277
  );
278
278
  })(),
279
279
  l !== "radio" && l !== "checkbox" && l !== "textarea" && (() => {
280
- const w = e, { value: F, pattern: D, placeholderText: a, ...y } = w;
280
+ const w = e, { value: F, pattern: D, placeholderText: o, ...y } = w;
281
281
  return /* @__PURE__ */ t(
282
282
  j,
283
283
  {
284
- id: i,
285
- name: i,
286
- placeholderText: a,
287
- onChange: $,
284
+ id: n,
285
+ name: n,
286
+ placeholderText: o,
287
+ onChange: x,
288
288
  value: F,
289
289
  type: l,
290
290
  isRequired: p,
@@ -304,135 +304,135 @@ const n = {
304
304
  {
305
305
  ref: C,
306
306
  type: "checkbox",
307
- name: i,
308
- id: i,
307
+ name: n,
308
+ id: n,
309
309
  isRequired: p,
310
310
  checked: w,
311
- onChange: $,
311
+ onChange: x,
312
312
  disabled: N,
313
313
  className: k,
314
314
  dataAttributes: u
315
315
  }
316
316
  ),
317
- /* @__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 })
318
318
  ] });
319
319
  })(),
320
320
  E && /* @__PURE__ */ g(ie, { className: "input-edit-buttons", children: [
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 })
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 })
323
323
  ] }),
324
324
  R
325
325
  ] });
326
- }, me = s.fieldset`
326
+ }, me = c.fieldset`
327
327
  padding: 0;
328
328
  height: auto;
329
329
  width: 100%;
330
- `, be = s.legend`
331
- font-size: ${n.spacing.medium};
330
+ `, be = c.legend`
331
+ font-size: ${a.spacing.medium};
332
332
  font-weight: 500;
333
- margin: 0 auto ${n.spacing.small} auto;
333
+ margin: 0 auto ${a.spacing.small} auto;
334
334
  text-align: center;
335
- font-family: ${n.fonts.secondary}, ${n.fonts.fallback};
336
- `, he = s.div`
335
+ font-family: ${a.fonts.secondary}, ${a.fonts.fallback};
336
+ `, he = c.div`
337
337
  display: flex;
338
338
  flex-direction: column;
339
339
  align-items: flex-start;
340
340
  width: 100%;
341
- margin-bottom: ${n.spacing.small};
342
- `, fe = s.div`
341
+ margin-bottom: ${a.spacing.small};
342
+ `, fe = c.div`
343
343
  display: flex;
344
344
  justify-content: space-between;
345
345
  width: 100%;
346
346
  `, M = ({
347
347
  legend: e,
348
- idx: o,
348
+ idx: i,
349
349
  editableInformation: l,
350
- onChangeOfEditableOption: i,
350
+ onChangeOfEditableOption: n,
351
351
  onClickSaveEdit: r,
352
352
  onClickCancelEdit: d,
353
353
  onClickDeleteEntry: m
354
354
  }) => /* @__PURE__ */ g(me, { className: "editable-selection-fieldset", children: [
355
- /* @__PURE__ */ t(be, { children: `${e} ${o + 1}` }),
356
- l.map((c, h) => /* @__PURE__ */ t(he, { className: "editable-selection-container", children: /* @__PURE__ */ t(
355
+ /* @__PURE__ */ t(be, { children: `${e} ${i + 1}` }),
356
+ l.map((s, h) => /* @__PURE__ */ t(he, { className: "editable-selection-container", children: /* @__PURE__ */ t(
357
357
  j,
358
358
  {
359
359
  id: `editable-selection-${h}`,
360
360
  name: `editable-selection-${h}`,
361
- placeholderText: c.name.charAt(0).toUpperCase() + c.name.slice(1),
362
- onChange: i,
363
- value: c.info,
364
- 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,
365
365
  isRequired: !0,
366
366
  className: "editable-selection",
367
367
  dataAttributes: {
368
368
  "data-index": h,
369
369
  //* should be idx to correspond to radio button index and not with input increment
370
- "data-key": c.info
370
+ "data-key": s.info
371
371
  }
372
372
  }
373
- ) }, `${c.name}-${h}`)),
373
+ ) }, `${s.name}-${h}`)),
374
374
  /* @__PURE__ */ g(fe, { className: "editable-selection-button-space", children: [
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 } })
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 } })
378
378
  ] })
379
- ] }), ge = s.div`
379
+ ] }), ge = c.div`
380
380
  display: flex;
381
381
  justify-content: space-between;
382
382
  max-width: 100%;
383
383
  `, ue = ({
384
384
  id: e,
385
- hasSubmit: o,
385
+ hasSubmit: i,
386
386
  submitText: l,
387
- handleSubmit: i,
387
+ handleSubmit: n,
388
388
  hasEdit: r,
389
389
  editText: d,
390
390
  handleEdit: m,
391
- hasCancel: c,
391
+ hasCancel: s,
392
392
  cancelText: h,
393
- handleCancel: $,
393
+ handleCancel: x,
394
394
  hasDelete: p,
395
395
  deleteText: u,
396
396
  handleDelete: k
397
397
  }) => /* @__PURE__ */ g(ge, { className: "form-main-button-container", children: [
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
- ] }), U = s.legend`
403
- 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};
404
404
  font-weight: 500;
405
- margin-bottom: ${n.spacing.small};
405
+ margin-bottom: ${a.spacing.small};
406
406
  width: auto;
407
407
  text-align: center;
408
- font-family: ${n.fonts.secondary}, ${n.fonts.fallback};
409
- `, H = s.fieldset`
408
+ font-family: ${a.fonts.secondary}, ${a.fonts.fallback};
409
+ `, H = c.fieldset`
410
410
  padding: 0;
411
411
  height: auto;
412
412
  width: 100%;
413
- `, G = s.div`
414
- padding: ${n.spacing.small};
413
+ `, G = c.div`
414
+ padding: ${a.spacing.small};
415
415
  height: auto;
416
416
  width: 100%;
417
- `, J = s.div`
417
+ `, J = c.div`
418
418
  display: flex;
419
419
  justify-content: center;
420
420
  align-items: center;
421
421
  width: 100%;
422
422
  height: auto;
423
- font-family: ${n.fonts.tertiary}, ${n.fonts.fallback};
424
- font-size: ${n.fontSize.xsmall};
425
- font-weight: ${n.fontWeight.bold};
426
- `, 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`
427
427
  display: flex;
428
428
  flex-direction: column;
429
429
  align-items: center;
430
430
  width: 100%;
431
- `, K = s.div`
431
+ `, K = c.div`
432
432
  display: flex;
433
433
  justify-content: space-between;
434
434
  width: 100%;
435
- `, $e = s.div`
435
+ `, xe = c.div`
436
436
  width: 100%;
437
437
  display: flex;
438
438
  flex-direction: column;
@@ -441,19 +441,19 @@ const n = {
441
441
  `, Ce = ({
442
442
  fieldsets: e = null,
443
443
  //* if a form has differrent fieldsets
444
- legendText: o,
444
+ legendText: i,
445
445
  //* if form has no fieldsets, depends if you have fieldset for solo form
446
446
  isExpandable: l,
447
447
  //* if form has no fieldsets this is default to false - to add inputs
448
- id: i,
448
+ id: n,
449
449
  formInputs: r,
450
450
  //* object that contains the input fields information to make it reusable
451
451
  labelAndInputContainerClass: d,
452
452
  labelClass: m,
453
- inputClass: c,
453
+ inputClass: s,
454
454
  handleEditableInputEntryChange: h,
455
455
  //* handles change on editable inputs
456
- handleAddingInputEntry: $,
456
+ handleAddingInputEntry: x,
457
457
  hasSubmit: p = !1,
458
458
  hasCancel: u = !1,
459
459
  hasDelete: k = !1,
@@ -470,18 +470,18 @@ const n = {
470
470
  className: F,
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
- }) => /* @__PURE__ */ g(xe, { id: `${i}-form`, className: F, onSubmit: E, children: [
474
- e ? e.map((a, y) => /* @__PURE__ */ g(G, { children: [
475
- /* @__PURE__ */ g(H, { id: `${i}-form-fieldset-${y}`, className: "form-fieldset", children: [
476
- a.legend && /* @__PURE__ */ t(U, { children: a.legend }),
477
- 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: [
478
478
  f.type === "textarea" && /* @__PURE__ */ t(
479
479
  T,
480
480
  {
481
481
  ...f,
482
- id: f.id ?? `${a.legend}-input`,
482
+ id: f.id ?? `${o.legend}-input`,
483
483
  labelClass: m,
484
- inputClass: c,
484
+ inputClass: s,
485
485
  idx: v,
486
486
  className: d
487
487
  }
@@ -490,9 +490,9 @@ const n = {
490
490
  T,
491
491
  {
492
492
  ...f,
493
- id: f.id ?? `${a.legend}-input`,
493
+ id: f.id ?? `${o.legend}-input`,
494
494
  labelClass: m,
495
- inputClass: c,
495
+ inputClass: s,
496
496
  idx: v,
497
497
  className: d
498
498
  }
@@ -501,9 +501,9 @@ const n = {
501
501
  T,
502
502
  {
503
503
  ...f,
504
- id: f.id ?? `${a.legend}-input`,
504
+ id: f.id ?? `${o.legend}-input`,
505
505
  labelClass: m,
506
- inputClass: c,
506
+ inputClass: s,
507
507
  idx: v,
508
508
  className: d
509
509
  }
@@ -511,7 +511,7 @@ const n = {
511
511
  f.isEditable && f.editing && /* @__PURE__ */ t(
512
512
  M,
513
513
  {
514
- legend: `${a.legend} ${v + 1}`,
514
+ legend: `${o.legend} ${v + 1}`,
515
515
  idx: v,
516
516
  editableInformation: f?.editableInformation,
517
517
  onChangeOfEditableOption: h,
@@ -520,66 +520,66 @@ const n = {
520
520
  onClickDeleteEntry: f?.onClickDelete
521
521
  }
522
522
  )
523
- ] }, `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.` }) : ""
524
524
  ] }),
525
- a.isExpandable && /* @__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
- ] }, `${a.legend}-${y}`)) : /* @__PURE__ */ g(G, { children: [
527
- /* @__PURE__ */ g(H, { id: `${i}-form-fieldset`, className: "form-fieldset", children: [
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(
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(
531
531
  T,
532
532
  {
533
- ...a,
534
- id: a.id ?? `${o}-input`,
533
+ ...o,
534
+ id: o.id ?? `${i}-input`,
535
535
  labelClass: m,
536
- inputClass: c,
536
+ inputClass: s,
537
537
  idx: y,
538
538
  className: d
539
539
  }
540
540
  ),
541
- (a.type === "radio" || a.type === "checkbox") && /* @__PURE__ */ t(
541
+ (o.type === "radio" || o.type === "checkbox") && /* @__PURE__ */ t(
542
542
  T,
543
543
  {
544
- ...a,
545
- id: a.id ?? `${o}-input`,
544
+ ...o,
545
+ id: o.id ?? `${i}-input`,
546
546
  labelClass: m,
547
- inputClass: c,
547
+ inputClass: s,
548
548
  idx: y,
549
549
  className: d
550
550
  }
551
551
  ),
552
- a.type !== "textarea" && a.type !== "radio" && a.type !== "checkbox" && /* @__PURE__ */ t(
552
+ o.type !== "textarea" && o.type !== "radio" && o.type !== "checkbox" && /* @__PURE__ */ t(
553
553
  T,
554
554
  {
555
- ...a,
556
- id: a.id ?? `${o}-input`,
555
+ ...o,
556
+ id: o.id ?? `${i}-input`,
557
557
  labelClass: m,
558
- inputClass: c,
558
+ inputClass: s,
559
559
  idx: y,
560
560
  className: d
561
561
  }
562
562
  ),
563
- a.isEditable && a.editing && /* @__PURE__ */ t(
563
+ o.isEditable && o.editing && /* @__PURE__ */ t(
564
564
  M,
565
565
  {
566
- legend: `${o} ${y + 1}`,
566
+ legend: `${i} ${y + 1}`,
567
567
  idx: y,
568
- editableInformation: a?.editableInformation,
568
+ editableInformation: o?.editableInformation,
569
569
  onChangeOfEditableOption: h,
570
- onClickSaveEdit: a?.onClickSave,
571
- onClickCancelEdit: a?.onClickEdit,
572
- onClickDeleteEntry: a?.onClickDelete
570
+ onClickSaveEdit: o?.onClickSave,
571
+ onClickCancelEdit: o?.onClickEdit,
572
+ onClickDeleteEntry: o?.onClickDelete
573
573
  }
574
574
  )
575
- ] }, `form-${i}-${y}`)) : 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` }) : ""
576
576
  ] }),
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" }) })
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" }) })
578
578
  ] }),
579
579
  /* @__PURE__ */ t(
580
580
  ue,
581
581
  {
582
- id: i,
582
+ id: n,
583
583
  hasSubmit: p,
584
584
  submitText: N,
585
585
  handleSubmit: A,
@@ -594,10 +594,10 @@ const n = {
594
594
  handleDelete: z
595
595
  }
596
596
  ),
597
- /* @__PURE__ */ t($e, { className: "children-container", children: D })
597
+ /* @__PURE__ */ t(xe, { className: "children-container", children: D })
598
598
  ] }), ye = (e) => {
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(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);
601
601
  }, b = (e) => {
602
602
  if (!ye(e)) throw new Error(`Invalid color: ${e}`);
603
603
  return e;
@@ -641,10 +641,10 @@ const n = {
641
641
  error: b("#FAD4D4")
642
642
  }
643
643
  }, Q = Y(void 0), Fe = ({ children: e }) => {
644
- const [o, l] = Z(O), i = () => {
644
+ const [i, l] = Z(O), n = () => {
645
645
  l((r) => r === O ? pe : O);
646
646
  };
647
- 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 }) });
648
648
  }, ve = () => _(Q);
649
649
  export {
650
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,GAAG,SAAS,CAAA;AAE3E,KAAK,UAAU,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEtC,MAAM,WAAW,WAAW;IACxB,OAAO,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,GAAG,SAAS,CAAC;IAChE,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,CAA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form that can be nested with editable, expandable and flexible input-forms",
5
5
  "keywords": [
6
6
  "form",