PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / V3.3.2
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder vV3.3.2
V3.3.2 3.3.1 V-3.3.0 3.2.2 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 V3.0.3 V3.0.2 -3.0.1 V_3.0.0 1.1.1 1.1.8 1.2 1.3 1.4 1.4.18 1.5.2 1.9 2.0 2.10.0 All 139 releases
bit-form / assets / bf-372-285.js

bf-372-285.js in Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder V3.3.2, at assets/bf-372-285.js

2 lines 3.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import{a as T,g as L,i as U,aj as z,at as D,r as P,H as R,j as e,_ as a,h as n,M as E,f as p,bI as f,dD as F,l as w,aY as K,b1 as O}from"./main-96.js";import{F as u}from"./bf-460-326.js";import{A as y}from"./bf-721-323.js";import{F as W,I as k}from"./bf-178-325.js";import{S as A}from"./bf-283-176.js";import{e as Y}from"./bf-781-46.js";import"./bf-542-181.js";import"./bf-678-179.js";import"./bf-687-180.js";import"./bf-551-68.js";import"./bf-200-43.js";import"./bf-431-60.js";/* empty css */import"./bf-63-62.js";import"./bf-762-63.js";import"./bf-163-182.js";function me(){var v,_,$;const{css:l}=T(),{fieldKey:s}=L(),[c,x]=U(O),C=z(D),[S,b]=P.useState(!1);if(!s)return null;const t=R(c[s]),H=t.alt||"",M=d=>{const{value:i}=d.target;i===""?delete t.alt:t.alt=i.replace(/\\\\/g,"$_bf_$");const r=p(c,o=>{o[s]=t});x(r),f({event:`Field alt Change ${t.alt||s}`,type:"field_alt_change",state:{fields:r,fldKey:s}})},B=d=>{const{value:i}=d.target;i===""?delete t.bg_img:t.bg_img=i.replace(/\\\\/g,"$_bf_$");const r=p(c,o=>{o[s]=t});x(r),f({event:`Field Image Change ${t.bg_img||s}`,type:"field_img_change",state:{fields:r,fldKey:s}})},j=d=>{const{name:i,value:r}=d.target,o=Number(r),I=r.trim()===""||!(o>0);t[i]=I?"":o;const N=p(c,m=>{m[s]=t});x(N);const g=m=>`fields->${s}->classes->.${s}-fld-wrp->${m}`;f({event:`Field ${i} Change ${t.lbl||s}`,type:`field_${i}_change`,state:{fields:N,fldKey:s}}),C(m=>p(m,h=>{if(I){F(h,g(i)),i==="height"&&F(h,g("max-height"));return}w(h,g(i),`${o}px`),i==="height"&&w(h,g("max-height"),`${o}px`)})),K(s)};return e.jsxs(e.Fragment,{children:[e.jsxs(A,{id:"img-stng",title:a("Image"),className:l(u.fieldSection),children:[e.jsx("div",{className:l(n.flxc,{jc:"end"}),children:e.jsx(Y,{msg:a("Change"),children:e.jsx("button",{"data-testid":"img-edt-btn",type:"button",onClick:()=>b(!0),className:l(q.browseBtn),children:a("Browse")})})}),e.jsx("div",{className:l({w:"97%",mx:5}),children:e.jsx(y,{id:"img-url-stng",ariaLabel:a("Image URL"),changeAction:B,value:(v=t.bg_img)==null?void 0:v.replace(/\$_bf_\$/g,"\\"),placeholder:"e.g: https://ps.w.org/bit-form/assets/icon-256x256.png?rev=2376144"})}),e.jsxs("div",{className:l(n.flxcb,n.ml1),children:[e.jsx("label",{htmlFor:"img-width-stng",className:l(n.mr1),children:a("Width")}),e.jsx("input",{id:"img-width-stng",type:"number",name:"width","data-testid":"img-width","aria-label":a("Image Width"),placeholder:a("auto"),className:l(u.input,n.w4),value:(_=t.width)!=null?_:"",onChange:j})]}),e.jsxs("div",{className:l(n.flxcb,n.ml1),children:[e.jsx("label",{htmlFor:"img-height-stng",className:l(n.mr1),children:a("Height")}),e.jsx("input",{id:"img-height-stng",type:"number",name:"height","data-testid":"img-height","aria-label":a("Image Height"),placeholder:a("auto"),className:l(u.input,n.w4),value:($=t.height)!=null?$:"",onChange:j})]})]}),e.jsx(W,{}),e.jsx(A,{id:"img-alt-stng",title:a("Image Alt Text"),className:l(u.fieldSection),children:e.jsx("div",{children:e.jsx("div",{className:l({w:"97%",mx:5}),children:e.jsx(y,{id:"img-alt-inp",ariaLabel:a("Image alt text"),changeAction:M,value:H.replace(/\$_bf_\$/g,"\\"),placeholder:a("Alternative Text")})})})}),e.jsxs(E,{md:!0,autoHeight:!0,show:S,setModal:b,className:"o-v",title:a("Image"),children:[e.jsx("div",{className:"pos-rel"}),e.jsx(k,{iconType:"bg_img",selected:"Upload Image",uploadLbl:"Upload Image",setModal:b,unsplash:!0})]})]})}const q={browseBtn:{b:"none",bd:"none",p:"5px 10px",tn:"all ease-in-out 0.2s","&:hover":{bd:"var(--b-79-96)",cr:"var(--b-50)",brs:"8px"}}};export{me as default};
2