rbro-tat-uds 1.5.8 → 1.5.10
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 +6 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +24 -11
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
@@ -1386,7 +1386,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[i2]+=1);const ft=e=>l.createE
|
|
1386
1386
|
`,u7=S.div`
|
1387
1387
|
flex: 1;
|
1388
1388
|
height: 100%;
|
1389
|
-
cursor: pointer;
|
1389
|
+
cursor: ${({$disabled:e})=>e?"default":"pointer"};
|
1390
1390
|
display: flex;
|
1391
1391
|
align-items: center;
|
1392
1392
|
justify-content: center;
|
@@ -1397,7 +1397,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[i2]+=1);const ft=e=>l.createE
|
|
1397
1397
|
flex: 1;
|
1398
1398
|
border-radius: 2px;
|
1399
1399
|
background: ${t.gray_60};
|
1400
|
-
cursor: pointer;
|
1400
|
+
cursor: ${({$disabled:e})=>e?"default":"pointer"};
|
1401
1401
|
position: relative;
|
1402
1402
|
outline: none;
|
1403
1403
|
|
@@ -1405,7 +1405,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[i2]+=1);const ft=e=>l.createE
|
|
1405
1405
|
position: absolute;
|
1406
1406
|
left: 0;
|
1407
1407
|
height: 100%;
|
1408
|
-
background-color: ${t.info_700};
|
1408
|
+
background-color: ${({$disabled:e})=>e?t.gray_300:t.info_700};
|
1409
1409
|
border-radius: inherit;
|
1410
1410
|
|
1411
1411
|
& > span {
|
@@ -1422,7 +1422,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[i2]+=1);const ft=e=>l.createE
|
|
1422
1422
|
}
|
1423
1423
|
}
|
1424
1424
|
}
|
1425
|
-
`,g7=({id:e,name:n,value:o=0,setValue:i,min:a=0,max:s=100,showSteppers:h=!1,stepSize:d=1,disabled:C=!1,height:u=32,wrapperWidth:x,...b})=>{const f=y.useRef(null),[_,m]=y.useState(!1),M=y.useCallback(v=>{var T,w;const W=(T=f.current)==null?void 0:T.getBoundingClientRect();if(W){let A;if("touches"in v?A=(w=v.touches[0])==null?void 0:w.clientX:"clientX"in v&&(A=v.clientX),A!==void 0){const F=A-W.left,g=W.width,j=F/g*(s-a)+a;let P=Math.round(j/d)*d;P=Math.max(a,P),P=Math.min(s,P),i&&i(P)}}},[s,a,i,d]),$=v=>{if(v==="minus"){if(o===a)return;if(o-d<a){i&&i(a);return}i&&i(o-d)}else{if(o===s)return;if(o+d>s){i&&i(s);return}i&&i(o+d)}},R=y.useCallback(()=>{i&&i(o),m(!1)},[o,i]),Z=y.useCallback(v=>{_&&M(v)},[_,M]),V=v=>{M(v),m(!0)},D=v=>{m(!0),M(v)},k=y.useCallback(v=>{M(v)},[M]),E=y.useCallback(()=>{i&&i(o),m(!1)},[o,i]);return y.useEffect(()=>(_&&(window.addEventListener("mousemove",Z),window.addEventListener("mouseup",R),window.addEventListener("touchmove",k,{passive:!0}),window.addEventListener("touchend",E)),()=>{window.removeEventListener("mousemove",Z),window.removeEventListener("mouseup",R),window.removeEventListener("touchmove",k),window.removeEventListener("touchend",E)}
|
1425
|
+
`,g7=({id:e,name:n,value:o=0,setValue:i,min:a=0,max:s=100,showSteppers:h=!1,stepSize:d=1,disabled:C=!1,height:u=32,wrapperWidth:x,...b})=>{const f=y.useRef(null),[_,m]=y.useState(!1),M=y.useCallback(v=>{var T,w;const W=(T=f.current)==null?void 0:T.getBoundingClientRect();if(W){let A;if("touches"in v?A=(w=v.touches[0])==null?void 0:w.clientX:"clientX"in v&&(A=v.clientX),A!==void 0){const F=A-W.left,g=W.width,j=F/g*(s-a)+a;let P=Math.round(j/d)*d;P=Math.max(a,P),P=Math.min(s,P),i&&i(P)}}},[s,a,i,d]),$=v=>{if(v==="minus"){if(o===a)return;if(o-d<a){i&&i(a);return}i&&i(o-d)}else{if(o===s)return;if(o+d>s){i&&i(s);return}i&&i(o+d)}},R=y.useCallback(()=>{i&&i(o),m(!1)},[o,i]),Z=y.useCallback(v=>{_&&M(v)},[_,M]),V=v=>{C||(M(v),m(!0))},D=v=>{m(!0),M(v)},k=y.useCallback(v=>{M(v)},[M]),E=y.useCallback(()=>{i&&i(o),m(!1)},[o,i]);return y.useEffect(()=>{if(!C)return _&&(window.addEventListener("mousemove",Z),window.addEventListener("mouseup",R),window.addEventListener("touchmove",k,{passive:!0}),window.addEventListener("touchend",E)),()=>{window.removeEventListener("mousemove",Z),window.removeEventListener("mouseup",R),window.removeEventListener("touchmove",k),window.removeEventListener("touchend",E)}},[_,Z,R,E,k]),r.jsxs(C7,{$height:u,$showSteppers:h,$disabled:C,$wrapperWidth:x,children:[h&&r.jsx(b1,{disabled:C,icon:"minus",intent:"info",variant:"secondaryOutlined",size:"small",shape:"circle",onClick:()=>$("minus")}),r.jsx(u7,{$disabled:C,ref:f,role:"slider",id:e,"aria-label":n,tabIndex:0,"aria-valuemin":a,"aria-valuemax":s,"aria-valuenow":o,onMouseDown:V,onTouchStart:D,...b,children:r.jsx("div",{children:r.jsx("div",{style:{width:`${(o-a)/(s-a)*100}%`},children:r.jsx("span",{style:{cursor:C?"default":_?"grabbing":"grab",right:`${(o-a)/(s-a)*100*.32-32}px`}})})})}),h&&r.jsx(b1,{disabled:C,icon:"add",intent:"info",variant:"secondaryOutlined",size:"small",shape:"circle",onClick:()=>$("add")})]})},x7=S.div`
|
1426
1426
|
display: flex;
|
1427
1427
|
flex-direction: column;
|
1428
1428
|
width: 100%;
|
@@ -2954,6 +2954,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[i2]+=1);const ft=e=>l.createE
|
|
2954
2954
|
font-size: 14px;
|
2955
2955
|
cursor: pointer;
|
2956
2956
|
color: ${({$inMonth:e,$isLimited:n})=>n?t.gray_200:e?t.gray_950:t.gray_200};
|
2957
|
+
|
2957
2958
|
grid-row: ${({$index:e})=>Math.floor(e/7)+2} / span 1;
|
2958
2959
|
transition: all 0.4s ease-out;
|
2959
2960
|
:hover {
|
@@ -2994,7 +2995,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[i2]+=1);const ft=e=>l.createE
|
|
2994
2995
|
border-radius: 9999px;
|
2995
2996
|
border: 1px solid ${t.gray_100};
|
2996
2997
|
color: ${t.gray_950};
|
2997
|
-
`,c4=({date:e,onDateChanged:n,setCalendarOpen:o,limitStart:i,limitEnd:a})=>{const[s,h]=y.useState({current:e,month:+e.getMonth()+1,year:e.getFullYear()}),[d,C]=y.useState("date"),u=w=>{const F=R1(w)?w:new Date;h({current:w,month:+F.getMonth()+1,year:F.getFullYear()})},x=y.useMemo(()=>{const{month:w,year:A}=s,F=Object.keys(Z2)[Math.max(0,Math.min(w-1,11))];return{monthname:Z2[F],year:A}},[s]),b=(w,A)=>{A&&A.preventDefault();const{current:F}=s;F&&H2(w,F)||(u(w),n&&n(w))},f=(w,A)=>{A&&A.preventDefault(),h({current:s.current,month:s.month,year:+w}),C("month")},_=(w,A)=>{A&&A.preventDefault(),h({current:s.current,month:+w,year:s.year}),C("date")},m=(w,A)=>{const F=Y0[w].toUpperCase();return r.jsx(a4,{$index:A,children:F},F+A)},M=()=>{const{current:w,month:A,year:F}=s,g=A||+(w==null?void 0:w.getMonth())+1,j=F||(w==null?void 0:w.getFullYear());return t4(g,j)},$=w=>{if(!/^\d{4}-\d{2}-\d{2}$/.test(w))return!1;const F=new Date(w),g=F.getTime();if(isNaN(g))return!1;const[j,P,I]=w.split("-");return!(F.getUTCFullYear()!==parseInt(j,10)||F.getUTCMonth()+1!==parseInt(P,10)||F.getUTCDate()!==parseInt(I,10))},R=()=>!(!i||!a||!$(i)||!$(a)),Z=()=>{if(!R())return[];const w=new Date(i),A=new Date(a),F=[];for(let g=w;g<=A;g.setDate(g.getDate()+1))F.push(new Date(g));return F},V=(w,A)=>{const{current:F,month:g,year:j}=s,P=new Date(w.join("-")),I=Z(),q=I&&!!I.length&&!I.some(Q=>Q.getTime()===P.getTime()),z=H2(P,new Date),Y=F&&H2(P,F),a1=g&&j&&Q7(P,new Date([j,g,
|
2998
|
+
`,c4=({date:e,onDateChanged:n,setCalendarOpen:o,limitStart:i,limitEnd:a})=>{const[s,h]=y.useState({current:e,month:+e.getMonth()+1,year:e.getFullYear()}),[d,C]=y.useState("date"),u=w=>{const F=R1(w)?w:new Date;h({current:w,month:+F.getMonth()+1,year:F.getFullYear()})},x=y.useMemo(()=>{const{month:w,year:A}=s,F=Object.keys(Z2)[Math.max(0,Math.min(w-1,11))];return{monthname:Z2[F],year:A}},[s]),b=(w,A)=>{A&&A.preventDefault();const{current:F}=s;F&&H2(w,F)||(u(w),n&&n(w))},f=(w,A)=>{A&&A.preventDefault(),h({current:s.current,month:s.month,year:+w}),C("month")},_=(w,A)=>{A&&A.preventDefault(),h({current:s.current,month:+w,year:s.year}),C("date")},m=(w,A)=>{const F=Y0[w].toUpperCase();return r.jsx(a4,{$index:A,children:F},F+A)},M=()=>{const{current:w,month:A,year:F}=s,g=A||+(w==null?void 0:w.getMonth())+1,j=F||(w==null?void 0:w.getFullYear());return t4(g,j)},$=w=>{if(!/^\d{4}-\d{2}-\d{2}$/.test(w))return!1;const F=new Date(w),g=F.getTime();if(isNaN(g))return!1;const[j,P,I]=w.split("-");return!(F.getUTCFullYear()!==parseInt(j,10)||F.getUTCMonth()+1!==parseInt(P,10)||F.getUTCDate()!==parseInt(I,10))},R=()=>!(!i||!a||!$(i)||!$(a)),Z=()=>{if(!R())return[];const w=new Date(i),A=new Date(a),F=[];for(let g=w;g<=A;g.setDate(g.getDate()+1))F.push(new Date(g));return F},V=(w,A)=>{const{current:F,month:g,year:j}=s,P=new Date(w.join("-")),I=Z(),q=I&&!!I.length&&!I.some(Q=>Q.getTime()===P.getTime()),z=H2(P,new Date),Y=F&&H2(P,F),a1=g&&j&&Q7(P,new Date([j.toString().padStart(2,"0"),g.toString().padStart(2,"0"),"01"].join("-"))),d1=Y?Re:z?s4:Ae;return r.jsx(d1,{$index:A,$inMonth:a1,$isLimited:q,onClick:Q=>{q||b(P,Q)},children:P.getDate()},e4(P))},D=()=>{const w=a2*4,{year:A}=s;return[...new Array(w)].map((g,j)=>+A+j)},k=w=>{const{current:A,year:F}=s,g=w===F,j=A&&A.getFullYear()===w,P=g?T2:j?U0:I2;return r.jsx(P,{onClick:I=>f(w,I),children:w},w)},E=(w,A)=>{const{current:F,year:g,month:j}=s,P=A+1===j,I=F&&F.getFullYear()===g,q=F&&F.getMonth()+1===A+1,Y=P?T2:I&&q?U0:I2;return r.jsx(Y,{onClick:a1=>_(A+1,a1),children:w.slice(0,3)},w)},v=w=>{if(w&&w.preventDefault(),d==="date")return C("year")},W=()=>{const{month:w,year:A}=s;if(d==="date"){const F=De(w,A);h({month:F.month,year:F.year,current:s.current});return}if(d==="year"){const F=A-a2*4;h({month:s.month,year:F,current:s.current});return}if(d==="month"){h({month:s.month,current:s.current,year:s.year-1});return}},T=()=>{const{month:w,year:A}=s;if(d==="date"){const F=Ze(w,A);h({month:F.month,year:F.year,current:s.current});return}if(d==="year"){const F=A+a2*4;h({month:s.month,year:F,current:s.current});return}if(d==="month"){h({month:s.month,current:s.current,year:s.year+1});return}};return r.jsxs(r4,{children:[r.jsxs(n4,{children:[r.jsx(b1,{onClick:W,title:"Previous Month",icon:"go-left",intent:"info",variant:"secondaryOutlined",shape:"rounded",size:"small"}),r.jsx("div",{children:r.jsxs("button",{onClick:v,children:[d==="date"&&x.monthname+" "+x.year,d==="year"&&x.year+"-"+(x.year+a2*4-1),d==="month"&&x.year]})}),r.jsx(b1,{onClick:T,title:"Next Month",icon:"go-right",intent:"info",variant:"secondaryOutlined",shape:"rounded",size:"small"})]}),r.jsxs(i4,{$view:d,children:[d==="date"&&r.jsxs(r.Fragment,{children:[r.jsx(r.Fragment,{children:Object.keys(Y0).map(m)}),r.jsx(r.Fragment,{children:M().map(V)})]}),d==="year"&&r.jsx(r.Fragment,{children:D().map(k)}),d==="month"&&r.jsx(r.Fragment,{children:Object.values(Z2).map(E)})]}),r.jsxs(o4,{children:[r.jsx(T1,{onClick:()=>{R()?u(new Date(i)):u(new Date),n&&(R()?n(new Date(i)):n(new Date)),o&&o(!1)},width:"auto",intent:"accent",variant:"secondaryOutlined",label:"Reseteaza"}),r.jsx(T1,{onClick:()=>{o&&o(!1)},width:"auto",intent:"accent",variant:"primary",label:"Salveaza"})]})]})},d4={medium:p`
|
2998
2999
|
height: 40px;
|
2999
3000
|
padding: 0px 38px 0px 12px;
|
3000
3001
|
`,large:p`
|