rbro-tat-uds 1.5.2 → 1.5.3

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
@@ -3982,7 +3982,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[i2]+=1);const xt=e=>l.createE
3982
3982
  & > rect:nth-child(1) {
3983
3983
  fill: ${({$selected:e})=>e?t.info_200:t.gray_60};
3984
3984
  }
3985
- `,U4=({max:e=100,limit_max:n=70,limit_min:o=40,value:i=80,value_text:a=4200,currency:s="RON",height:h=80,selected:d=!1})=>{const C=new Intl.NumberFormat("RO"),g=m.useRef(null),[u,x]=m.useState(0),[f,b]=m.useState(0),_=m.useMemo(()=>{const A=f/2-12,Z=Math.min(u,Math.max(u*o/e,0)),R=o*u/e-1,D=Math.min(u,Math.max(R,.5)),v=n*u/e-1,M=Math.min(u,Math.max(v,1));return{bar_h:24,bar_y:A,secondary_bar_w:Z,line_min_x:D,line_max_x:M}},[u,f,n,o,e]),S=m.useMemo(()=>{const A=i*u/e-_.secondary_bar_w,Z=u-_.secondary_bar_w,R=i>n?t.success_200:t.danger_200,D=i>n?t.success_500:t.danger_500,v=i>n?t.success_800:t.danger_800;return{value:Math.min(Z,Math.max(0,A)),fill_rect_primary:R,fill_rect_secondary:D,fill_value_text:v}},[i,u]);return m.useEffect(()=>{if(g&&g.current){const $=()=>{var Z;const A=(Z=g==null?void 0:g.current)==null?void 0:Z.clientWidth;x(+A),b(h)};return $(),window.addEventListener("resize",$),()=>window.removeEventListener("resize",$)}},[g,h]),r.jsxs(G4,{ref:g,width:"100%",height:"100%",viewBox:`0 0 ${u} ${f}`,xmlns:"http://www.w3.org/2000/svg",$selected:d,children:[r.jsx("rect",{x:0,y:_.bar_y,height:_.bar_h,width:u}),r.jsx("rect",{x:0,y:_.bar_y,height:_.bar_h,width:_.secondary_bar_w,fill:S.fill_rect_primary}),r.jsx("text",{className:"limitMinLabel",textAnchor:"start",x:10,y:_.bar_y+_.bar_h/1.5,fill:S.fill_value_text,children:C.format(a)+" "+s}),r.jsx("rect",{x:_.line_min_x,y:_.bar_y,height:_.bar_h,width:S.value,fill:S.fill_rect_secondary}),r.jsx("line",{x1:_.line_min_x,x2:_.line_min_x,y1:0,y2:f,strokeWidth:2,stroke:"#232529"}),r.jsx("line",{x1:_.line_max_x,x2:_.line_max_x,y1:0,y2:f,strokeWidth:2,stroke:"#232529"})]})},X4=j.svg`
3985
+ `,U4=({max:e=100,limit_max:n=70,limit_min:o=40,value:i=80,value_text:a=4200,currency:s="RON",height:h=80,selected:d=!1})=>{const C=new Intl.NumberFormat("RO",{minimumFractionDigits:2,maximumFractionDigits:2}),g=m.useRef(null),[u,x]=m.useState(0),[f,b]=m.useState(0),_=m.useMemo(()=>{const A=f/2-12,Z=Math.min(u,Math.max(u*o/e,0)),R=o*u/e-1,D=Math.min(u,Math.max(R,.5)),v=n*u/e-1,M=Math.min(u,Math.max(v,1));return{bar_h:24,bar_y:A,secondary_bar_w:Z,line_min_x:D,line_max_x:M}},[u,f,n,o,e]),S=m.useMemo(()=>{const A=i*u/e-_.secondary_bar_w,Z=u-_.secondary_bar_w,R=i>n?t.success_200:t.danger_200,D=i>n?t.success_500:t.danger_500,v=i>n?t.success_800:t.danger_800;return{value:Math.min(Z,Math.max(0,A)),fill_rect_primary:R,fill_rect_secondary:D,fill_value_text:v}},[i,u]);return m.useEffect(()=>{if(g&&g.current){const $=()=>{var Z;const A=(Z=g==null?void 0:g.current)==null?void 0:Z.clientWidth;x(+A),b(h)};return $(),window.addEventListener("resize",$),()=>window.removeEventListener("resize",$)}},[g,h]),r.jsxs(G4,{ref:g,width:"100%",height:"100%",viewBox:`0 0 ${u} ${f}`,xmlns:"http://www.w3.org/2000/svg",$selected:d,children:[r.jsx("rect",{x:0,y:_.bar_y,height:_.bar_h,width:u}),r.jsx("rect",{x:0,y:_.bar_y,height:_.bar_h,width:_.secondary_bar_w,fill:S.fill_rect_primary}),r.jsx("text",{className:"limitMinLabel",textAnchor:"start",x:10,y:_.bar_y+_.bar_h/1.5,fill:S.fill_value_text,children:C.format(a)+" "+s}),r.jsx("rect",{x:_.line_min_x,y:_.bar_y,height:_.bar_h,width:S.value,fill:S.fill_rect_secondary}),r.jsx("line",{x1:_.line_min_x,x2:_.line_min_x,y1:0,y2:f,strokeWidth:2,stroke:"#232529"}),r.jsx("line",{x1:_.line_max_x,x2:_.line_max_x,y1:0,y2:f,strokeWidth:2,stroke:"#232529"})]})},X4=j.svg`
3986
3986
  ${({$dev:e})=>e&&p`
3987
3987
  background-color: #ffccef;
3988
3988