rbro-tat-uds 1.5.8 → 1.5.9
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 +2 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +11 -1
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
@@ -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`
|