@eliseubatista99/react-scaffold-core 0.1.66 → 0.1.67

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.
@@ -0,0 +1 @@
1
+ export * from './progressBar';
@@ -0,0 +1,8 @@
1
+ export interface ProgressBarProps {
2
+ percentage: number;
3
+ min?: number;
4
+ max?: number;
5
+ styles?: React.CSSProperties;
6
+ barStyles?: React.CSSProperties;
7
+ }
8
+ export declare const ProgressBar: ({ percentage, min, max, styles, barStyles, }: ProgressBarProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { StoryObj } from '@storybook/react-vite';
2
+ declare const meta: {
3
+ title: string;
4
+ component: ({ percentage, min, max, styles, barStyles, }: import('../progressBar').ProgressBarProps) => import("react/jsx-runtime").JSX.Element;
5
+ parameters: {
6
+ layout: string;
7
+ };
8
+ tags: string[];
9
+ args: {
10
+ percentage: number;
11
+ };
12
+ };
13
+ export default meta;
14
+ type Story = StoryObj<typeof meta>;
15
+ export declare const Default: Story;
@@ -1,3 +1,4 @@
1
+ export * from './numberHelper';
1
2
  export * from './scrollHelper';
2
3
  export * from './text';
3
4
  export * from './timeHelper';
@@ -0,0 +1 @@
1
+ export * from './numberHelper';
@@ -0,0 +1,3 @@
1
+ export declare class NumberHelper {
2
+ static clamp: (num: number, min: number, max: number) => number;
3
+ }
package/dist/index.cjs.js CHANGED
@@ -198,4 +198,4 @@ Please change the parent <Route path="${C}"> to <Route path="${C==="/"?"*":`${C}
198
198
  textarea::-webkit-scrollbar-thumb:hover {
199
199
  background: #555; /* hover */
200
200
  }
201
- `,as=({name:e,label:t,leftIcon:r,rightIcon:i,bottomMessage:a,placeHolder:s,value:c,initialValue:u,onChange:l,onFocus:h,inputStyles:g,containerStyles:x,styles:j})=>{const M=p=>{l?.(p.currentTarget.value)},P=p=>{p.preventDefault(),p.stopPropagation(),h?.()};return K.jsxs(is,{style:{width:"100%",maxWidth:"357px",gap:"8px",...j},children:[t,K.jsxs("div",{style:{display:"flex",flexDirection:"row",width:"100%",margin:"8px auto 0 auto",border:"2px solid #000000",borderRadius:"5px",color:"#000000",fontFamily:"inherit",fontStyle:"normal",fontWeight:400,outline:"none",alignItems:"flex-start",gap:"10px",...x},children:[r,K.jsx("textarea",{name:e,style:{resize:"none",flex:1,border:"none",color:"inherit",fontFamily:"inherit",fontStyle:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",outline:"inherit",background:"none",minHeight:"47px",...g},placeholder:s,value:c,defaultValue:u,onChange:M,onFocus:P}),i]}),a]})},os=({id:e,children:t,styles:r,durationInSeconds:i=3})=>{const a=Y.useRef(!1),{isItemVisible:s,hideItem:c}=et();return Y.useEffect(()=>{const u=s(e);a.current!==u&&(a.current=u,u&&setTimeout(()=>c(e),i*1e3))},[a,s,c]),K.jsx(K.Fragment,{children:s(e)&&K.jsx("div",{style:{width:"100px",height:"40px",background:"#534a4aff",color:"#ffffff",position:"fixed",top:"10px",left:"50%",transform:"translateX(-50%)",zIndex:1e3,borderRadius:"20px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",border:"solid 3px #000000ff",...r},onClick:u=>{u.stopPropagation()},children:t})})},ss=({overflowEllipsis:e,maxNumberOfLines:t,children:r,styles:i})=>K.jsx("p",{style:{fontFamily:"inherit",maxWidth:"100%",overflow:"hidden",display:"-webkit-box",WebkitLineClamp:t||void 0,WebkitBoxOrient:"vertical",whiteSpace:"unset",textOverflow:e?"ellipsis":void 0,fontSize:"16px",fontStyle:"normal",lineHeight:"normal",color:"inherit",...i},children:r});class ls{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 us{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:{}},cs=ft.exports,Lr;function fs(){return Lr||(Lr=1,function(e,t){(function(r,i){e.exports=i()})(cs,function(){var r=1e3,i=6e4,a=36e5,s="millisecond",c="second",u="minute",l="hour",h="day",g="week",x="month",j="quarter",M="year",P="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+)?$/,C=/\[([^\]]+)]|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,N={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(T){var O=["th","st","nd","rd"],_=T%100;return"["+T+(O[(_-20)%10]||O[_]||O[0])+"]"}},U=function(T,O,_){var o=String(T);return!o||o.length>=O?T:""+Array(O+1-o.length).join(_)+T},V={s:U,z:function(T){var O=-T.utcOffset(),_=Math.abs(O),o=Math.floor(_/60),H=_%60;return(O<=0?"+":"-")+U(o,2,"0")+":"+U(H,2,"0")},m:function T(O,_){if(O.date()<_.date())return-T(_,O);var o=12*(_.year()-O.year())+(_.month()-O.month()),H=O.clone().add(o,x),m=_-H<0,n=O.clone().add(o+(m?-1:1),x);return+(-(o+(_-H)/(m?H-n:n-H))||0)},a:function(T){return T<0?Math.ceil(T)||0:Math.floor(T)},p:function(T){return{M:x,y:M,w:g,d:h,D:P,h:l,m:u,s:c,ms:s,Q:j}[T]||String(T||"").toLowerCase().replace(/s$/,"")},u:function(T){return T===void 0}},v="en",b={};b[v]=N;var w="$isDayjsObject",E=function(T){return T instanceof A||!(!T||!T[w])},y=function T(O,_,o){var H;if(!O)return v;if(typeof O=="string"){var m=O.toLowerCase();b[m]&&(H=m),_&&(b[m]=_,H=m);var n=O.split("-");if(!H&&n.length>1)return T(n[0])}else{var f=O.name;b[f]=O,H=f}return!o&&H&&(v=H),H||!o&&v},d=function(T,O){if(E(T))return T.clone();var _=typeof O=="object"?O:{};return _.date=T,_.args=arguments,new A(_)},k=V;k.l=y,k.i=E,k.w=function(T,O){return d(T,{locale:O.$L,utc:O.$u,x:O.$x,$offset:O.$offset})};var A=function(){function T(_){this.$L=y(_.locale,null,!0),this.parse(_),this.$x=this.$x||_.x||{},this[w]=!0}var O=T.prototype;return O.parse=function(_){this.$d=function(o){var H=o.date,m=o.utc;if(H===null)return new Date(NaN);if(k.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,S=(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,S)):new Date(n[1],f,n[3]||1,n[4]||0,n[5]||0,n[6]||0,S)}}return new Date(H)}(_),this.init()},O.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},O.$utils=function(){return k},O.isValid=function(){return this.$d.toString()!==p},O.isSame=function(_,o){var H=d(_);return this.startOf(o)<=H&&H<=this.endOf(o)},O.isAfter=function(_,o){return d(_)<this.startOf(o)},O.isBefore=function(_,o){return this.endOf(o)<d(_)},O.$g=function(_,o,H){return k.u(_)?this[o]:this.set(H,_)},O.unix=function(){return Math.floor(this.valueOf()/1e3)},O.valueOf=function(){return this.$d.getTime()},O.startOf=function(_,o){var H=this,m=!!k.u(o)||o,n=k.p(_),f=function(G,X){var J=k.w(H.$u?Date.UTC(H.$y,X,G):new Date(H.$y,X,G),H);return m?J:J.endOf(h)},S=function(G,X){return k.w(H.toDate()[G].apply(H.toDate("s"),(m?[0,0,0,0]:[23,59,59,999]).slice(X)),H)},$=this.$W,L=this.$M,z=this.$D,F="set"+(this.$u?"UTC":"");switch(n){case M:return m?f(1,0):f(31,11);case x:return m?f(1,L):f(0,L+1);case g:var W=this.$locale().weekStart||0,B=($<W?$+7:$)-W;return f(m?z-B:z+(6-B),L);case h:case P:return S(F+"Hours",0);case l:return S(F+"Minutes",1);case u:return S(F+"Seconds",2);case c:return S(F+"Milliseconds",3);default:return this.clone()}},O.endOf=function(_){return this.startOf(_,!1)},O.$set=function(_,o){var H,m=k.p(_),n="set"+(this.$u?"UTC":""),f=(H={},H[h]=n+"Date",H[P]=n+"Date",H[x]=n+"Month",H[M]=n+"FullYear",H[l]=n+"Hours",H[u]=n+"Minutes",H[c]=n+"Seconds",H[s]=n+"Milliseconds",H)[m],S=m===h?this.$D+(o-this.$W):o;if(m===x||m===M){var $=this.clone().set(P,1);$.$d[f](S),$.init(),this.$d=$.set(P,Math.min(this.$D,$.daysInMonth())).$d}else f&&this.$d[f](S);return this.init(),this},O.set=function(_,o){return this.clone().$set(_,o)},O.get=function(_){return this[k.p(_)]()},O.add=function(_,o){var H,m=this;_=Number(_);var n=k.p(o),f=function(L){var z=d(m);return k.w(z.date(z.date()+Math.round(L*_)),m)};if(n===x)return this.set(x,this.$M+_);if(n===M)return this.set(M,this.$y+_);if(n===h)return f(1);if(n===g)return f(7);var S=(H={},H[u]=i,H[l]=a,H[c]=r,H)[n]||1,$=this.$d.getTime()+_*S;return k.w($,this)},O.subtract=function(_,o){return this.add(-1*_,o)},O.format=function(_){var o=this,H=this.$locale();if(!this.isValid())return H.invalidDate||p;var m=_||"YYYY-MM-DDTHH:mm:ssZ",n=k.z(this),f=this.$H,S=this.$m,$=this.$M,L=H.weekdays,z=H.months,F=H.meridiem,W=function(X,J,te,Z){return X&&(X[J]||X(o,m))||te[J].slice(0,Z)},B=function(X){return k.s(f%12||12,X,"0")},G=F||function(X,J,te){var Z=X<12?"AM":"PM";return te?Z.toLowerCase():Z};return m.replace(C,function(X,J){return J||function(te){switch(te){case"YY":return String(o.$y).slice(-2);case"YYYY":return k.s(o.$y,4,"0");case"M":return $+1;case"MM":return k.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 k.s(o.$D,2,"0");case"d":return String(o.$W);case"dd":return W(H.weekdaysMin,o.$W,L,2);case"ddd":return W(H.weekdaysShort,o.$W,L,3);case"dddd":return L[o.$W];case"H":return String(f);case"HH":return k.s(f,2,"0");case"h":return B(1);case"hh":return B(2);case"a":return G(f,S,!0);case"A":return G(f,S,!1);case"m":return String(S);case"mm":return k.s(S,2,"0");case"s":return String(o.$s);case"ss":return k.s(o.$s,2,"0");case"SSS":return k.s(o.$ms,3,"0");case"Z":return n}return null}(X)||n.replace(":","")})},O.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},O.diff=function(_,o,H){var m,n=this,f=k.p(o),S=d(_),$=(S.utcOffset()-this.utcOffset())*i,L=this-S,z=function(){return k.m(n,S)};switch(f){case M:m=z()/12;break;case x:m=z();break;case j:m=z()/3;break;case g:m=(L-$)/6048e5;break;case h:m=(L-$)/864e5;break;case l:m=L/a;break;case u:m=L/i;break;case c:m=L/r;break;default:m=L}return H?m:k.a(m)},O.daysInMonth=function(){return this.endOf(x).$D},O.$locale=function(){return b[this.$L]},O.locale=function(_,o){if(!_)return this.$L;var H=this.clone(),m=y(_,o,!0);return m&&(H.$L=m),H},O.clone=function(){return k.w(this.$d,this)},O.toDate=function(){return new Date(this.valueOf())},O.toJSON=function(){return this.isValid()?this.toISOString():null},O.toISOString=function(){return this.$d.toISOString()},O.toString=function(){return this.$d.toUTCString()},T}(),R=A.prototype;return d.prototype=R,[["$ms",s],["$s",c],["$m",u],["$H",l],["$W",h],["$M",x],["$y",M],["$D",P]].forEach(function(T){R[T[1]]=function(O){return this.$g(O,T[0],T[1])}}),d.extend=function(T,O){return T.$i||(T(O,A,d),T.$i=!0),d},d.locale=y,d.isDayjs=E,d.unix=function(T){return d(1e3*T)},d.en=b[v],d.Ls=b,d.p={},d})}(ft)),ft.exports}var ds=fs();const dt=Ut(ds);var ht={exports:{}},hs=ht.exports,Dr;function ps(){return Dr||(Dr=1,function(e,t){(function(r,i){e.exports=i()})(hs,function(){var r="minute",i=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(s,c,u){var l=c.prototype;u.utc=function(p){var I={date:p,utc:!0,args:arguments};return new c(I)},l.utc=function(p){var I=u(this.toDate(),{locale:this.$L,utc:!0});return p?I.add(this.utcOffset(),r):I},l.local=function(){return u(this.toDate(),{locale:this.$L,utc:!1})};var h=l.parse;l.parse=function(p){p.utc&&(this.$u=!0),this.$utils().u(p.$offset)||(this.$offset=p.$offset),h.call(this,p)};var g=l.init;l.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 g.call(this)};var x=l.utcOffset;l.utcOffset=function(p,I){var C=this.$utils().u;if(C(p))return this.$u?0:C(this.$offset)?x.call(this):this.$offset;if(typeof p=="string"&&(p=function(v){v===void 0&&(v="");var b=v.match(i);if(!b)return null;var w=(""+b[0]).match(a)||["-",0,0],E=w[0],y=60*+w[1]+ +w[2];return y===0?0:E==="+"?y:-y}(p),p===null))return this;var N=Math.abs(p)<=16?60*p:p;if(N===0)return this.utc(I);var U=this.clone();if(I)return U.$offset=N,U.$u=!1,U;var V=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(U=this.local().add(N+V,r)).$offset=N,U.$x.$localOffset=V,U};var j=l.format;l.format=function(p){var I=p||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return j.call(this,I)},l.valueOf=function(){var p=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*p},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var M=l.toDate;l.toDate=function(p){return p==="s"&&this.$offset?u(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():M.call(this)};var P=l.diff;l.diff=function(p,I,C){if(p&&this.$u===p.$u)return P.call(this,p,I,C);var N=this.local(),U=u(p).local();return P.call(N,U,I,C)}}})}(ht)),ht.exports}var ms=ps();const vs=Ut(ms);dt.extend(vs);class gs{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 getDateInUTC=t=>{try{const r=dt.utc(t),i=r.date(),a=r.month(),s=r.year(),c=r.hour(),u=r.minute(),l=r.day();return{day:i,month:a,year:s,hour:c,minute:u,weekday:l}}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"):""}exports.Button=En;exports.Carousel=ia;exports.Checkbox=aa;exports.Drawer=qo;exports.FeedbackProvider=Uo;exports.Form=Xo;exports.Image=Go;exports.InputField=Jo;exports.Loader=Zo;exports.Modal=Qo;exports.NavigationProvider=Wo;exports.PageLayout=rs;exports.ScrollHelper=ls;exports.SvgImage=ns;exports.TextAreaField=as;exports.TextHelper=us;exports.TimeHelper=gs;exports.Toast=os;exports.Typography=ss;exports.defaultBreakpoints=Qr;exports.useDidMount=oa;exports.useDrag=Zr;exports.useFeedback=et;exports.useFetch=sa;exports.useNavigation=Fo;exports.useOnScreen=la;exports.usePointer=Jr;exports.useResponsive=ua;exports.useTranslations=da;
201
+ `,as=({name:e,label:t,leftIcon:r,rightIcon:i,bottomMessage:a,placeHolder:s,value:c,initialValue:u,onChange:l,onFocus:h,inputStyles:g,containerStyles:x,styles:j})=>{const M=p=>{l?.(p.currentTarget.value)},P=p=>{p.preventDefault(),p.stopPropagation(),h?.()};return K.jsxs(is,{style:{width:"100%",maxWidth:"357px",gap:"8px",...j},children:[t,K.jsxs("div",{style:{display:"flex",flexDirection:"row",width:"100%",margin:"8px auto 0 auto",border:"2px solid #000000",borderRadius:"5px",color:"#000000",fontFamily:"inherit",fontStyle:"normal",fontWeight:400,outline:"none",alignItems:"flex-start",gap:"10px",...x},children:[r,K.jsx("textarea",{name:e,style:{resize:"none",flex:1,border:"none",color:"inherit",fontFamily:"inherit",fontStyle:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",outline:"inherit",background:"none",minHeight:"47px",...g},placeholder:s,value:c,defaultValue:u,onChange:M,onFocus:P}),i]}),a]})},os=({id:e,children:t,styles:r,durationInSeconds:i=3})=>{const a=Y.useRef(!1),{isItemVisible:s,hideItem:c}=et();return Y.useEffect(()=>{const u=s(e);a.current!==u&&(a.current=u,u&&setTimeout(()=>c(e),i*1e3))},[a,s,c]),K.jsx(K.Fragment,{children:s(e)&&K.jsx("div",{style:{width:"100px",height:"40px",background:"#534a4aff",color:"#ffffff",position:"fixed",top:"10px",left:"50%",transform:"translateX(-50%)",zIndex:1e3,borderRadius:"20px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",border:"solid 3px #000000ff",...r},onClick:u=>{u.stopPropagation(),u.preventDefault()},children:t})})},ss=({overflowEllipsis:e,maxNumberOfLines:t,children:r,styles:i})=>K.jsx("p",{style:{fontFamily:"inherit",maxWidth:"100%",overflow:"hidden",display:"-webkit-box",WebkitLineClamp:t||void 0,WebkitBoxOrient:"vertical",whiteSpace:"unset",textOverflow:e?"ellipsis":void 0,fontSize:"16px",fontStyle:"normal",lineHeight:"normal",color:"inherit",...i},children:r});class ls{static clamp=(t,r,i)=>t>i?i:t<r?r:t}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,Lr;function ds(){return Lr||(Lr=1,function(e,t){(function(r,i){e.exports=i()})(fs,function(){var r=1e3,i=6e4,a=36e5,s="millisecond",c="second",u="minute",l="hour",h="day",g="week",x="month",j="quarter",M="year",P="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+)?$/,C=/\[([^\]]+)]|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,N={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(T){var O=["th","st","nd","rd"],_=T%100;return"["+T+(O[(_-20)%10]||O[_]||O[0])+"]"}},U=function(T,O,_){var o=String(T);return!o||o.length>=O?T:""+Array(O+1-o.length).join(_)+T},V={s:U,z:function(T){var O=-T.utcOffset(),_=Math.abs(O),o=Math.floor(_/60),H=_%60;return(O<=0?"+":"-")+U(o,2,"0")+":"+U(H,2,"0")},m:function T(O,_){if(O.date()<_.date())return-T(_,O);var o=12*(_.year()-O.year())+(_.month()-O.month()),H=O.clone().add(o,x),m=_-H<0,n=O.clone().add(o+(m?-1:1),x);return+(-(o+(_-H)/(m?H-n:n-H))||0)},a:function(T){return T<0?Math.ceil(T)||0:Math.floor(T)},p:function(T){return{M:x,y:M,w:g,d:h,D:P,h:l,m:u,s:c,ms:s,Q:j}[T]||String(T||"").toLowerCase().replace(/s$/,"")},u:function(T){return T===void 0}},v="en",b={};b[v]=N;var w="$isDayjsObject",E=function(T){return T instanceof A||!(!T||!T[w])},y=function T(O,_,o){var H;if(!O)return v;if(typeof O=="string"){var m=O.toLowerCase();b[m]&&(H=m),_&&(b[m]=_,H=m);var n=O.split("-");if(!H&&n.length>1)return T(n[0])}else{var f=O.name;b[f]=O,H=f}return!o&&H&&(v=H),H||!o&&v},d=function(T,O){if(E(T))return T.clone();var _=typeof O=="object"?O:{};return _.date=T,_.args=arguments,new A(_)},k=V;k.l=y,k.i=E,k.w=function(T,O){return d(T,{locale:O.$L,utc:O.$u,x:O.$x,$offset:O.$offset})};var A=function(){function T(_){this.$L=y(_.locale,null,!0),this.parse(_),this.$x=this.$x||_.x||{},this[w]=!0}var O=T.prototype;return O.parse=function(_){this.$d=function(o){var H=o.date,m=o.utc;if(H===null)return new Date(NaN);if(k.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,S=(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,S)):new Date(n[1],f,n[3]||1,n[4]||0,n[5]||0,n[6]||0,S)}}return new Date(H)}(_),this.init()},O.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},O.$utils=function(){return k},O.isValid=function(){return this.$d.toString()!==p},O.isSame=function(_,o){var H=d(_);return this.startOf(o)<=H&&H<=this.endOf(o)},O.isAfter=function(_,o){return d(_)<this.startOf(o)},O.isBefore=function(_,o){return this.endOf(o)<d(_)},O.$g=function(_,o,H){return k.u(_)?this[o]:this.set(H,_)},O.unix=function(){return Math.floor(this.valueOf()/1e3)},O.valueOf=function(){return this.$d.getTime()},O.startOf=function(_,o){var H=this,m=!!k.u(o)||o,n=k.p(_),f=function(G,X){var J=k.w(H.$u?Date.UTC(H.$y,X,G):new Date(H.$y,X,G),H);return m?J:J.endOf(h)},S=function(G,X){return k.w(H.toDate()[G].apply(H.toDate("s"),(m?[0,0,0,0]:[23,59,59,999]).slice(X)),H)},$=this.$W,L=this.$M,z=this.$D,F="set"+(this.$u?"UTC":"");switch(n){case M:return m?f(1,0):f(31,11);case x:return m?f(1,L):f(0,L+1);case g:var W=this.$locale().weekStart||0,B=($<W?$+7:$)-W;return f(m?z-B:z+(6-B),L);case h:case P:return S(F+"Hours",0);case l:return S(F+"Minutes",1);case u:return S(F+"Seconds",2);case c:return S(F+"Milliseconds",3);default:return this.clone()}},O.endOf=function(_){return this.startOf(_,!1)},O.$set=function(_,o){var H,m=k.p(_),n="set"+(this.$u?"UTC":""),f=(H={},H[h]=n+"Date",H[P]=n+"Date",H[x]=n+"Month",H[M]=n+"FullYear",H[l]=n+"Hours",H[u]=n+"Minutes",H[c]=n+"Seconds",H[s]=n+"Milliseconds",H)[m],S=m===h?this.$D+(o-this.$W):o;if(m===x||m===M){var $=this.clone().set(P,1);$.$d[f](S),$.init(),this.$d=$.set(P,Math.min(this.$D,$.daysInMonth())).$d}else f&&this.$d[f](S);return this.init(),this},O.set=function(_,o){return this.clone().$set(_,o)},O.get=function(_){return this[k.p(_)]()},O.add=function(_,o){var H,m=this;_=Number(_);var n=k.p(o),f=function(L){var z=d(m);return k.w(z.date(z.date()+Math.round(L*_)),m)};if(n===x)return this.set(x,this.$M+_);if(n===M)return this.set(M,this.$y+_);if(n===h)return f(1);if(n===g)return f(7);var S=(H={},H[u]=i,H[l]=a,H[c]=r,H)[n]||1,$=this.$d.getTime()+_*S;return k.w($,this)},O.subtract=function(_,o){return this.add(-1*_,o)},O.format=function(_){var o=this,H=this.$locale();if(!this.isValid())return H.invalidDate||p;var m=_||"YYYY-MM-DDTHH:mm:ssZ",n=k.z(this),f=this.$H,S=this.$m,$=this.$M,L=H.weekdays,z=H.months,F=H.meridiem,W=function(X,J,te,Z){return X&&(X[J]||X(o,m))||te[J].slice(0,Z)},B=function(X){return k.s(f%12||12,X,"0")},G=F||function(X,J,te){var Z=X<12?"AM":"PM";return te?Z.toLowerCase():Z};return m.replace(C,function(X,J){return J||function(te){switch(te){case"YY":return String(o.$y).slice(-2);case"YYYY":return k.s(o.$y,4,"0");case"M":return $+1;case"MM":return k.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 k.s(o.$D,2,"0");case"d":return String(o.$W);case"dd":return W(H.weekdaysMin,o.$W,L,2);case"ddd":return W(H.weekdaysShort,o.$W,L,3);case"dddd":return L[o.$W];case"H":return String(f);case"HH":return k.s(f,2,"0");case"h":return B(1);case"hh":return B(2);case"a":return G(f,S,!0);case"A":return G(f,S,!1);case"m":return String(S);case"mm":return k.s(S,2,"0");case"s":return String(o.$s);case"ss":return k.s(o.$s,2,"0");case"SSS":return k.s(o.$ms,3,"0");case"Z":return n}return null}(X)||n.replace(":","")})},O.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},O.diff=function(_,o,H){var m,n=this,f=k.p(o),S=d(_),$=(S.utcOffset()-this.utcOffset())*i,L=this-S,z=function(){return k.m(n,S)};switch(f){case M:m=z()/12;break;case x:m=z();break;case j:m=z()/3;break;case g:m=(L-$)/6048e5;break;case h:m=(L-$)/864e5;break;case l:m=L/a;break;case u:m=L/i;break;case c:m=L/r;break;default:m=L}return H?m:k.a(m)},O.daysInMonth=function(){return this.endOf(x).$D},O.$locale=function(){return b[this.$L]},O.locale=function(_,o){if(!_)return this.$L;var H=this.clone(),m=y(_,o,!0);return m&&(H.$L=m),H},O.clone=function(){return k.w(this.$d,this)},O.toDate=function(){return new Date(this.valueOf())},O.toJSON=function(){return this.isValid()?this.toISOString():null},O.toISOString=function(){return this.$d.toISOString()},O.toString=function(){return this.$d.toUTCString()},T}(),R=A.prototype;return d.prototype=R,[["$ms",s],["$s",c],["$m",u],["$H",l],["$W",h],["$M",x],["$y",M],["$D",P]].forEach(function(T){R[T[1]]=function(O){return this.$g(O,T[0],T[1])}}),d.extend=function(T,O){return T.$i||(T(O,A,d),T.$i=!0),d},d.locale=y,d.isDayjs=E,d.unix=function(T){return d(1e3*T)},d.en=b[v],d.Ls=b,d.p={},d})}(ft)),ft.exports}var hs=ds();const dt=Ut(hs);var ht={exports:{}},ps=ht.exports,Dr;function ms(){return Dr||(Dr=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,c,u){var l=c.prototype;u.utc=function(p){var I={date:p,utc:!0,args:arguments};return new c(I)},l.utc=function(p){var I=u(this.toDate(),{locale:this.$L,utc:!0});return p?I.add(this.utcOffset(),r):I},l.local=function(){return u(this.toDate(),{locale:this.$L,utc:!1})};var h=l.parse;l.parse=function(p){p.utc&&(this.$u=!0),this.$utils().u(p.$offset)||(this.$offset=p.$offset),h.call(this,p)};var g=l.init;l.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 g.call(this)};var x=l.utcOffset;l.utcOffset=function(p,I){var C=this.$utils().u;if(C(p))return this.$u?0:C(this.$offset)?x.call(this):this.$offset;if(typeof p=="string"&&(p=function(v){v===void 0&&(v="");var b=v.match(i);if(!b)return null;var w=(""+b[0]).match(a)||["-",0,0],E=w[0],y=60*+w[1]+ +w[2];return y===0?0:E==="+"?y:-y}(p),p===null))return this;var N=Math.abs(p)<=16?60*p:p;if(N===0)return this.utc(I);var U=this.clone();if(I)return U.$offset=N,U.$u=!1,U;var V=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(U=this.local().add(N+V,r)).$offset=N,U.$x.$localOffset=V,U};var j=l.format;l.format=function(p){var I=p||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return j.call(this,I)},l.valueOf=function(){var p=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*p},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var M=l.toDate;l.toDate=function(p){return p==="s"&&this.$offset?u(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():M.call(this)};var P=l.diff;l.diff=function(p,I,C){if(p&&this.$u===p.$u)return P.call(this,p,I,C);var N=this.local(),U=u(p).local();return P.call(N,U,I,C)}}})}(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 getDateInUTC=t=>{try{const r=dt.utc(t),i=r.date(),a=r.month(),s=r.year(),c=r.hour(),u=r.minute(),l=r.day();return{day:i,month:a,year:s,hour:c,minute:u,weekday:l}}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"):""}exports.Button=En;exports.Carousel=ia;exports.Checkbox=aa;exports.Drawer=qo;exports.FeedbackProvider=Uo;exports.Form=Xo;exports.Image=Go;exports.InputField=Jo;exports.Loader=Zo;exports.Modal=Qo;exports.NavigationProvider=Wo;exports.NumberHelper=ls;exports.PageLayout=rs;exports.ScrollHelper=us;exports.SvgImage=ns;exports.TextAreaField=as;exports.TextHelper=cs;exports.TimeHelper=ys;exports.Toast=os;exports.Typography=ss;exports.defaultBreakpoints=Qr;exports.useDidMount=oa;exports.useDrag=Zr;exports.useFeedback=et;exports.useFetch=sa;exports.useNavigation=Fo;exports.useOnScreen=la;exports.usePointer=Jr;exports.useResponsive=ua;exports.useTranslations=da;
package/dist/index.es.js CHANGED
@@ -6681,7 +6681,7 @@ const Sn = q.createContext({
6681
6681
  ...r
6682
6682
  },
6683
6683
  onClick: (u) => {
6684
- u.stopPropagation();
6684
+ u.stopPropagation(), u.preventDefault();
6685
6685
  },
6686
6686
  children: t
6687
6687
  }
@@ -6716,6 +6716,9 @@ const Sn = q.createContext({
6716
6716
  }
6717
6717
  );
6718
6718
  class Ss {
6719
+ static clamp = (t, r, i) => t > i ? i : t < r ? r : t;
6720
+ }
6721
+ class xs {
6719
6722
  static isScrollEnabled = () => document.body.style.overflow === "unset" || document.body.style.overflow === "auto";
6720
6723
  static disableScroll = () => {
6721
6724
  document.body.style.overflow = "hidden";
@@ -6724,7 +6727,7 @@ class Ss {
6724
6727
  document.body.style.overflow = "unset";
6725
6728
  };
6726
6729
  }
6727
- class xs {
6730
+ class Os {
6728
6731
  static getPascalCase = (t) => t.replace(/\w+/g, function(r) {
6729
6732
  return r[0].toUpperCase() + r.slice(1).toLowerCase();
6730
6733
  });
@@ -7088,7 +7091,7 @@ function Go() {
7088
7091
  var Ko = Go();
7089
7092
  const Jo = /* @__PURE__ */ qt(Ko);
7090
7093
  dt.extend(Jo);
7091
- class Os {
7094
+ class ks {
7092
7095
  static waitForMilliseconds = (t) => new Promise((r) => setTimeout(r, t));
7093
7096
  static waitForCondition = (t) => new Promise((r) => {
7094
7097
  const i = () => {
@@ -7137,12 +7140,13 @@ export {
7137
7140
  ps as Loader,
7138
7141
  ms as Modal,
7139
7142
  ls as NavigationProvider,
7143
+ Ss as NumberHelper,
7140
7144
  vs as PageLayout,
7141
- Ss as ScrollHelper,
7145
+ xs as ScrollHelper,
7142
7146
  gs as SvgImage,
7143
7147
  ys as TextAreaField,
7144
- xs as TextHelper,
7145
- Os as TimeHelper,
7148
+ Os as TextHelper,
7149
+ ks as TimeHelper,
7146
7150
  bs as Toast,
7147
7151
  ws as Typography,
7148
7152
  sa as defaultBreakpoints,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eliseubatista99/react-scaffold-core",
3
- "version": "0.1.66",
3
+ "version": "0.1.67",
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",