@eliseubatista99/react-scaffold-core 0.1.49 → 0.1.50
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 +2 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -112,7 +112,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
112
112
|
box-sizing: border-box;
|
|
113
113
|
display: flex;
|
|
114
114
|
}
|
|
115
|
-
`,aa=({styles:e,content:t,settings:r,gap:a=15})=>{const[i,s]=U.useState(1),l=U.useRef(null),f=U.useRef(null);var c={dots:!1,speed:500,slidesToScroll:1,infinite:!1,variableWidth:!0,arrows:!1,rows:1,...r};const h=t.map((C,j)=>J.jsx(ia,{ref:j===0?f:void 0,styles:{paddingRight:`${a}px`,overflow:"visible",...C.styles},"data-testid":"carousel-slide-item",children:C.content})),g=()=>{if(c.slidesToShow){s(c.slidesToShow);return}const C=(l.current?.offsetWidth||1)-a,j=f.current?.offsetWidth||1;let A=Math.floor(C/j);A<1?A=1:A>t.length&&(A=t.length),console.log("Slides to show > ",{container:C,slide:j,res:A}),s(A)};return U.useEffect(()=>{g()},[l,f]),J.jsx(na,{ref:l,styles:{...e},children:J.jsx(oi,{...c,slidesToShow:i,children:h})})},oa=({checked:e,onToggle:t,styles:r,checkedStyles:a,customCheckedRender:i,customUncheckedRender:s})=>{const l=e?{...r,...a}:{...r};return J.jsxs("div",{onClick:()=>t?.(!e),style:{width:"25px",height:"25px",borderRadius:"4px",border:"1px solid #969696ff",background:e?"#000000":"#ffffff",overflow:"hidden",objectFit:"contain",alignItems:"center",justifyContent:"center",display:"flex",...l},children:[e&&i,!e&&s]})},sa=e=>U.useEffect(e,[]),Jr=()=>{const[e,t]=U.useState({}),[r,a]=U.useState(!1);return U.useEffect(()=>{const i=f=>{t({x:f.clientX,y:f.clientY})},s=f=>{a(!0)},l=f=>{a(!1)};return window.addEventListener("pointermove",i),window.addEventListener("pointerdown",s),window.addEventListener("pointerup",l),()=>{window.removeEventListener("pointermove",i),window.removeEventListener("pointerdown",s),window.removeEventListener("pointerup",l)}},[]),{pointerPosition:e,isPointerDown:r}},Zr=({ref:e,onDrag:t,onDragStart:r,onDragEnd:a})=>{const i=U.useRef(!1),s=U.useRef(!1),{pointerPosition:l,isPointerDown:f}=Jr(),c=U.useRef({isDragging:!1}),h=U.useCallback(E=>{if(!e||!e.current||!c.current)return;const p={...c.current};return p.posY=E.y,p.posX=E.x,c.current.startPosX&&c.current.posX&&(p.distanceX=c.current.startPosX-c.current.posX),c.current.startPosY&&c.current.posY&&(p.distanceY=-(c.current.startPosY-c.current.posY)),p},[]),g=U.useCallback(E=>{E.preventDefault(),E.stopPropagation(),c.current.isDragging=!0,c.current.startPosY=E.clientY,c.current.startPosX=E.clientX;const p=h({x:E.clientX,y:E.clientY});p&&(c.current=p,r?.(p))},[h]),C=U.useCallback(E=>{c.current.isDragging=!1;const p=h(l);p&&(a?.(p),p.startPosX=void 0,p.startPosY=void 0,c.current=p)},[h,l]),j=U.useCallback(E=>{if(console.debug("useDrag > onPointerMove > Is Dragging >",c.current.isDragging),!c.current.isDragging)return;const p=h(l);console.debug("useDrag > onPointerMove > Drag Result >",p),p&&(t?.(p),c.current=p)},[h,l]),A=U.useCallback(async()=>{if(!i.current){for(;!e?.current;)await new Promise(E=>setTimeout(E,300));i.current=!0,e.current.onpointerdown=g,e.current.style.touchAction="none"}},[e?.current,g]);U.useEffect(()=>{A()},[A]),U.useEffect(()=>{j()},[l]),U.useEffect(()=>{f!==s.current&&(s.current=f,f||C())},[f,s.current])},la=()=>{const e=(r,a)=>{let i=0,s=`${r}?`;for(const l in a){const f=a[l];i>0&&(s=`${s}&`),s=`${s}${l}=${f}`,i++}return s};return async(r,a)=>{const i=e(r,a);return await(await fetch(i)).json()}};var ut={exports:{}},ua=ut.exports,Cr;function ca(){return Cr||(Cr=1,function(e,t){(function(r,a){e.exports=a()})(ua,function(){var r=1e3,a=6e4,i=36e5,s="millisecond",l="second",f="minute",c="hour",h="day",g="week",C="month",j="quarter",A="year",E="date",p="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,O=/\[([^\]]+)]|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 k=["th","st","nd","rd"],T=_%100;return"["+_+(k[(T-20)%10]||k[T]||k[0])+"]"}},Y=function(_,k,T){var o=String(_);return!o||o.length>=k?_:""+Array(k+1-o.length).join(T)+_},V={s:Y,z:function(_){var k=-_.utcOffset(),T=Math.abs(k),o=Math.floor(T/60),H=T%60;return(k<=0?"+":"-")+Y(o,2,"0")+":"+Y(H,2,"0")},m:function _(k,T){if(k.date()<T.date())return-_(T,k);var o=12*(T.year()-k.year())+(T.month()-k.month()),H=k.clone().add(o,C),m=T-H<0,n=k.clone().add(o+(m?-1:1),C);return+(-(o+(T-H)/(m?H-n:n-H))||0)},a:function(_){return _<0?Math.ceil(_)||0:Math.floor(_)},p:function(_){return{M:C,y:A,w:g,d:h,D:E,h:c,m:f,s:l,ms:s,Q:j}[_]||String(_||"").toLowerCase().replace(/s$/,"")},u:function(_){return _===void 0}},v="en",b={};b[v]=F;var w="$isDayjsObject",P=function(_){return _ instanceof I||!(!_||!_[w])},y=function _(k,T,o){var H;if(!k)return v;if(typeof k=="string"){var m=k.toLowerCase();b[m]&&(H=m),T&&(b[m]=T,H=m);var n=k.split("-");if(!H&&n.length>1)return _(n[0])}else{var u=k.name;b[u]=k,H=u}return!o&&H&&(v=H),H||!o&&v},d=function(_,k){if(P(_))return _.clone();var T=typeof k=="object"?k:{};return T.date=_,T.args=arguments,new I(T)},x=V;x.l=y,x.i=P,x.w=function(_,k){return d(_,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var I=function(){function _(T){this.$L=y(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[w]=!0}var k=_.prototype;return k.parse=function(T){this.$d=function(o){var H=o.date,m=o.utc;if(H===null)return new Date(NaN);if(x.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($);if(n){var u=n[2]-1||0,S=(n[7]||"0").substring(0,3);return m?new Date(Date.UTC(n[1],u,n[3]||1,n[4]||0,n[5]||0,n[6]||0,S)):new Date(n[1],u,n[3]||1,n[4]||0,n[5]||0,n[6]||0,S)}}return new Date(H)}(T),this.init()},k.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},k.$utils=function(){return x},k.isValid=function(){return this.$d.toString()!==p},k.isSame=function(T,o){var H=d(T);return this.startOf(o)<=H&&H<=this.endOf(o)},k.isAfter=function(T,o){return d(T)<this.startOf(o)},k.isBefore=function(T,o){return this.endOf(o)<d(T)},k.$g=function(T,o,H){return x.u(T)?this[o]:this.set(H,T)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(T,o){var H=this,m=!!x.u(o)||o,n=x.p(T),u=function(G,X){var K=x.w(H.$u?Date.UTC(H.$y,X,G):new Date(H.$y,X,G),H);return m?K:K.endOf(h)},S=function(G,X){return x.w(H.toDate()[G].apply(H.toDate("s"),(m?[0,0,0,0]:[23,59,59,999]).slice(X)),H)},M=this.$W,L=this.$M,z=this.$D,N="set"+(this.$u?"UTC":"");switch(n){case A:return m?u(1,0):u(31,11);case C:return m?u(1,L):u(0,L+1);case g:var W=this.$locale().weekStart||0,B=(M<W?M+7:M)-W;return u(m?z-B:z+(6-B),L);case h:case E:return S(N+"Hours",0);case c:return S(N+"Minutes",1);case f:return S(N+"Seconds",2);case l:return S(N+"Milliseconds",3);default:return this.clone()}},k.endOf=function(T){return this.startOf(T,!1)},k.$set=function(T,o){var H,m=x.p(T),n="set"+(this.$u?"UTC":""),u=(H={},H[h]=n+"Date",H[E]=n+"Date",H[C]=n+"Month",H[A]=n+"FullYear",H[c]=n+"Hours",H[f]=n+"Minutes",H[l]=n+"Seconds",H[s]=n+"Milliseconds",H)[m],S=m===h?this.$D+(o-this.$W):o;if(m===C||m===A){var M=this.clone().set(E,1);M.$d[u](S),M.init(),this.$d=M.set(E,Math.min(this.$D,M.daysInMonth())).$d}else u&&this.$d[u](S);return this.init(),this},k.set=function(T,o){return this.clone().$set(T,o)},k.get=function(T){return this[x.p(T)]()},k.add=function(T,o){var H,m=this;T=Number(T);var n=x.p(o),u=function(L){var z=d(m);return x.w(z.date(z.date()+Math.round(L*T)),m)};if(n===C)return this.set(C,this.$M+T);if(n===A)return this.set(A,this.$y+T);if(n===h)return u(1);if(n===g)return u(7);var S=(H={},H[f]=a,H[c]=i,H[l]=r,H)[n]||1,M=this.$d.getTime()+T*S;return x.w(M,this)},k.subtract=function(T,o){return this.add(-1*T,o)},k.format=function(T){var o=this,H=this.$locale();if(!this.isValid())return H.invalidDate||p;var m=T||"YYYY-MM-DDTHH:mm:ssZ",n=x.z(this),u=this.$H,S=this.$m,M=this.$M,L=H.weekdays,z=H.months,N=H.meridiem,W=function(X,K,te,Z){return X&&(X[K]||X(o,m))||te[K].slice(0,Z)},B=function(X){return x.s(u%12||12,X,"0")},G=N||function(X,K,te){var Z=X<12?"AM":"PM";return te?Z.toLowerCase():Z};return m.replace(O,function(X,K){return K||function(te){switch(te){case"YY":return String(o.$y).slice(-2);case"YYYY":return x.s(o.$y,4,"0");case"M":return M+1;case"MM":return x.s(M+1,2,"0");case"MMM":return W(H.monthsShort,M,z,3);case"MMMM":return W(z,M);case"D":return o.$D;case"DD":return x.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(u);case"HH":return x.s(u,2,"0");case"h":return B(1);case"hh":return B(2);case"a":return G(u,S,!0);case"A":return G(u,S,!1);case"m":return String(S);case"mm":return x.s(S,2,"0");case"s":return String(o.$s);case"ss":return x.s(o.$s,2,"0");case"SSS":return x.s(o.$ms,3,"0");case"Z":return n}return null}(X)||n.replace(":","")})},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(T,o,H){var m,n=this,u=x.p(o),S=d(T),M=(S.utcOffset()-this.utcOffset())*a,L=this-S,z=function(){return x.m(n,S)};switch(u){case A:m=z()/12;break;case C:m=z();break;case j:m=z()/3;break;case g:m=(L-M)/6048e5;break;case h:m=(L-M)/864e5;break;case c:m=L/i;break;case f:m=L/a;break;case l:m=L/r;break;default:m=L}return H?m:x.a(m)},k.daysInMonth=function(){return this.endOf(C).$D},k.$locale=function(){return b[this.$L]},k.locale=function(T,o){if(!T)return this.$L;var H=this.clone(),m=y(T,o,!0);return m&&(H.$L=m),H},k.clone=function(){return x.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},_}(),R=I.prototype;return d.prototype=R,[["$ms",s],["$s",l],["$m",f],["$H",c],["$W",h],["$M",C],["$y",A],["$D",E]].forEach(function(_){R[_[1]]=function(k){return this.$g(k,_[0],_[1])}}),d.extend=function(_,k){return _.$i||(_(k,I,d),_.$i=!0),d},d.locale=y,d.isDayjs=P,d.unix=function(_){return d(1e3*_)},d.en=b[v],d.Ls=b,d.p={},d})}(ut)),ut.exports}var fa=ca();const ct=Ut(fa);var ft={exports:{}},da=ft.exports,Pr;function ha(){return Pr||(Pr=1,function(e,t){(function(r,a){e.exports=a()})(da,function(){var r="minute",a=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(s,l,f){var c=l.prototype;f.utc=function(p){var $={date:p,utc:!0,args:arguments};return new l($)},c.utc=function(p){var $=f(this.toDate(),{locale:this.$L,utc:!0});return p?$.add(this.utcOffset(),r):$},c.local=function(){return f(this.toDate(),{locale:this.$L,utc:!1})};var h=c.parse;c.parse=function(p){p.utc&&(this.$u=!0),this.$utils().u(p.$offset)||(this.$offset=p.$offset),h.call(this,p)};var g=c.init;c.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 C=c.utcOffset;c.utcOffset=function(p,$){var O=this.$utils().u;if(O(p))return this.$u?0:O(this.$offset)?C.call(this):this.$offset;if(typeof p=="string"&&(p=function(v){v===void 0&&(v="");var b=v.match(a);if(!b)return null;var w=(""+b[0]).match(i)||["-",0,0],P=w[0],y=60*+w[1]+ +w[2];return y===0?0:P==="+"?y:-y}(p),p===null))return this;var F=Math.abs(p)<=16?60*p:p;if(F===0)return this.utc($);var Y=this.clone();if($)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 j=c.format;c.format=function(p){var $=p||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return j.call(this,$)},c.valueOf=function(){var p=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*p},c.isUTC=function(){return!!this.$u},c.toISOString=function(){return this.toDate().toISOString()},c.toString=function(){return this.toDate().toUTCString()};var A=c.toDate;c.toDate=function(p){return p==="s"&&this.$offset?f(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():A.call(this)};var E=c.diff;c.diff=function(p,$,O){if(p&&this.$u===p.$u)return E.call(this,p,$,O);var F=this.local(),Y=f(p).local();return E.call(F,Y,$,O)}}})}(ft)),ft.exports}var pa=ha();const ma=Ut(pa);ct.extend(ma);class Qr{static waitForMilliseconds=t=>new Promise(r=>setTimeout(r,t));static waitForCondition=t=>new Promise(r=>{const a=()=>{t()?r():setTimeout(a,100)};a()});static waitForAsyncCondition=t=>new Promise(r=>{const a=async()=>{await t()?r():setTimeout(a,100)};a()});static differenceInMonths=(t,r)=>{let a=0;return a=(r.getFullYear()-t.getFullYear())*12,a-=t.getMonth(),a+=r.getMonth(),a};static isDateOneAfterDateTwo=(t,r)=>t.getFullYear()>=r.getFullYear()&&t.getMonth()>=r.getMonth()?t.getDay()>r.getDay():!1;static getDateInUTC=t=>{try{const r=ct.utc(t),a=r.date(),i=r.month(),s=r.year(),l=r.hour(),f=r.minute(),c=r.day();return{day:a,month:i,year:s,hour:l,minute:f,weekday:c}}catch{return}};static formatDateLocalTime=(t,r)=>t?ct.utc(t).local().format(r||"DD/MM/YYYYㆍHH:mm"):"";static formatDateUTC=(t,r)=>t?ct.utc(t).format(r||"DD/MM/YYYYㆍHH:mm"):""}const va=(e,t=0)=>{const r=U.useRef(0),[a,i]=U.useState(0),s=U.useRef(null),[l,f]=U.useState(!1),c=U.useCallback(()=>{f(C=>!C)},[]),h=U.useCallback(()=>r.current===0?!1:a>=r.current-t,[t,a]),g=U.useCallback(()=>e.current!==null&&e.current!==void 0,[e]);return U.useEffect(()=>{const C=()=>{if(!e.current)return;const A=e.current.scrollHeight-e.current.clientHeight;r.current=A,i(e.current.scrollTop)};return(async()=>{await Qr.waitForCondition(g),s.current=e.current,s.current?.addEventListener("scroll",C)})(),()=>{s.current?.removeEventListener("scroll",C)}},[e,r,i,a,g,l]),{isTouchingBottom:h(),refresh:c}},en={xs:0,sm:420,md:768,lg:991,xl:1200,xxl:1440},ga=e=>{const t={...en,...e?.breakpointConfiguration},[r,a]=U.useState(Er(t)),i=()=>{a(Er(t))};return U.useEffect(()=>(window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}),[]),U.useMemo(()=>r,[r])},ya=(e,t)=>e<t.sm?"xs":e<t.md?"sm":e<t.lg?"md":e<t.xl?"lg":e<t.xxl?"xl":"xxl",ba=(e,t)=>e<=t.sm?"mobile":e<=t.md?"tablet":"desktop",Er=e=>{const t=window.innerWidth,r=window.innerHeight,a=ya(t,e),i=ba(t,e);return{currentWidth:t,currentHeight:r,currentBreakpoint:a,currentSize:i}},wa=e=>{const t=e.translations,r=e.language,a=(s,l)=>{if(!s)return;let f=s[r];if(f)return l&&Object.keys(l).forEach(c=>{const h=l[c];f=f.replaceAll(`{{${c}}}`,`${h}`)}),f};return{t:(s,l)=>{if(t[s]){const f=a(t[s],l);return f??s}return s},getTranslation:a}};var Ue={},Rr;function Sa(){if(Rr)return Ue;Rr=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.parse=l,Ue.serialize=h;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,a=/^[\u0020-\u003A\u003D-\u007E]*$/,i=Object.prototype.toString,s=(()=>{const j=function(){};return j.prototype=Object.create(null),j})();function l(j,A){const E=new s,p=j.length;if(p<2)return E;const $=A?.decode||g;let O=0;do{const F=j.indexOf("=",O);if(F===-1)break;const Y=j.indexOf(";",O),V=Y===-1?p:Y;if(F>V){O=j.lastIndexOf(";",F-1)+1;continue}const v=f(j,O,F),b=c(j,F,v),w=j.slice(v,b);if(E[w]===void 0){let P=f(j,F+1,V),y=c(j,V,P);const d=$(j.slice(P,y));E[w]=d}O=V+1}while(O<p);return E}function f(j,A,E){do{const p=j.charCodeAt(A);if(p!==32&&p!==9)return A}while(++A<E);return E}function c(j,A,E){for(;A>E;){const p=j.charCodeAt(--A);if(p!==32&&p!==9)return A+1}return E}function h(j,A,E){const p=E?.encode||encodeURIComponent;if(!e.test(j))throw new TypeError(`argument name is invalid: ${j}`);const $=p(A);if(!t.test($))throw new TypeError(`argument val is invalid: ${A}`);let O=j+"="+$;if(!E)return O;if(E.maxAge!==void 0){if(!Number.isInteger(E.maxAge))throw new TypeError(`option maxAge is invalid: ${E.maxAge}`);O+="; Max-Age="+E.maxAge}if(E.domain){if(!r.test(E.domain))throw new TypeError(`option domain is invalid: ${E.domain}`);O+="; Domain="+E.domain}if(E.path){if(!a.test(E.path))throw new TypeError(`option path is invalid: ${E.path}`);O+="; Path="+E.path}if(E.expires){if(!C(E.expires)||!Number.isFinite(E.expires.valueOf()))throw new TypeError(`option expires is invalid: ${E.expires}`);O+="; Expires="+E.expires.toUTCString()}if(E.httpOnly&&(O+="; HttpOnly"),E.secure&&(O+="; Secure"),E.partitioned&&(O+="; Partitioned"),E.priority)switch(typeof E.priority=="string"?E.priority.toLowerCase():void 0){case"low":O+="; Priority=Low";break;case"medium":O+="; Priority=Medium";break;case"high":O+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${E.priority}`)}if(E.sameSite)switch(typeof E.sameSite=="string"?E.sameSite.toLowerCase():E.sameSite){case!0:case"strict":O+="; SameSite=Strict";break;case"lax":O+="; SameSite=Lax";break;case"none":O+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${E.sameSite}`)}return O}function g(j){if(j.indexOf("%")===-1)return j;try{return decodeURIComponent(j)}catch{return j}}function C(j){return i.call(j)==="[object Date]"}return Ue}Sa();/**
|
|
115
|
+
`,aa=({styles:e,content:t,settings:r,gap:a=15})=>{const[i,s]=U.useState(1),l=U.useRef(null),f=U.useRef(null);var c={dots:!1,speed:500,slidesToScroll:1,infinite:!1,variableWidth:!0,arrows:!1,rows:1,...r};const h=t.map((C,j)=>J.jsx(ia,{ref:j===0?f:void 0,styles:{paddingRight:`${a}px`,overflow:"visible",...C.styles},"data-testid":"carousel-slide-item",children:C.content})),g=()=>{if(c.slidesToShow){s(c.slidesToShow);return}const C=(l.current?.offsetWidth||1)-a,j=f.current?.offsetWidth||1;let A=Math.floor(C/j);A<1?A=1:A>t.length&&(A=t.length),console.log("Slides to show > ",{container:C,slide:j,res:A}),s(A)};return U.useEffect(()=>{g()},[l,f]),J.jsx(na,{ref:l,styles:{...e},children:J.jsx(oi,{...c,slidesToShow:i,children:h})})},oa=({checked:e,onToggle:t,styles:r,checkedStyles:a,customCheckedRender:i,customUncheckedRender:s})=>{const l=e?{...r,...a}:{...r};return J.jsxs("div",{onClick:()=>t?.(!e),style:{width:"25px",height:"25px",borderRadius:"4px",border:"1px solid #969696ff",background:e?"#000000":"#ffffff",overflow:"hidden",objectFit:"contain",alignItems:"center",justifyContent:"center",display:"flex",...l},children:[e&&i,!e&&s]})},sa=e=>U.useEffect(e,[]),Jr=()=>{const[e,t]=U.useState({}),[r,a]=U.useState(!1);return U.useEffect(()=>{const i=f=>{t({x:f.clientX,y:f.clientY})},s=f=>{a(!0)},l=f=>{a(!1)};return window.addEventListener("pointermove",i),window.addEventListener("pointerdown",s),window.addEventListener("pointerup",l),()=>{window.removeEventListener("pointermove",i),window.removeEventListener("pointerdown",s),window.removeEventListener("pointerup",l)}},[]),{pointerPosition:e,isPointerDown:r}},Zr=({ref:e,onDrag:t,onDragStart:r,onDragEnd:a})=>{const i=U.useRef(!1),s=U.useRef(!1),{pointerPosition:l,isPointerDown:f}=Jr(),c=U.useRef({isDragging:!1}),h=U.useCallback(E=>{if(!e||!e.current||!c.current)return;const p={...c.current};return p.posY=E.y,p.posX=E.x,c.current.startPosX&&c.current.posX&&(p.distanceX=c.current.startPosX-c.current.posX),c.current.startPosY&&c.current.posY&&(p.distanceY=-(c.current.startPosY-c.current.posY)),p},[]),g=U.useCallback(E=>{E.preventDefault(),E.stopPropagation(),c.current.isDragging=!0,c.current.startPosY=E.clientY,c.current.startPosX=E.clientX;const p=h({x:E.clientX,y:E.clientY});p&&(c.current=p,r?.(p))},[h]),C=U.useCallback(E=>{c.current.isDragging=!1;const p=h(l);p&&(a?.(p),p.startPosX=void 0,p.startPosY=void 0,c.current=p)},[h,l]),j=U.useCallback(E=>{if(console.debug("useDrag > onPointerMove > Is Dragging >",c.current.isDragging),!c.current.isDragging)return;const p=h(l);console.debug("useDrag > onPointerMove > Drag Result >",p),p&&(t?.(p),c.current=p)},[h,l]),A=U.useCallback(async()=>{if(!i.current){for(;!e?.current;)await new Promise(E=>setTimeout(E,300));i.current=!0,e.current.onpointerdown=g,e.current.style.touchAction="none"}},[e?.current,g]);U.useEffect(()=>{A()},[A]),U.useEffect(()=>{j()},[l]),U.useEffect(()=>{f!==s.current&&(s.current=f,f||C())},[f,s.current])},la=()=>{const e=(r,a)=>{let i=0,s=`${r}`;for(const l in a){i===0&&(s=`${s}?`);const f=a[l];i>0&&(s=`${s}&`),s=`${s}${l}=${f}`,i++}return s};return async(r,a)=>{const i=e(r,a);return await(await fetch(i)).json()}};var ut={exports:{}},ua=ut.exports,Cr;function ca(){return Cr||(Cr=1,function(e,t){(function(r,a){e.exports=a()})(ua,function(){var r=1e3,a=6e4,i=36e5,s="millisecond",l="second",f="minute",c="hour",h="day",g="week",C="month",j="quarter",A="year",E="date",p="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,O=/\[([^\]]+)]|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 k=["th","st","nd","rd"],T=_%100;return"["+_+(k[(T-20)%10]||k[T]||k[0])+"]"}},Y=function(_,k,T){var o=String(_);return!o||o.length>=k?_:""+Array(k+1-o.length).join(T)+_},V={s:Y,z:function(_){var k=-_.utcOffset(),T=Math.abs(k),o=Math.floor(T/60),H=T%60;return(k<=0?"+":"-")+Y(o,2,"0")+":"+Y(H,2,"0")},m:function _(k,T){if(k.date()<T.date())return-_(T,k);var o=12*(T.year()-k.year())+(T.month()-k.month()),H=k.clone().add(o,C),m=T-H<0,n=k.clone().add(o+(m?-1:1),C);return+(-(o+(T-H)/(m?H-n:n-H))||0)},a:function(_){return _<0?Math.ceil(_)||0:Math.floor(_)},p:function(_){return{M:C,y:A,w:g,d:h,D:E,h:c,m:f,s:l,ms:s,Q:j}[_]||String(_||"").toLowerCase().replace(/s$/,"")},u:function(_){return _===void 0}},v="en",b={};b[v]=F;var w="$isDayjsObject",P=function(_){return _ instanceof I||!(!_||!_[w])},y=function _(k,T,o){var H;if(!k)return v;if(typeof k=="string"){var m=k.toLowerCase();b[m]&&(H=m),T&&(b[m]=T,H=m);var n=k.split("-");if(!H&&n.length>1)return _(n[0])}else{var u=k.name;b[u]=k,H=u}return!o&&H&&(v=H),H||!o&&v},d=function(_,k){if(P(_))return _.clone();var T=typeof k=="object"?k:{};return T.date=_,T.args=arguments,new I(T)},x=V;x.l=y,x.i=P,x.w=function(_,k){return d(_,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var I=function(){function _(T){this.$L=y(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[w]=!0}var k=_.prototype;return k.parse=function(T){this.$d=function(o){var H=o.date,m=o.utc;if(H===null)return new Date(NaN);if(x.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($);if(n){var u=n[2]-1||0,S=(n[7]||"0").substring(0,3);return m?new Date(Date.UTC(n[1],u,n[3]||1,n[4]||0,n[5]||0,n[6]||0,S)):new Date(n[1],u,n[3]||1,n[4]||0,n[5]||0,n[6]||0,S)}}return new Date(H)}(T),this.init()},k.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},k.$utils=function(){return x},k.isValid=function(){return this.$d.toString()!==p},k.isSame=function(T,o){var H=d(T);return this.startOf(o)<=H&&H<=this.endOf(o)},k.isAfter=function(T,o){return d(T)<this.startOf(o)},k.isBefore=function(T,o){return this.endOf(o)<d(T)},k.$g=function(T,o,H){return x.u(T)?this[o]:this.set(H,T)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(T,o){var H=this,m=!!x.u(o)||o,n=x.p(T),u=function(G,X){var K=x.w(H.$u?Date.UTC(H.$y,X,G):new Date(H.$y,X,G),H);return m?K:K.endOf(h)},S=function(G,X){return x.w(H.toDate()[G].apply(H.toDate("s"),(m?[0,0,0,0]:[23,59,59,999]).slice(X)),H)},M=this.$W,L=this.$M,z=this.$D,N="set"+(this.$u?"UTC":"");switch(n){case A:return m?u(1,0):u(31,11);case C:return m?u(1,L):u(0,L+1);case g:var W=this.$locale().weekStart||0,B=(M<W?M+7:M)-W;return u(m?z-B:z+(6-B),L);case h:case E:return S(N+"Hours",0);case c:return S(N+"Minutes",1);case f:return S(N+"Seconds",2);case l:return S(N+"Milliseconds",3);default:return this.clone()}},k.endOf=function(T){return this.startOf(T,!1)},k.$set=function(T,o){var H,m=x.p(T),n="set"+(this.$u?"UTC":""),u=(H={},H[h]=n+"Date",H[E]=n+"Date",H[C]=n+"Month",H[A]=n+"FullYear",H[c]=n+"Hours",H[f]=n+"Minutes",H[l]=n+"Seconds",H[s]=n+"Milliseconds",H)[m],S=m===h?this.$D+(o-this.$W):o;if(m===C||m===A){var M=this.clone().set(E,1);M.$d[u](S),M.init(),this.$d=M.set(E,Math.min(this.$D,M.daysInMonth())).$d}else u&&this.$d[u](S);return this.init(),this},k.set=function(T,o){return this.clone().$set(T,o)},k.get=function(T){return this[x.p(T)]()},k.add=function(T,o){var H,m=this;T=Number(T);var n=x.p(o),u=function(L){var z=d(m);return x.w(z.date(z.date()+Math.round(L*T)),m)};if(n===C)return this.set(C,this.$M+T);if(n===A)return this.set(A,this.$y+T);if(n===h)return u(1);if(n===g)return u(7);var S=(H={},H[f]=a,H[c]=i,H[l]=r,H)[n]||1,M=this.$d.getTime()+T*S;return x.w(M,this)},k.subtract=function(T,o){return this.add(-1*T,o)},k.format=function(T){var o=this,H=this.$locale();if(!this.isValid())return H.invalidDate||p;var m=T||"YYYY-MM-DDTHH:mm:ssZ",n=x.z(this),u=this.$H,S=this.$m,M=this.$M,L=H.weekdays,z=H.months,N=H.meridiem,W=function(X,K,te,Z){return X&&(X[K]||X(o,m))||te[K].slice(0,Z)},B=function(X){return x.s(u%12||12,X,"0")},G=N||function(X,K,te){var Z=X<12?"AM":"PM";return te?Z.toLowerCase():Z};return m.replace(O,function(X,K){return K||function(te){switch(te){case"YY":return String(o.$y).slice(-2);case"YYYY":return x.s(o.$y,4,"0");case"M":return M+1;case"MM":return x.s(M+1,2,"0");case"MMM":return W(H.monthsShort,M,z,3);case"MMMM":return W(z,M);case"D":return o.$D;case"DD":return x.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(u);case"HH":return x.s(u,2,"0");case"h":return B(1);case"hh":return B(2);case"a":return G(u,S,!0);case"A":return G(u,S,!1);case"m":return String(S);case"mm":return x.s(S,2,"0");case"s":return String(o.$s);case"ss":return x.s(o.$s,2,"0");case"SSS":return x.s(o.$ms,3,"0");case"Z":return n}return null}(X)||n.replace(":","")})},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(T,o,H){var m,n=this,u=x.p(o),S=d(T),M=(S.utcOffset()-this.utcOffset())*a,L=this-S,z=function(){return x.m(n,S)};switch(u){case A:m=z()/12;break;case C:m=z();break;case j:m=z()/3;break;case g:m=(L-M)/6048e5;break;case h:m=(L-M)/864e5;break;case c:m=L/i;break;case f:m=L/a;break;case l:m=L/r;break;default:m=L}return H?m:x.a(m)},k.daysInMonth=function(){return this.endOf(C).$D},k.$locale=function(){return b[this.$L]},k.locale=function(T,o){if(!T)return this.$L;var H=this.clone(),m=y(T,o,!0);return m&&(H.$L=m),H},k.clone=function(){return x.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},_}(),R=I.prototype;return d.prototype=R,[["$ms",s],["$s",l],["$m",f],["$H",c],["$W",h],["$M",C],["$y",A],["$D",E]].forEach(function(_){R[_[1]]=function(k){return this.$g(k,_[0],_[1])}}),d.extend=function(_,k){return _.$i||(_(k,I,d),_.$i=!0),d},d.locale=y,d.isDayjs=P,d.unix=function(_){return d(1e3*_)},d.en=b[v],d.Ls=b,d.p={},d})}(ut)),ut.exports}var fa=ca();const ct=Ut(fa);var ft={exports:{}},da=ft.exports,Pr;function ha(){return Pr||(Pr=1,function(e,t){(function(r,a){e.exports=a()})(da,function(){var r="minute",a=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(s,l,f){var c=l.prototype;f.utc=function(p){var $={date:p,utc:!0,args:arguments};return new l($)},c.utc=function(p){var $=f(this.toDate(),{locale:this.$L,utc:!0});return p?$.add(this.utcOffset(),r):$},c.local=function(){return f(this.toDate(),{locale:this.$L,utc:!1})};var h=c.parse;c.parse=function(p){p.utc&&(this.$u=!0),this.$utils().u(p.$offset)||(this.$offset=p.$offset),h.call(this,p)};var g=c.init;c.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 C=c.utcOffset;c.utcOffset=function(p,$){var O=this.$utils().u;if(O(p))return this.$u?0:O(this.$offset)?C.call(this):this.$offset;if(typeof p=="string"&&(p=function(v){v===void 0&&(v="");var b=v.match(a);if(!b)return null;var w=(""+b[0]).match(i)||["-",0,0],P=w[0],y=60*+w[1]+ +w[2];return y===0?0:P==="+"?y:-y}(p),p===null))return this;var F=Math.abs(p)<=16?60*p:p;if(F===0)return this.utc($);var Y=this.clone();if($)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 j=c.format;c.format=function(p){var $=p||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return j.call(this,$)},c.valueOf=function(){var p=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*p},c.isUTC=function(){return!!this.$u},c.toISOString=function(){return this.toDate().toISOString()},c.toString=function(){return this.toDate().toUTCString()};var A=c.toDate;c.toDate=function(p){return p==="s"&&this.$offset?f(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():A.call(this)};var E=c.diff;c.diff=function(p,$,O){if(p&&this.$u===p.$u)return E.call(this,p,$,O);var F=this.local(),Y=f(p).local();return E.call(F,Y,$,O)}}})}(ft)),ft.exports}var pa=ha();const ma=Ut(pa);ct.extend(ma);class Qr{static waitForMilliseconds=t=>new Promise(r=>setTimeout(r,t));static waitForCondition=t=>new Promise(r=>{const a=()=>{t()?r():setTimeout(a,100)};a()});static waitForAsyncCondition=t=>new Promise(r=>{const a=async()=>{await t()?r():setTimeout(a,100)};a()});static differenceInMonths=(t,r)=>{let a=0;return a=(r.getFullYear()-t.getFullYear())*12,a-=t.getMonth(),a+=r.getMonth(),a};static isDateOneAfterDateTwo=(t,r)=>t.getFullYear()>=r.getFullYear()&&t.getMonth()>=r.getMonth()?t.getDay()>r.getDay():!1;static getDateInUTC=t=>{try{const r=ct.utc(t),a=r.date(),i=r.month(),s=r.year(),l=r.hour(),f=r.minute(),c=r.day();return{day:a,month:i,year:s,hour:l,minute:f,weekday:c}}catch{return}};static formatDateLocalTime=(t,r)=>t?ct.utc(t).local().format(r||"DD/MM/YYYYㆍHH:mm"):"";static formatDateUTC=(t,r)=>t?ct.utc(t).format(r||"DD/MM/YYYYㆍHH:mm"):""}const va=(e,t=0)=>{const r=U.useRef(0),[a,i]=U.useState(0),s=U.useRef(null),[l,f]=U.useState(!1),c=U.useCallback(()=>{f(C=>!C)},[]),h=U.useCallback(()=>r.current===0?!1:a>=r.current-t,[t,a]),g=U.useCallback(()=>e.current!==null&&e.current!==void 0,[e]);return U.useEffect(()=>{const C=()=>{if(!e.current)return;const A=e.current.scrollHeight-e.current.clientHeight;r.current=A,i(e.current.scrollTop)};return(async()=>{await Qr.waitForCondition(g),s.current=e.current,s.current?.addEventListener("scroll",C)})(),()=>{s.current?.removeEventListener("scroll",C)}},[e,r,i,a,g,l]),{isTouchingBottom:h(),refresh:c}},en={xs:0,sm:420,md:768,lg:991,xl:1200,xxl:1440},ga=e=>{const t={...en,...e?.breakpointConfiguration},[r,a]=U.useState(Er(t)),i=()=>{a(Er(t))};return U.useEffect(()=>(window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}),[]),U.useMemo(()=>r,[r])},ya=(e,t)=>e<t.sm?"xs":e<t.md?"sm":e<t.lg?"md":e<t.xl?"lg":e<t.xxl?"xl":"xxl",ba=(e,t)=>e<=t.sm?"mobile":e<=t.md?"tablet":"desktop",Er=e=>{const t=window.innerWidth,r=window.innerHeight,a=ya(t,e),i=ba(t,e);return{currentWidth:t,currentHeight:r,currentBreakpoint:a,currentSize:i}},wa=e=>{const t=e.translations,r=e.language,a=(s,l)=>{if(!s)return;let f=s[r];if(f)return l&&Object.keys(l).forEach(c=>{const h=l[c];f=f.replaceAll(`{{${c}}}`,`${h}`)}),f};return{t:(s,l)=>{if(t[s]){const f=a(t[s],l);return f??s}return s},getTranslation:a}};var Ue={},Rr;function Sa(){if(Rr)return Ue;Rr=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.parse=l,Ue.serialize=h;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,a=/^[\u0020-\u003A\u003D-\u007E]*$/,i=Object.prototype.toString,s=(()=>{const j=function(){};return j.prototype=Object.create(null),j})();function l(j,A){const E=new s,p=j.length;if(p<2)return E;const $=A?.decode||g;let O=0;do{const F=j.indexOf("=",O);if(F===-1)break;const Y=j.indexOf(";",O),V=Y===-1?p:Y;if(F>V){O=j.lastIndexOf(";",F-1)+1;continue}const v=f(j,O,F),b=c(j,F,v),w=j.slice(v,b);if(E[w]===void 0){let P=f(j,F+1,V),y=c(j,V,P);const d=$(j.slice(P,y));E[w]=d}O=V+1}while(O<p);return E}function f(j,A,E){do{const p=j.charCodeAt(A);if(p!==32&&p!==9)return A}while(++A<E);return E}function c(j,A,E){for(;A>E;){const p=j.charCodeAt(--A);if(p!==32&&p!==9)return A+1}return E}function h(j,A,E){const p=E?.encode||encodeURIComponent;if(!e.test(j))throw new TypeError(`argument name is invalid: ${j}`);const $=p(A);if(!t.test($))throw new TypeError(`argument val is invalid: ${A}`);let O=j+"="+$;if(!E)return O;if(E.maxAge!==void 0){if(!Number.isInteger(E.maxAge))throw new TypeError(`option maxAge is invalid: ${E.maxAge}`);O+="; Max-Age="+E.maxAge}if(E.domain){if(!r.test(E.domain))throw new TypeError(`option domain is invalid: ${E.domain}`);O+="; Domain="+E.domain}if(E.path){if(!a.test(E.path))throw new TypeError(`option path is invalid: ${E.path}`);O+="; Path="+E.path}if(E.expires){if(!C(E.expires)||!Number.isFinite(E.expires.valueOf()))throw new TypeError(`option expires is invalid: ${E.expires}`);O+="; Expires="+E.expires.toUTCString()}if(E.httpOnly&&(O+="; HttpOnly"),E.secure&&(O+="; Secure"),E.partitioned&&(O+="; Partitioned"),E.priority)switch(typeof E.priority=="string"?E.priority.toLowerCase():void 0){case"low":O+="; Priority=Low";break;case"medium":O+="; Priority=Medium";break;case"high":O+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${E.priority}`)}if(E.sameSite)switch(typeof E.sameSite=="string"?E.sameSite.toLowerCase():E.sameSite){case!0:case"strict":O+="; SameSite=Strict";break;case"lax":O+="; SameSite=Lax";break;case"none":O+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${E.sameSite}`)}return O}function g(j){if(j.indexOf("%")===-1)return j;try{return decodeURIComponent(j)}catch{return j}}function C(j){return i.call(j)==="[object Date]"}return Ue}Sa();/**
|
|
116
116
|
* react-router v7.6.3
|
|
117
117
|
*
|
|
118
118
|
* Copyright (c) Remix Software Inc.
|
package/dist/index.es.js
CHANGED
|
@@ -3983,8 +3983,9 @@ const na = Le.div`
|
|
|
3983
3983
|
}, [f, s.current]);
|
|
3984
3984
|
}, rs = () => {
|
|
3985
3985
|
const e = (r, a) => {
|
|
3986
|
-
let i = 0, s = `${r}
|
|
3986
|
+
let i = 0, s = `${r}`;
|
|
3987
3987
|
for (const l in a) {
|
|
3988
|
+
i === 0 && (s = `${s}?`);
|
|
3988
3989
|
const f = a[l];
|
|
3989
3990
|
i > 0 && (s = `${s}&`), s = `${s}${l}=${f}`, i++;
|
|
3990
3991
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eliseubatista99/react-scaffold-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.50",
|
|
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",
|