| 1 |
import{g as u,a as h,i as x,aH as j,z as f,j as e,_ as o,f as C,bG as y}from"./main-294.js";import{F as i}from"./bf-821-385.js";import{S as v}from"./bf-908-241.js";import"./bf-176-80.js";import"./bf-764-245.js";import"./bf-5-86.js";import"./bf-487-72.js";import"./bf-867-113.js";const W={penColor:o("Pen Color"),backgroundColor:o("Background Color"),maxWidth:o("Pen Width"),imgTyp:o("Image Type")};function _(){const{fieldKey:t}=u(),{css:a}=h(),[r,c]=x(j),n=f(r[t]);function s(m){const{value:p,name:d}=m.target;n.config[d]=p,c(C(r,g=>{g[t]=n})),y({event:`${W[d]} changed to ${p}: ${n.txt}`,type:`signature_pad_${d}`,state:{fields:r,fldKey:t}})}return e.jsx(v,{id:"signature-pad",title:o("Signature Pad"),className:a(i.fieldSection),open:!0,children:e.jsxs("div",{className:a(i.placeholder),children:[e.jsxs("div",{className:a(l.inpWrp),children:[e.jsx("label",{htmlFor:"maxWidth",children:"Pen Width"}),e.jsx("input",{className:a(i.input,{w:"30%"}),type:"text",name:"maxWidth",id:"maxWidth",min:"1",max:"10",value:n.config.maxWidth,step:"0.1",onChange:s})]}),e.jsxs("div",{className:a(l.inpWrp),children:[e.jsx("label",{htmlFor:"penColor",children:"Pen Color"}),e.jsx("input",{className:a(i.input,{w:"30%"}),type:"color",name:"penColor",id:"penColor",value:n.config.penColor,onChange:s})]}),e.jsxs("div",{className:a(l.inpWrp),children:[e.jsx("label",{htmlFor:"backgroundColor",children:"Background Color"}),e.jsx("input",{className:a(i.input,{w:"30%"}),type:"color",name:"backgroundColor",id:"backgroundColor",value:n.config.backgroundColor,onChange:s})]}),e.jsxs("div",{className:a(l.inpWrp),children:[e.jsx("label",{htmlFor:"imgTyp",children:"Image Type"}),e.jsxs("select",{className:a(i.input,{w:"30%"}),name:"imgTyp",id:"imgTyp",value:n.config.imgTyp,onChange:s,children:[e.jsx("option",{value:"image/png",children:"PNG"}),e.jsx("option",{value:"image/jpeg",children:"JPEG"}),e.jsx("option",{value:"image/svg+xml",children:"SVG"})]})]})]})})}const l={inpWrp:{flx:"center-between",mx:5}};export{_ as default}; |