rbro-tat-uds 1.6.31 → 1.6.32

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.
package/dist/index.cjs.js CHANGED
@@ -4377,7 +4377,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[g2]+=1);const U5=t=>e.createE
4377
4377
  & > div:nth-child(2) {
4378
4378
  padding: 0px 12px 12px 12px;
4379
4379
  }
4380
- `,h3=({position:t={top:"100%",left:"0px"},float:i=!0,getValue:a,value:n="0",handleFooterButton:r=()=>{},offset:c=10,withinPortal:o=!1,relativeRef:C,...s})=>{const[u,m]=h.useState(n.toString()),p=h.useRef(null),[g,_]=h.useState({}),E=h.useCallback(()=>{var z;if(!p.current)return;const B=p.current,R=B.getBoundingClientRect(),M=(z=B.offsetParent)==null?void 0:z.getBoundingClientRect();if(!M)return;const y=window.innerHeight-M.bottom,H=M.top,S=R.height+100>y&&H>y,k={top:S?"auto":"100%",left:`${t.left}`,right:`${t.right}`,bottom:S?"100%":"auto",marginTop:S?"auto":`${c}px`,marginBottom:S?`${c}px`:"auto"};_(V=>JSON.stringify(V)===JSON.stringify(k)?V:k)},[]),x=h.useCallback(()=>{const B=p==null?void 0:p.current,R=C==null?void 0:C.current;if(!B||!R)return;const M=B.getBoundingClientRect(),y=R.getBoundingClientRect(),H=y.left+window.scrollX,b=y.top+window.scrollY,S=window.innerHeight-y.bottom,k=y.top,z=M.height+50>S&&k+150>S,V={top:z?`${b-M.height-10}px`:`${b+y.height}px`,left:`${H}px`,marginTop:z?"auto":"10px",marginBottom:z?"10px":"auto"};_(D=>JSON.stringify(D)===JSON.stringify(V)?D:V)},[]),v=h.useCallback(()=>o?x():E(),[o,E,x]);h.useEffect(()=>(v(),window.addEventListener("resize",v),window.addEventListener("scroll",v,!0),()=>{window.removeEventListener("resize",v),window.removeEventListener("scroll",v,!0)}),[v]);const $=(B,R=!1)=>{if(R){if(u==="0")return;if(u.length===1)return m("0");m(M=>M.substring(0,M.length-1));return}if(!(B==="."&&u.includes("."))){if(u==="0")return m(B==="."?M=>(M+B).toString():B);m(M=>(M+B).toString())}};return h.useEffect(()=>{a&&a(u)},[u]),L.jsxs(At,{id:"rbro-numpad-wrapper",...s,$offset:c,ref:p,style:{top:g.top,left:g.left,bottom:g.bottom,right:g.right,margin:`${g.marginTop} auto ${g.marginBottom} auto`,visibility:Object.keys(g).length===0?"hidden":"visible",zIndex:"500"},children:[L.jsx("div",{children:L.jsxs("div",{children:[L.jsx("button",{onClick:()=>$("1"),children:L.jsx("span",{children:"1"})}),L.jsx("button",{onClick:()=>$("2"),children:L.jsx("span",{children:"2"})}),L.jsx("button",{onClick:()=>$("3"),children:L.jsx("span",{children:"3"})}),L.jsx("button",{onClick:()=>$("4"),children:L.jsx("span",{children:"4"})}),L.jsx("button",{onClick:()=>$("5"),children:L.jsx("span",{children:"5"})}),L.jsx("button",{onClick:()=>$("6"),children:L.jsx("span",{children:"6"})}),L.jsx("button",{onClick:()=>$("7"),children:L.jsx("span",{children:"7"})}),L.jsx("button",{onClick:()=>$("8"),children:L.jsx("span",{children:"8"})}),L.jsx("button",{onClick:()=>$("9"),children:L.jsx("span",{children:"9"})}),L.jsx("button",{disabled:!i,onClick:()=>i&&$("."),children:L.jsx("span",{children:i?".":""})}),L.jsx("button",{onClick:()=>$("0"),children:L.jsx("span",{children:"0"})}),L.jsx("button",{onClick:()=>$("",!0),children:L.jsx(N,{icon:"clear-rec",size:20,color:l.accent_500})})]})}),L.jsx("div",{children:L.jsx(E1,{onClick:r,label:"OK",variant:"primary",intent:"accent",size:"medium",width:"100%"})})]})},Pt=F.div`
4380
+ `,h3=({position:t={top:"100%",left:"0px"},float:i=!0,getValue:a,value:n="0",handleFooterButton:r=()=>{},offset:c=10,withinPortal:o=!1,relativeRef:C,...s})=>{const[u,m]=h.useState(n.toString()),p=h.useRef(null),[g,_]=h.useState({}),E=h.useCallback(()=>{var z;if(!p.current)return;const B=p.current,R=B.getBoundingClientRect(),M=(z=B.offsetParent)==null?void 0:z.getBoundingClientRect();if(!M)return;const y=window.innerHeight-M.bottom,H=M.top,S=R.height+100>y&&H>y,k={top:S?"auto":"100%",left:`${t.left}`,right:`${t.right}`,bottom:S?"100%":"auto",marginTop:S?"auto":`${c}px`,marginBottom:S?`${c}px`:"auto"};_(V=>JSON.stringify(V)===JSON.stringify(k)?V:k)},[]),x=h.useCallback(()=>{const B=p==null?void 0:p.current,R=C==null?void 0:C.current;if(!B||!R)return;const M=B.getBoundingClientRect(),y=R.getBoundingClientRect(),H=y.left+window.scrollX,b=y.top+window.scrollY,S=window.innerHeight-y.bottom,k=y.top,z=M.height+50>S&&k+150>S,V={top:z?`${b-M.height-10}px`:`${b+y.height}px`,left:`${H}px`,marginTop:z?"auto":"10px",marginBottom:z?"10px":"auto"};_(D=>JSON.stringify(D)===JSON.stringify(V)?D:V)},[]),v=h.useCallback(()=>o?x():E(),[o,E,x]);h.useEffect(()=>(v(),window.addEventListener("resize",v),window.addEventListener("scroll",v,!0),()=>{window.removeEventListener("resize",v),window.removeEventListener("scroll",v,!0)}),[v]);const $=(B,R=!1)=>{if(R){if(u==="0")return;if(u.length===1)return m("0");m(M=>M.substring(0,M.length-1));return}if(!(B==="."&&u.includes("."))){if(u==="0")return m(B==="."?M=>(M+B).toString():B);m(M=>(M+B).toString())}};return h.useEffect(()=>{a&&a(u)},[u]),h.useEffect(()=>{m(n.toString())},[n]),L.jsxs(At,{id:"rbro-numpad-wrapper",...s,$offset:c,ref:p,style:{top:g.top,left:g.left,bottom:g.bottom,right:g.right,margin:`${g.marginTop} auto ${g.marginBottom} auto`,visibility:Object.keys(g).length===0?"hidden":"visible",zIndex:"500"},children:[L.jsx("div",{children:L.jsxs("div",{children:[L.jsx("button",{onClick:()=>$("1"),children:L.jsx("span",{children:"1"})}),L.jsx("button",{onClick:()=>$("2"),children:L.jsx("span",{children:"2"})}),L.jsx("button",{onClick:()=>$("3"),children:L.jsx("span",{children:"3"})}),L.jsx("button",{onClick:()=>$("4"),children:L.jsx("span",{children:"4"})}),L.jsx("button",{onClick:()=>$("5"),children:L.jsx("span",{children:"5"})}),L.jsx("button",{onClick:()=>$("6"),children:L.jsx("span",{children:"6"})}),L.jsx("button",{onClick:()=>$("7"),children:L.jsx("span",{children:"7"})}),L.jsx("button",{onClick:()=>$("8"),children:L.jsx("span",{children:"8"})}),L.jsx("button",{onClick:()=>$("9"),children:L.jsx("span",{children:"9"})}),L.jsx("button",{disabled:!i,onClick:()=>i&&$("."),children:L.jsx("span",{children:i?".":""})}),L.jsx("button",{onClick:()=>$("0"),children:L.jsx("span",{children:"0"})}),L.jsx("button",{onClick:()=>$("",!0),children:L.jsx(N,{icon:"clear-rec",size:20,color:l.accent_500})})]})}),L.jsx("div",{children:L.jsx(E1,{onClick:r,label:"OK",variant:"primary",intent:"accent",size:"medium",width:"100%"})})]})},Pt=F.div`
4381
4381
  border-radius: 8px;
4382
4382
  border: 1px solid ${l.gray_200};
4383
4383
  overflow: hidden;