rbro-tat-uds 1.5.21 → 1.5.22
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 +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
@@ -4099,7 +4099,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[i2]+=1);const kt=e=>l.createE
|
|
4099
4099
|
& > rect:nth-child(1) {
|
4100
4100
|
fill: ${({$selected:e})=>e?t.info_200:t.gray_60};
|
4101
4101
|
}
|
4102
|
-
`,l9=({max:e=100,limit_max:n=70,limit_min:o=40,value:i=80,value_text:a=4200,decimals:s=2,currency:d="RON",height:c=80,selected:u=!1})=>{const g=new Intl.NumberFormat("RO",{minimumFractionDigits:s,maximumFractionDigits:s}),x=y.useRef(null),[C,f]=y.useState(0),[b,_]=y.useState(0),k=y.useMemo(()=>{const Z=b/2-12,R=Math.min(C,Math.max(C*o/e,0)),E=o*C/e-1,$=Math.min(C,Math.max(E,.5)),H=n*C/e-1,v=Math.min(C,Math.max(H,1));return{bar_h:24,bar_y:Z,secondary_bar_w:R,line_min_x:$,line_max_x:v}},[C,b,n,o,e]),L=y.useMemo(()=>{const Z=i*C/e-k.secondary_bar_w,R=C-k.secondary_bar_w,E=i
|
4102
|
+
`,l9=({max:e=100,limit_max:n=70,limit_min:o=40,value:i=80,value_text:a=4200,decimals:s=2,currency:d="RON",height:c=80,selected:u=!1})=>{const g=new Intl.NumberFormat("RO",{minimumFractionDigits:s,maximumFractionDigits:s}),x=y.useRef(null),[C,f]=y.useState(0),[b,_]=y.useState(0),k=y.useMemo(()=>{const Z=b/2-12,R=Math.min(C,Math.max(C*o/e,0)),E=o*C/e-1,$=Math.min(C,Math.max(E,.5)),H=n*C/e-1,v=Math.min(C,Math.max(H,1));return{bar_h:24,bar_y:Z,secondary_bar_w:R,line_min_x:$,line_max_x:v}},[C,b,n,o,e]),L=y.useMemo(()=>{const Z=i*C/e-k.secondary_bar_w,R=C-k.secondary_bar_w,E=i>=n?t.success_200:t.danger_200,$=i>=n?t.success_500:t.danger_500,H=i>=n?t.success_800:t.danger_800;return{value:Math.min(R,Math.max(0,Z)),fill_rect_primary:E,fill_rect_secondary:$,fill_value_text:H}},[i,C]);return y.useEffect(()=>{if(x&&x.current){const S=()=>{var R;const Z=(R=x==null?void 0:x.current)==null?void 0:R.clientWidth;f(+Z),_(c)};return S(),window.addEventListener("resize",S),()=>window.removeEventListener("resize",S)}},[x,c]),r.jsxs(s9,{ref:x,width:"100%",height:"100%",viewBox:`0 0 ${C} ${b}`,xmlns:"http://www.w3.org/2000/svg",$selected:u,children:[r.jsx("rect",{x:0,y:k.bar_y,height:k.bar_h,width:C}),r.jsx("rect",{x:0,y:k.bar_y,height:k.bar_h,width:k.secondary_bar_w,fill:L.fill_rect_primary}),r.jsx("text",{className:"limitMinLabel",textAnchor:"start",x:10,y:k.bar_y+k.bar_h/1.5,fill:L.fill_value_text,children:g.format(a)+" "+d}),r.jsx("rect",{x:k.line_min_x,y:k.bar_y,height:k.bar_h,width:L.value,fill:L.fill_rect_secondary}),r.jsx("line",{x1:k.line_min_x,x2:k.line_min_x,y1:0,y2:b,strokeWidth:2,stroke:"#232529"}),r.jsx("line",{x1:k.line_max_x,x2:k.line_max_x,y1:0,y2:b,strokeWidth:2,stroke:"#232529"})]})},c9=D.svg`
|
4103
4103
|
${({$dev:e})=>e&&p`
|
4104
4104
|
background-color: #ffccef;
|
4105
4105
|
|