PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / V_3.0.0
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder vV_3.0.0
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 2.10.1 All 138 releases
bit-form / assets / bf-340-83.js

bf-340-83.js in Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder V_3.0.0, at assets/bf-340-83.js

2 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import{r as t,a as H,j as s,E as P,I as T,P as $,p as O,c9 as z}from"./main-294.js";import{k as B,f as D}from"./bf-176-80.js";function F({title:c,customTitle:m,subtitle:r,children:g,titleEditable:a,onTitleChange:j,cls:v,notScroll:K,header:p,onExpand:l,onCollapse:d,toggle:b,tag:u,action:y,checked:N,isPro:w,proProperty:E,isExpanded:x}){const[e,S]=t.useState(x||!1),[A,n]=t.useState(x?"auto":0),h=t.useRef(null),o=t.useRef(null),{css:C}=H(),f=i=>{i.target.classList.contains("edit")||S(!e)},I=i=>{i.stopPropagation(),h.current.focus()},R=()=>{n("auto"),l&&l()},k=()=>{n(o.current.offsetHeight),d&&d()};return s.jsxs("div",{className:`btcd-accr sh-sm ${v}`,children:[s.jsxs("div",{className:`btcd-accr-btn ${e&&"tertiary active"} flx flx-between`,onClick:f,onKeyDown:f,role:"button",tabIndex:0,children:[s.jsxs("div",{className:"btcd-accr-title w-10",children:[s.jsxs("div",{className:C({flx:"align-center"}),children:[m,c!==void 0&&s.jsx("input",{"aria-label":"accrodions",title:c,ref:h,className:a&&"edit",style:{color:e?"white":"inherit",width:e?"70%":"auto"},type:"text",onChange:j,value:c,readOnly:a===void 0}),a&&s.jsx("button",{type:"button",className:"edit-icn",onClick:I,"aria-label":"focus edit",style:{color:e?"white":"gray"},children:s.jsx(P,{size:16})}),!e&&p,u&&s.jsx("span",{className:"btcd-badge btcd-badge-light ml-2",children:u}),w&&!T&&s.jsx($,{proProperty:E})]}),r!==void 0&&s.jsx("small",{children:r})]}),b&&s.jsx(O,{action:y,checked:N||!1,className:"flx"}),s.jsx(B,{icn:!0,children:s.jsx(D,{size:"20",rotate:!!e})})]}),s.jsx("div",{className:`o-h ${e&&"delay-overflow"}`,style:{height:A,transition:"height 300ms"},children:s.jsx(z,{nodeRef:o,in:e,timeout:300,onEntering:()=>n(o.current.offsetHeight),onEntered:R,onExiting:()=>n(0),onExit:k,unmountOnExit:!0,children:s.jsx("div",{className:"p-2",ref:o,children:g})})})]})}var q=t.memo(F);export{q as A};
2