@kbgarcia8/react-dynamic-form 1.1.0 → 1.1.1
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.
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
max-width: 100%;
|
|
106
106
|
resize: none;
|
|
107
107
|
overflow-y: auto;
|
|
108
|
-
`,L=T.forwardRef((t,o)=>{const{type:i,id:s,onChange:r,isRequired:d,dataAttributes:b,disabled:l,className:x}=t,f=b?Object.fromEntries(Object.entries(b).map(([j,k])=>[`data-${j}`,k])):{};if(i==="textarea"){const{rows:j=5,cols:k=30,value:D,...S}=t;return e.jsx(oe,{id:s,onChange:r,value:D,rows:j,cols:k,...f,className:x,ref:o,disabled:l,required:d})}if(i==="radio"||i==="checkbox"){const{checked:j,...k}=t;return e.jsx(W,{ref:o,type:"checkbox",id:s,checked:j,onChange:r,disabled:l,className:x,...f})}const u=t,{value:g,pattern:p,placeholderText:C,...w}=u;return e.jsx(W,{id:s,name:s,placeholder:C,onChange:r,value:g,type:i,required:d,...f,className:x,ref:o,disabled:l,pattern:p})}),v=t=>{const{className:o,type:i,id:s,textLabel:r,additionalInfo:d,$labelFlexDirection:b,svg:l,labelClass:x,onChange:f,isRequired:u,dataAttributes:g,inputClass:p,ref:C,disabled:w,isEditable:j,editIcon:k,onClickEdit:D,deleteIcon:S,onClickDelete:R,idx:z,children:B}=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:b,svg:l,className:x}),i!=="radio"&&i!=="checkbox"&&i==="textarea"&&(()=>{const{rows:N=5,cols:E=30,value:A,...a}=t;return e.jsx(L,{id:s,name:s,type:"textarea",isRequired:u,onChange:f,value:A,rows:N,cols:E
|
|
108
|
+
`,L=T.forwardRef((t,o)=>{const{type:i,id:s,onChange:r,isRequired:d,dataAttributes:b,disabled:l,className:x}=t,f=b?Object.fromEntries(Object.entries(b).map(([j,k])=>[`data-${j}`,k])):{};if(i==="textarea"){const{rows:j=5,cols:k=30,value:D,...S}=t;return e.jsx(oe,{id:s,onChange:r,value:D,rows:j,cols:k,...f,className:x,ref:o,disabled:l,required:d})}if(i==="radio"||i==="checkbox"){const{checked:j,...k}=t;return e.jsx(W,{ref:o,type:"checkbox",id:s,checked:j,onChange:r,disabled:l,className:x,...f})}const u=t,{value:g,pattern:p,placeholderText:C,...w}=u;return e.jsx(W,{id:s,name:s,placeholder:C,onChange:r,value:g,type:i,required:d,...f,className:x,ref:o,disabled:l,pattern:p})}),v=t=>{const{className:o,type:i,id:s,textLabel:r,additionalInfo:d,$labelFlexDirection:b,svg:l,labelClass:x,onChange:f,isRequired:u,dataAttributes:g,inputClass:p,ref:C,disabled:w,isEditable:j,editIcon:k,onClickEdit:D,deleteIcon:S,onClickDelete:R,idx:z,children:B}=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:b,svg:l,className:x}),i!=="radio"&&i!=="checkbox"&&i==="textarea"&&(()=>{const{rows:N=5,cols:E=30,value:A,...a}=t;return e.jsx(L,{id:s,name:s,type:"textarea",isRequired:u,onChange:f,value:A,rows:N,cols:E,dataAttributes:g,className:p,ref:C,disabled:w})})(),i!=="radio"&&i!=="checkbox"&&i!=="textarea"&&(()=>{const N=t,{value:E,pattern:A,placeholderText:a,...y}=N;return e.jsx(L,{id:s,name:s,placeholderText:a,onChange:f,value:E,type:i,isRequired:u,dataAttributes:g,className:p,ref:C,disabled:w,pattern:A})})(),(i==="radio"||i==="checkbox")&&(()=>{const{checked:N,...E}=t;return e.jsxs(e.Fragment,{children:[e.jsx(L,{ref:C,type:"checkbox",name:s,id:s,isRequired:u,checked:N,onChange:f,disabled:w,className:p,dataAttributes:g}),e.jsx(P,{htmlFor:s,textLabel:r,additionalInfo:d,$labelFlexDirection:b,svg:l,className:x})]})})(),j&&e.jsxs(I,{className:"input-edit-buttons",children:[e.jsx($,{id:`editable-${s}-edit-btn`,svg:k,buttonType:"button",onClick:D,className:`edit-radio-${z}`,dataAttributes:g}),e.jsx($,{id:`editable-${s}-delete-btn`,svg:S,buttonType:"button",onClick:R,className:`delete-radio-${z}`,dataAttributes:g})]}),B]})},se=c.fieldset`
|
|
109
109
|
padding: 0;
|
|
110
110
|
height: auto;
|
|
111
111
|
width: 100%;
|
|
@@ -276,7 +276,7 @@ const a = {
|
|
|
276
276
|
value: S,
|
|
277
277
|
rows: E,
|
|
278
278
|
cols: v,
|
|
279
|
-
|
|
279
|
+
dataAttributes: x,
|
|
280
280
|
className: k,
|
|
281
281
|
ref: C,
|
|
282
282
|
disabled: F
|
|
@@ -295,7 +295,7 @@ const a = {
|
|
|
295
295
|
value: v,
|
|
296
296
|
type: l,
|
|
297
297
|
isRequired: $,
|
|
298
|
-
|
|
298
|
+
dataAttributes: x,
|
|
299
299
|
className: k,
|
|
300
300
|
ref: C,
|
|
301
301
|
disabled: F,
|
|
@@ -318,7 +318,7 @@ const a = {
|
|
|
318
318
|
onChange: u,
|
|
319
319
|
disabled: F,
|
|
320
320
|
className: k,
|
|
321
|
-
|
|
321
|
+
dataAttributes: x
|
|
322
322
|
}
|
|
323
323
|
),
|
|
324
324
|
/* @__PURE__ */ t(P, { htmlFor: i, textLabel: r, additionalInfo: d, $labelFlexDirection: b, svg: c, className: h })
|