@eliseubatista99/react-scaffold-core 0.2.7 → 0.2.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 +1 -1
- package/dist/index.es.js +4 -0
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -176,7 +176,7 @@ Please change the parent <Route path="${k}"> to <Route path="${k==="/"?"*":`${k}
|
|
|
176
176
|
box-sizing: border-box;
|
|
177
177
|
position: relative;
|
|
178
178
|
}
|
|
179
|
-
`,ss=e=>{const{containerStyles:t,pageStyles:r,children:i,allowScroll:a=!0,floatingContent:s,reserveSpaceForScrollbar:d}=e,{footer:l,header:u}=as(e);return X.jsxs(os,{id:"page-container",styles:{...t},children:[u.visible&&X.jsx("div",{ref:u.ref,id:"page-header",style:{width:"100%",zIndex:99,position:u.visibility==="fixed"?"relative":"sticky",top:0,left:0,right:0,display:"flex",flexDirection:"row",height:"fit-content",boxSizing:"border-box",...u.styles},children:u.content}),X.jsx("div",{id:"page-body",style:{width:"100%",overflow:"hidden",display:"flex",flex:1,marginTop:`-${u.height}px`,marginBottom:`-${l.height}px`},children:X.jsx("div",{id:"page-content",style:{width:"100%",overflowX:"hidden",overflowY:a?"auto":"hidden",display:"flex",flexDirection:"column",flex:1,minHeight:"100%",scrollbarGutter:d?"stable":void 0,paddingLeft:"0px",paddingRight:"0px",paddingTop:`${u.height}px`,paddingBottom:`${l.height}px`,...r},children:i})}),l.visible&&X.jsx("div",{ref:l.ref,id:"page-footer",style:{width:"100%",zIndex:99,position:l.visibility==="fixed"?"relative":"sticky",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",height:"fit-content",boxSizing:"border-box",...l.styles},children:l.content})]})};class Qt{static getField=(t,r)=>{const i=t.find(a=>a.name===r);if(i)return i};static getFieldValue=t=>{if(!(!t||!t.value))return t.value};static getFieldValueOrDefault=(t,r)=>{const i=Qt.getFieldValue(t);return i||r}}class On{static clamp=(t,r,i)=>t>i?i:t<r?r:t}class ls{static isSameObject=(t,r)=>{const i=Object.keys(t),a=Object.keys(r);return i.length!==a.length?!1:i.every(s=>Object.prototype.hasOwnProperty.call(r,s)&&t[s]===r[s])}}class us{static isScrollEnabled=()=>document.body.style.overflow==="unset"||document.body.style.overflow==="auto";static disableScroll=()=>{document.body.style.overflow="hidden"};static enableScroll=()=>{document.body.style.overflow="unset"}}class cs{static getPascalCase=t=>t.replace(/\w+/g,function(r){return r[0].toUpperCase()+r.slice(1).toLowerCase()});static isEqual=(t,r,i=!0)=>i?t===r:t.toUpperCase()===r.toUpperCase()}var ft={exports:{}},fs=ft.exports,Dr;function ds(){return Dr||(Dr=1,function(e,t){(function(r,i){e.exports=i()})(fs,function(){var r=1e3,i=6e4,a=36e5,s="millisecond",d="second",l="minute",u="hour",c="day",v="week",w="month",x="quarter",L="year",C="date",p="Invalid Date",I=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,k=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,F={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(_){var E=["th","st","nd","rd"],j=_%100;return"["+_+(E[(j-20)%10]||E[j]||E[0])+"]"}},Y=function(_,E,j){var o=String(_);return!o||o.length>=E?_:""+Array(E+1-o.length).join(j)+_},V={s:Y,z:function(_){var E=-_.utcOffset(),j=Math.abs(E),o=Math.floor(j/60),H=j%60;return(E<=0?"+":"-")+Y(o,2,"0")+":"+Y(H,2,"0")},m:function _(E,j){if(E.date()<j.date())return-_(j,E);var o=12*(j.year()-E.year())+(j.month()-E.month()),H=E.clone().add(o,w),m=j-H<0,n=E.clone().add(o+(m?-1:1),w);return+(-(o+(j-H)/(m?H-n:n-H))||0)},a:function(_){return _<0?Math.ceil(_)||0:Math.floor(_)},p:function(_){return{M:w,y:L,w:v,d:c,D:C,h:u,m:l,s:d,ms:s,Q:x}[_]||String(_||"").toLowerCase().replace(/s$/,"")},u:function(_){return _===void 0}},g="en",b={};b[g]=F;var S="$isDayjsObject",R=function(_){return _ instanceof A||!(!_||!_[S])},y=function _(E,j,o){var H;if(!E)return g;if(typeof E=="string"){var m=E.toLowerCase();b[m]&&(H=m),j&&(b[m]=j,H=m);var n=E.split("-");if(!H&&n.length>1)return _(n[0])}else{var f=E.name;b[f]=E,H=f}return!o&&H&&(g=H),H||!o&&g},h=function(_,E){if(R(_))return _.clone();var j=typeof E=="object"?E:{};return j.date=_,j.args=arguments,new A(j)},P=V;P.l=y,P.i=R,P.w=function(_,E){return h(_,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var A=function(){function _(j){this.$L=y(j.locale,null,!0),this.parse(j),this.$x=this.$x||j.x||{},this[S]=!0}var E=_.prototype;return E.parse=function(j){this.$d=function(o){var H=o.date,m=o.utc;if(H===null)return new Date(NaN);if(P.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var n=H.match(I);if(n){var f=n[2]-1||0,O=(n[7]||"0").substring(0,3);return m?new Date(Date.UTC(n[1],f,n[3]||1,n[4]||0,n[5]||0,n[6]||0,O)):new Date(n[1],f,n[3]||1,n[4]||0,n[5]||0,n[6]||0,O)}}return new Date(H)}(j),this.init()},E.init=function(){var j=this.$d;this.$y=j.getFullYear(),this.$M=j.getMonth(),this.$D=j.getDate(),this.$W=j.getDay(),this.$H=j.getHours(),this.$m=j.getMinutes(),this.$s=j.getSeconds(),this.$ms=j.getMilliseconds()},E.$utils=function(){return P},E.isValid=function(){return this.$d.toString()!==p},E.isSame=function(j,o){var H=h(j);return this.startOf(o)<=H&&H<=this.endOf(o)},E.isAfter=function(j,o){return h(j)<this.startOf(o)},E.isBefore=function(j,o){return this.endOf(o)<h(j)},E.$g=function(j,o,H){return P.u(j)?this[o]:this.set(H,j)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(j,o){var H=this,m=!!P.u(o)||o,n=P.p(j),f=function(K,G){var J=P.w(H.$u?Date.UTC(H.$y,G,K):new Date(H.$y,G,K),H);return m?J:J.endOf(c)},O=function(K,G){return P.w(H.toDate()[K].apply(H.toDate("s"),(m?[0,0,0,0]:[23,59,59,999]).slice(G)),H)},$=this.$W,D=this.$M,z=this.$D,N="set"+(this.$u?"UTC":"");switch(n){case L:return m?f(1,0):f(31,11);case w:return m?f(1,D):f(0,D+1);case v:var W=this.$locale().weekStart||0,q=($<W?$+7:$)-W;return f(m?z-q:z+(6-q),D);case c:case C:return O(N+"Hours",0);case u:return O(N+"Minutes",1);case l:return O(N+"Seconds",2);case d:return O(N+"Milliseconds",3);default:return this.clone()}},E.endOf=function(j){return this.startOf(j,!1)},E.$set=function(j,o){var H,m=P.p(j),n="set"+(this.$u?"UTC":""),f=(H={},H[c]=n+"Date",H[C]=n+"Date",H[w]=n+"Month",H[L]=n+"FullYear",H[u]=n+"Hours",H[l]=n+"Minutes",H[d]=n+"Seconds",H[s]=n+"Milliseconds",H)[m],O=m===c?this.$D+(o-this.$W):o;if(m===w||m===L){var $=this.clone().set(C,1);$.$d[f](O),$.init(),this.$d=$.set(C,Math.min(this.$D,$.daysInMonth())).$d}else f&&this.$d[f](O);return this.init(),this},E.set=function(j,o){return this.clone().$set(j,o)},E.get=function(j){return this[P.p(j)]()},E.add=function(j,o){var H,m=this;j=Number(j);var n=P.p(o),f=function(D){var z=h(m);return P.w(z.date(z.date()+Math.round(D*j)),m)};if(n===w)return this.set(w,this.$M+j);if(n===L)return this.set(L,this.$y+j);if(n===c)return f(1);if(n===v)return f(7);var O=(H={},H[l]=i,H[u]=a,H[d]=r,H)[n]||1,$=this.$d.getTime()+j*O;return P.w($,this)},E.subtract=function(j,o){return this.add(-1*j,o)},E.format=function(j){var o=this,H=this.$locale();if(!this.isValid())return H.invalidDate||p;var m=j||"YYYY-MM-DDTHH:mm:ssZ",n=P.z(this),f=this.$H,O=this.$m,$=this.$M,D=H.weekdays,z=H.months,N=H.meridiem,W=function(G,J,te,Z){return G&&(G[J]||G(o,m))||te[J].slice(0,Z)},q=function(G){return P.s(f%12||12,G,"0")},K=N||function(G,J,te){var Z=G<12?"AM":"PM";return te?Z.toLowerCase():Z};return m.replace(k,function(G,J){return J||function(te){switch(te){case"YY":return String(o.$y).slice(-2);case"YYYY":return P.s(o.$y,4,"0");case"M":return $+1;case"MM":return P.s($+1,2,"0");case"MMM":return W(H.monthsShort,$,z,3);case"MMMM":return W(z,$);case"D":return o.$D;case"DD":return P.s(o.$D,2,"0");case"d":return String(o.$W);case"dd":return W(H.weekdaysMin,o.$W,D,2);case"ddd":return W(H.weekdaysShort,o.$W,D,3);case"dddd":return D[o.$W];case"H":return String(f);case"HH":return P.s(f,2,"0");case"h":return q(1);case"hh":return q(2);case"a":return K(f,O,!0);case"A":return K(f,O,!1);case"m":return String(O);case"mm":return P.s(O,2,"0");case"s":return String(o.$s);case"ss":return P.s(o.$s,2,"0");case"SSS":return P.s(o.$ms,3,"0");case"Z":return n}return null}(G)||n.replace(":","")})},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(j,o,H){var m,n=this,f=P.p(o),O=h(j),$=(O.utcOffset()-this.utcOffset())*i,D=this-O,z=function(){return P.m(n,O)};switch(f){case L:m=z()/12;break;case w:m=z();break;case x:m=z()/3;break;case v:m=(D-$)/6048e5;break;case c:m=(D-$)/864e5;break;case u:m=D/a;break;case l:m=D/i;break;case d:m=D/r;break;default:m=D}return H?m:P.a(m)},E.daysInMonth=function(){return this.endOf(w).$D},E.$locale=function(){return b[this.$L]},E.locale=function(j,o){if(!j)return this.$L;var H=this.clone(),m=y(j,o,!0);return m&&(H.$L=m),H},E.clone=function(){return P.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},_}(),T=A.prototype;return h.prototype=T,[["$ms",s],["$s",d],["$m",l],["$H",u],["$W",c],["$M",w],["$y",L],["$D",C]].forEach(function(_){T[_[1]]=function(E){return this.$g(E,_[0],_[1])}}),h.extend=function(_,E){return _.$i||(_(E,A,h),_.$i=!0),h},h.locale=y,h.isDayjs=R,h.unix=function(_){return h(1e3*_)},h.en=b[g],h.Ls=b,h.p={},h})}(ft)),ft.exports}var hs=ds();const dt=Ut(hs);var ht={exports:{}},ps=ht.exports,Mr;function ms(){return Mr||(Mr=1,function(e,t){(function(r,i){e.exports=i()})(ps,function(){var r="minute",i=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(s,d,l){var u=d.prototype;l.utc=function(p){var I={date:p,utc:!0,args:arguments};return new d(I)},u.utc=function(p){var I=l(this.toDate(),{locale:this.$L,utc:!0});return p?I.add(this.utcOffset(),r):I},u.local=function(){return l(this.toDate(),{locale:this.$L,utc:!1})};var c=u.parse;u.parse=function(p){p.utc&&(this.$u=!0),this.$utils().u(p.$offset)||(this.$offset=p.$offset),c.call(this,p)};var v=u.init;u.init=function(){if(this.$u){var p=this.$d;this.$y=p.getUTCFullYear(),this.$M=p.getUTCMonth(),this.$D=p.getUTCDate(),this.$W=p.getUTCDay(),this.$H=p.getUTCHours(),this.$m=p.getUTCMinutes(),this.$s=p.getUTCSeconds(),this.$ms=p.getUTCMilliseconds()}else v.call(this)};var w=u.utcOffset;u.utcOffset=function(p,I){var k=this.$utils().u;if(k(p))return this.$u?0:k(this.$offset)?w.call(this):this.$offset;if(typeof p=="string"&&(p=function(g){g===void 0&&(g="");var b=g.match(i);if(!b)return null;var S=(""+b[0]).match(a)||["-",0,0],R=S[0],y=60*+S[1]+ +S[2];return y===0?0:R==="+"?y:-y}(p),p===null))return this;var F=Math.abs(p)<=16?60*p:p;if(F===0)return this.utc(I);var Y=this.clone();if(I)return Y.$offset=F,Y.$u=!1,Y;var V=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(Y=this.local().add(F+V,r)).$offset=F,Y.$x.$localOffset=V,Y};var x=u.format;u.format=function(p){var I=p||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return x.call(this,I)},u.valueOf=function(){var p=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*p},u.isUTC=function(){return!!this.$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var L=u.toDate;u.toDate=function(p){return p==="s"&&this.$offset?l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():L.call(this)};var C=u.diff;u.diff=function(p,I,k){if(p&&this.$u===p.$u)return C.call(this,p,I,k);var F=this.local(),Y=l(p).local();return C.call(F,Y,I,k)}}})}(ht)),ht.exports}var vs=ms();const gs=Ut(vs);dt.extend(gs);class ys{static waitForMilliseconds=t=>new Promise(r=>setTimeout(r,t));static waitForCondition=t=>new Promise(r=>{const i=()=>{t()?r():setTimeout(i,100)};i()});static waitForAsyncCondition=t=>new Promise(r=>{const i=async()=>{await t()?r():setTimeout(i,100)};i()});static differenceInMonths=(t,r)=>{let i=0;return i=(r.getFullYear()-t.getFullYear())*12,i-=t.getMonth(),i+=r.getMonth(),i};static isDateOneAfterDateTwo=(t,r)=>t.getFullYear()>=r.getFullYear()&&t.getMonth()>=r.getMonth()?t.getDay()>r.getDay():!1;static isSameDate=(t,r)=>t?.getFullYear()===r?.getFullYear()&&t?.getMonth()===r?.getMonth()&&t?.getDate()===r?.getDate();static getDateInUTC=t=>{try{const r=dt.utc(t),i=r.date(),a=r.month(),s=r.year(),d=r.hour(),l=r.minute(),u=r.day();return{day:i,month:a,year:s,hour:d,minute:l,weekday:u}}catch{return}};static formatDateLocalTime=(t,r)=>t?dt.utc(t).local().format(r||"DD/MM/YYYYㆍHH:mm"):"";static formatDateUTC=(t,r)=>t?dt.utc(t).format(r||"DD/MM/YYYYㆍHH:mm"):""}const bs=({percentage:e,min:t=0,max:r=100,styles:i,barStyles:a})=>{const s=On.clamp(e,t,r);return X.jsx("div",{style:{width:"90%",height:"30px",border:"1px solid #000000",borderRadius:"3px",background:"#ffffff",...i},children:X.jsx("div",{style:{width:`${s}%`,height:"100%",background:"#f58b00ff",...a}})})},ws=({checked:e,onClick:t,styles:r,checkedStyles:i,customCheckedRender:a,customUncheckedRender:s})=>{const d=e?{...r,...i}:{...r};return X.jsxs("div",{onClick:l=>{l.preventDefault(),l.stopPropagation(),t?.()},style:{width:"25px",height:"25px",borderRadius:"50%",border:e?"2px solid #000000":"2px solid #969696ff",background:e?"#000000":"#ffffff",overflow:"hidden",objectFit:"contain",alignItems:"center",justifyContent:"center",display:"flex",...d},children:[e&&X.jsxs(X.Fragment,{children:[!a&&X.jsx("div",{style:{borderRadius:"50%",aspectRatio:"1/1",width:"40%",background:"#ffffff"}}),a]}),!e&&s]})},Ss=({src:e,width:t="22",height:r="28",stroke:i,viewBox:a="0 0 22 28",fill:s="#000000",alt:d="",onClick:l,styles:u})=>X.jsx("div",{style:{width:"fit-content",height:"fit-content",display:"flex",alignItems:"center",justifyContent:"center",...u},onClick:()=>l?.(),children:X.jsx("svg",{width:t,height:r,viewBox:a,fill:s,stroke:i,xmlns:"http://www.w3.org/2000/svg",style:{display:"flex"},children:e})}),xs=Pe.div`
|
|
179
|
+
`,ss=e=>{const{containerStyles:t,pageStyles:r,children:i,allowScroll:a=!0,floatingContent:s,reserveSpaceForScrollbar:d}=e,{footer:l,header:u}=as(e);return X.jsxs(os,{id:"page-container",styles:{...t},children:[u.visible&&X.jsx("div",{ref:u.ref,id:"page-header",style:{width:"100%",zIndex:99,position:u.visibility==="fixed"?"relative":"sticky",top:0,left:0,right:0,display:"flex",flexDirection:"row",height:"fit-content",boxSizing:"border-box",...u.styles},children:u.content}),X.jsx("div",{id:"page-body",style:{width:"100%",overflow:"hidden",display:"flex",flex:1,marginTop:`-${u.height}px`,marginBottom:`-${l.height}px`},children:X.jsx("div",{id:"page-content",style:{width:"100%",overflowX:"hidden",overflowY:a?"auto":"hidden",display:"flex",flexDirection:"column",flex:1,minHeight:"100%",scrollbarGutter:d?"stable":void 0,paddingLeft:"0px",paddingRight:"0px",paddingTop:`${u.height}px`,paddingBottom:`${l.height}px`,...r},children:i})}),l.visible&&X.jsx("div",{ref:l.ref,id:"page-footer",style:{width:"100%",zIndex:99,position:l.visibility==="fixed"?"relative":"sticky",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",height:"fit-content",boxSizing:"border-box",...l.styles},children:l.content})]})};class Qt{static getField=(t,r)=>{const i=t.find(a=>a.name===r);if(i)return i};static getFieldValue=t=>{if(!(!t||!t.value))return t.value};static getFieldValueOrDefault=(t,r)=>{const i=Qt.getFieldValue(t);return i||r}}class On{static clamp=(t,r,i)=>t>i?i:t<r?r:t}class ls{static isSameObject=(t,r)=>{if(t==null)return r==null;if(r==null)return t==null;const i=Object.keys(t),a=Object.keys(r);return i.length!==a.length?!1:i.every(s=>Object.prototype.hasOwnProperty.call(r,s)&&t[s]===r[s])}}class us{static isScrollEnabled=()=>document.body.style.overflow==="unset"||document.body.style.overflow==="auto";static disableScroll=()=>{document.body.style.overflow="hidden"};static enableScroll=()=>{document.body.style.overflow="unset"}}class cs{static getPascalCase=t=>t.replace(/\w+/g,function(r){return r[0].toUpperCase()+r.slice(1).toLowerCase()});static isEqual=(t,r,i=!0)=>i?t===r:t.toUpperCase()===r.toUpperCase()}var ft={exports:{}},fs=ft.exports,Dr;function ds(){return Dr||(Dr=1,function(e,t){(function(r,i){e.exports=i()})(fs,function(){var r=1e3,i=6e4,a=36e5,s="millisecond",d="second",l="minute",u="hour",c="day",v="week",w="month",x="quarter",L="year",C="date",p="Invalid Date",I=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,k=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,F={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(_){var E=["th","st","nd","rd"],j=_%100;return"["+_+(E[(j-20)%10]||E[j]||E[0])+"]"}},Y=function(_,E,j){var o=String(_);return!o||o.length>=E?_:""+Array(E+1-o.length).join(j)+_},V={s:Y,z:function(_){var E=-_.utcOffset(),j=Math.abs(E),o=Math.floor(j/60),H=j%60;return(E<=0?"+":"-")+Y(o,2,"0")+":"+Y(H,2,"0")},m:function _(E,j){if(E.date()<j.date())return-_(j,E);var o=12*(j.year()-E.year())+(j.month()-E.month()),H=E.clone().add(o,w),m=j-H<0,n=E.clone().add(o+(m?-1:1),w);return+(-(o+(j-H)/(m?H-n:n-H))||0)},a:function(_){return _<0?Math.ceil(_)||0:Math.floor(_)},p:function(_){return{M:w,y:L,w:v,d:c,D:C,h:u,m:l,s:d,ms:s,Q:x}[_]||String(_||"").toLowerCase().replace(/s$/,"")},u:function(_){return _===void 0}},g="en",b={};b[g]=F;var S="$isDayjsObject",R=function(_){return _ instanceof A||!(!_||!_[S])},y=function _(E,j,o){var H;if(!E)return g;if(typeof E=="string"){var m=E.toLowerCase();b[m]&&(H=m),j&&(b[m]=j,H=m);var n=E.split("-");if(!H&&n.length>1)return _(n[0])}else{var f=E.name;b[f]=E,H=f}return!o&&H&&(g=H),H||!o&&g},h=function(_,E){if(R(_))return _.clone();var j=typeof E=="object"?E:{};return j.date=_,j.args=arguments,new A(j)},P=V;P.l=y,P.i=R,P.w=function(_,E){return h(_,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var A=function(){function _(j){this.$L=y(j.locale,null,!0),this.parse(j),this.$x=this.$x||j.x||{},this[S]=!0}var E=_.prototype;return E.parse=function(j){this.$d=function(o){var H=o.date,m=o.utc;if(H===null)return new Date(NaN);if(P.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var n=H.match(I);if(n){var f=n[2]-1||0,O=(n[7]||"0").substring(0,3);return m?new Date(Date.UTC(n[1],f,n[3]||1,n[4]||0,n[5]||0,n[6]||0,O)):new Date(n[1],f,n[3]||1,n[4]||0,n[5]||0,n[6]||0,O)}}return new Date(H)}(j),this.init()},E.init=function(){var j=this.$d;this.$y=j.getFullYear(),this.$M=j.getMonth(),this.$D=j.getDate(),this.$W=j.getDay(),this.$H=j.getHours(),this.$m=j.getMinutes(),this.$s=j.getSeconds(),this.$ms=j.getMilliseconds()},E.$utils=function(){return P},E.isValid=function(){return this.$d.toString()!==p},E.isSame=function(j,o){var H=h(j);return this.startOf(o)<=H&&H<=this.endOf(o)},E.isAfter=function(j,o){return h(j)<this.startOf(o)},E.isBefore=function(j,o){return this.endOf(o)<h(j)},E.$g=function(j,o,H){return P.u(j)?this[o]:this.set(H,j)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(j,o){var H=this,m=!!P.u(o)||o,n=P.p(j),f=function(K,G){var J=P.w(H.$u?Date.UTC(H.$y,G,K):new Date(H.$y,G,K),H);return m?J:J.endOf(c)},O=function(K,G){return P.w(H.toDate()[K].apply(H.toDate("s"),(m?[0,0,0,0]:[23,59,59,999]).slice(G)),H)},$=this.$W,D=this.$M,z=this.$D,N="set"+(this.$u?"UTC":"");switch(n){case L:return m?f(1,0):f(31,11);case w:return m?f(1,D):f(0,D+1);case v:var W=this.$locale().weekStart||0,q=($<W?$+7:$)-W;return f(m?z-q:z+(6-q),D);case c:case C:return O(N+"Hours",0);case u:return O(N+"Minutes",1);case l:return O(N+"Seconds",2);case d:return O(N+"Milliseconds",3);default:return this.clone()}},E.endOf=function(j){return this.startOf(j,!1)},E.$set=function(j,o){var H,m=P.p(j),n="set"+(this.$u?"UTC":""),f=(H={},H[c]=n+"Date",H[C]=n+"Date",H[w]=n+"Month",H[L]=n+"FullYear",H[u]=n+"Hours",H[l]=n+"Minutes",H[d]=n+"Seconds",H[s]=n+"Milliseconds",H)[m],O=m===c?this.$D+(o-this.$W):o;if(m===w||m===L){var $=this.clone().set(C,1);$.$d[f](O),$.init(),this.$d=$.set(C,Math.min(this.$D,$.daysInMonth())).$d}else f&&this.$d[f](O);return this.init(),this},E.set=function(j,o){return this.clone().$set(j,o)},E.get=function(j){return this[P.p(j)]()},E.add=function(j,o){var H,m=this;j=Number(j);var n=P.p(o),f=function(D){var z=h(m);return P.w(z.date(z.date()+Math.round(D*j)),m)};if(n===w)return this.set(w,this.$M+j);if(n===L)return this.set(L,this.$y+j);if(n===c)return f(1);if(n===v)return f(7);var O=(H={},H[l]=i,H[u]=a,H[d]=r,H)[n]||1,$=this.$d.getTime()+j*O;return P.w($,this)},E.subtract=function(j,o){return this.add(-1*j,o)},E.format=function(j){var o=this,H=this.$locale();if(!this.isValid())return H.invalidDate||p;var m=j||"YYYY-MM-DDTHH:mm:ssZ",n=P.z(this),f=this.$H,O=this.$m,$=this.$M,D=H.weekdays,z=H.months,N=H.meridiem,W=function(G,J,te,Z){return G&&(G[J]||G(o,m))||te[J].slice(0,Z)},q=function(G){return P.s(f%12||12,G,"0")},K=N||function(G,J,te){var Z=G<12?"AM":"PM";return te?Z.toLowerCase():Z};return m.replace(k,function(G,J){return J||function(te){switch(te){case"YY":return String(o.$y).slice(-2);case"YYYY":return P.s(o.$y,4,"0");case"M":return $+1;case"MM":return P.s($+1,2,"0");case"MMM":return W(H.monthsShort,$,z,3);case"MMMM":return W(z,$);case"D":return o.$D;case"DD":return P.s(o.$D,2,"0");case"d":return String(o.$W);case"dd":return W(H.weekdaysMin,o.$W,D,2);case"ddd":return W(H.weekdaysShort,o.$W,D,3);case"dddd":return D[o.$W];case"H":return String(f);case"HH":return P.s(f,2,"0");case"h":return q(1);case"hh":return q(2);case"a":return K(f,O,!0);case"A":return K(f,O,!1);case"m":return String(O);case"mm":return P.s(O,2,"0");case"s":return String(o.$s);case"ss":return P.s(o.$s,2,"0");case"SSS":return P.s(o.$ms,3,"0");case"Z":return n}return null}(G)||n.replace(":","")})},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(j,o,H){var m,n=this,f=P.p(o),O=h(j),$=(O.utcOffset()-this.utcOffset())*i,D=this-O,z=function(){return P.m(n,O)};switch(f){case L:m=z()/12;break;case w:m=z();break;case x:m=z()/3;break;case v:m=(D-$)/6048e5;break;case c:m=(D-$)/864e5;break;case u:m=D/a;break;case l:m=D/i;break;case d:m=D/r;break;default:m=D}return H?m:P.a(m)},E.daysInMonth=function(){return this.endOf(w).$D},E.$locale=function(){return b[this.$L]},E.locale=function(j,o){if(!j)return this.$L;var H=this.clone(),m=y(j,o,!0);return m&&(H.$L=m),H},E.clone=function(){return P.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},_}(),T=A.prototype;return h.prototype=T,[["$ms",s],["$s",d],["$m",l],["$H",u],["$W",c],["$M",w],["$y",L],["$D",C]].forEach(function(_){T[_[1]]=function(E){return this.$g(E,_[0],_[1])}}),h.extend=function(_,E){return _.$i||(_(E,A,h),_.$i=!0),h},h.locale=y,h.isDayjs=R,h.unix=function(_){return h(1e3*_)},h.en=b[g],h.Ls=b,h.p={},h})}(ft)),ft.exports}var hs=ds();const dt=Ut(hs);var ht={exports:{}},ps=ht.exports,Mr;function ms(){return Mr||(Mr=1,function(e,t){(function(r,i){e.exports=i()})(ps,function(){var r="minute",i=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(s,d,l){var u=d.prototype;l.utc=function(p){var I={date:p,utc:!0,args:arguments};return new d(I)},u.utc=function(p){var I=l(this.toDate(),{locale:this.$L,utc:!0});return p?I.add(this.utcOffset(),r):I},u.local=function(){return l(this.toDate(),{locale:this.$L,utc:!1})};var c=u.parse;u.parse=function(p){p.utc&&(this.$u=!0),this.$utils().u(p.$offset)||(this.$offset=p.$offset),c.call(this,p)};var v=u.init;u.init=function(){if(this.$u){var p=this.$d;this.$y=p.getUTCFullYear(),this.$M=p.getUTCMonth(),this.$D=p.getUTCDate(),this.$W=p.getUTCDay(),this.$H=p.getUTCHours(),this.$m=p.getUTCMinutes(),this.$s=p.getUTCSeconds(),this.$ms=p.getUTCMilliseconds()}else v.call(this)};var w=u.utcOffset;u.utcOffset=function(p,I){var k=this.$utils().u;if(k(p))return this.$u?0:k(this.$offset)?w.call(this):this.$offset;if(typeof p=="string"&&(p=function(g){g===void 0&&(g="");var b=g.match(i);if(!b)return null;var S=(""+b[0]).match(a)||["-",0,0],R=S[0],y=60*+S[1]+ +S[2];return y===0?0:R==="+"?y:-y}(p),p===null))return this;var F=Math.abs(p)<=16?60*p:p;if(F===0)return this.utc(I);var Y=this.clone();if(I)return Y.$offset=F,Y.$u=!1,Y;var V=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(Y=this.local().add(F+V,r)).$offset=F,Y.$x.$localOffset=V,Y};var x=u.format;u.format=function(p){var I=p||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return x.call(this,I)},u.valueOf=function(){var p=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*p},u.isUTC=function(){return!!this.$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var L=u.toDate;u.toDate=function(p){return p==="s"&&this.$offset?l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():L.call(this)};var C=u.diff;u.diff=function(p,I,k){if(p&&this.$u===p.$u)return C.call(this,p,I,k);var F=this.local(),Y=l(p).local();return C.call(F,Y,I,k)}}})}(ht)),ht.exports}var vs=ms();const gs=Ut(vs);dt.extend(gs);class ys{static waitForMilliseconds=t=>new Promise(r=>setTimeout(r,t));static waitForCondition=t=>new Promise(r=>{const i=()=>{t()?r():setTimeout(i,100)};i()});static waitForAsyncCondition=t=>new Promise(r=>{const i=async()=>{await t()?r():setTimeout(i,100)};i()});static differenceInMonths=(t,r)=>{let i=0;return i=(r.getFullYear()-t.getFullYear())*12,i-=t.getMonth(),i+=r.getMonth(),i};static isDateOneAfterDateTwo=(t,r)=>t.getFullYear()>=r.getFullYear()&&t.getMonth()>=r.getMonth()?t.getDay()>r.getDay():!1;static isSameDate=(t,r)=>t?.getFullYear()===r?.getFullYear()&&t?.getMonth()===r?.getMonth()&&t?.getDate()===r?.getDate();static getDateInUTC=t=>{try{const r=dt.utc(t),i=r.date(),a=r.month(),s=r.year(),d=r.hour(),l=r.minute(),u=r.day();return{day:i,month:a,year:s,hour:d,minute:l,weekday:u}}catch{return}};static formatDateLocalTime=(t,r)=>t?dt.utc(t).local().format(r||"DD/MM/YYYYㆍHH:mm"):"";static formatDateUTC=(t,r)=>t?dt.utc(t).format(r||"DD/MM/YYYYㆍHH:mm"):""}const bs=({percentage:e,min:t=0,max:r=100,styles:i,barStyles:a})=>{const s=On.clamp(e,t,r);return X.jsx("div",{style:{width:"90%",height:"30px",border:"1px solid #000000",borderRadius:"3px",background:"#ffffff",...i},children:X.jsx("div",{style:{width:`${s}%`,height:"100%",background:"#f58b00ff",...a}})})},ws=({checked:e,onClick:t,styles:r,checkedStyles:i,customCheckedRender:a,customUncheckedRender:s})=>{const d=e?{...r,...i}:{...r};return X.jsxs("div",{onClick:l=>{l.preventDefault(),l.stopPropagation(),t?.()},style:{width:"25px",height:"25px",borderRadius:"50%",border:e?"2px solid #000000":"2px solid #969696ff",background:e?"#000000":"#ffffff",overflow:"hidden",objectFit:"contain",alignItems:"center",justifyContent:"center",display:"flex",...d},children:[e&&X.jsxs(X.Fragment,{children:[!a&&X.jsx("div",{style:{borderRadius:"50%",aspectRatio:"1/1",width:"40%",background:"#ffffff"}}),a]}),!e&&s]})},Ss=({src:e,width:t="22",height:r="28",stroke:i,viewBox:a="0 0 22 28",fill:s="#000000",alt:d="",onClick:l,styles:u})=>X.jsx("div",{style:{width:"fit-content",height:"fit-content",display:"flex",alignItems:"center",justifyContent:"center",...u},onClick:()=>l?.(),children:X.jsx("svg",{width:t,height:r,viewBox:a,fill:s,stroke:i,xmlns:"http://www.w3.org/2000/svg",style:{display:"flex"},children:e})}),xs=Pe.div`
|
|
180
180
|
display: flex;
|
|
181
181
|
flex-direction: column;
|
|
182
182
|
font-family: inherit;
|
package/dist/index.es.js
CHANGED
|
@@ -6690,6 +6690,10 @@ class Go {
|
|
|
6690
6690
|
}
|
|
6691
6691
|
class Os {
|
|
6692
6692
|
static isSameObject = (t, r) => {
|
|
6693
|
+
if (t == null)
|
|
6694
|
+
return r == null;
|
|
6695
|
+
if (r == null)
|
|
6696
|
+
return t == null;
|
|
6693
6697
|
const i = Object.keys(t), a = Object.keys(r);
|
|
6694
6698
|
return i.length !== a.length ? !1 : i.every(
|
|
6695
6699
|
(s) => Object.prototype.hasOwnProperty.call(r, s) && t[s] === r[s]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eliseubatista99/react-scaffold-core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A library which provides basic components, hooks, helpers and providers to easily build a React application and avoid repeating the usual code.",
|
|
6
6
|
"main": "dist/index.cjs.js",
|