@eliseubatista99/react-scaffold-core 0.1.69 → 0.1.70
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/components/index.d.ts +1 -0
- package/dist/components/radioButton/index.d.ts +1 -0
- package/dist/components/radioButton/radioButton.d.ts +10 -0
- package/dist/components/radioButton/stories/radioButton.stories.d.ts +20 -0
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +342 -294
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './radioButton';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export type RadioButtonProps = {
|
|
3
|
+
checked: boolean;
|
|
4
|
+
customUncheckedRender?: React.ReactNode;
|
|
5
|
+
customCheckedRender?: React.ReactNode;
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
styles?: CSSProperties;
|
|
8
|
+
checkedStyles?: CSSProperties;
|
|
9
|
+
};
|
|
10
|
+
export declare const RadioButton: ({ checked, onClick, styles, checkedStyles, customCheckedRender, customUncheckedRender, }: RadioButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ checked, onClick, styles, checkedStyles, customCheckedRender, customUncheckedRender, }: import('../radioButton').RadioButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
};
|
|
8
|
+
tags: string[];
|
|
9
|
+
args: {
|
|
10
|
+
checked: false;
|
|
11
|
+
styles: {
|
|
12
|
+
width: string;
|
|
13
|
+
height: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export default meta;
|
|
18
|
+
type Story = StoryObj<typeof meta>;
|
|
19
|
+
export declare const Default: Story;
|
|
20
|
+
export declare const Checked: Story;
|
package/dist/index.cjs.js
CHANGED
|
@@ -176,7 +176,7 @@ Please change the parent <Route path="${C}"> to <Route path="${C==="/"?"*":`${C}
|
|
|
176
176
|
box-sizing: border-box;
|
|
177
177
|
position: relative;
|
|
178
178
|
}
|
|
179
|
-
`,ns=e=>{const{containerStyles:t,pageStyles:r,children:i,allowScroll:a=!0,floatingContent:s,reserveSpaceForScrollbar:c}=e,{footer:l,header:u}=ts(e);return K.jsxs(rs,{id:"page-container",styles:{...t},children:[u.visible&&K.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}),K.jsx("div",{id:"page-body",style:{width:"100%",overflow:"hidden",display:"flex",flex:1,marginTop:`-${u.height}px`,marginBottom:`-${l.height}px`},children:K.jsx("div",{id:"page-content",style:{width:"100%",overflowX:"hidden",overflowY:a?"auto":"hidden",display:"flex",flexDirection:"column",flex:1,minHeight:"100%",scrollbarGutter:c?"stable":void 0,paddingLeft:"0px",paddingRight:"0px",paddingTop:`${u.height}px`,paddingBottom:`${l.height}px`,...r},children:i})}),l.visible&&K.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 Sn{static clamp=(t,r,i)=>t>i?i:t<r?r:t}class is{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 as{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:{}},os=ft.exports,Lr;function ss(){return Lr||(Lr=1,function(e,t){(function(r,i){e.exports=i()})(os,function(){var r=1e3,i=6e4,a=36e5,s="millisecond",c="second",l="minute",u="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:u,m:l,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 u:return S(F+"Minutes",1);case l: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[u]=n+"Hours",H[l]=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[l]=i,H[u]=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 u:m=L/a;break;case l: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",l],["$H",u],["$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 ls=ss();const dt=Ut(ls);var ht={exports:{}},us=ht.exports,Dr;function cs(){return Dr||(Dr=1,function(e,t){(function(r,i){e.exports=i()})(us,function(){var r="minute",i=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(s,c,l){var u=c.prototype;l.utc=function(p){var I={date:p,utc:!0,args:arguments};return new c(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 h=u.parse;u.parse=function(p){p.utc&&(this.$u=!0),this.$utils().u(p.$offset)||(this.$offset=p.$offset),h.call(this,p)};var g=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 g.call(this)};var x=u.utcOffset;u.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=u.format;u.format=function(p){var I=p||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return j.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 M=u.toDate;u.toDate=function(p){return p==="s"&&this.$offset?l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():M.call(this)};var P=u.diff;u.diff=function(p,I,C){if(p&&this.$u===p.$u)return P.call(this,p,I,C);var N=this.local(),U=l(p).local();return P.call(N,U,I,C)}}})}(ht)),ht.exports}var fs=cs();const ds=Ut(fs);dt.extend(ds);class hs{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(),l=r.minute(),u=r.day();return{day:i,month:a,year:s,hour:c,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 ps=({percentage:e,min:t=0,max:r=100,styles:i,barStyles:a})=>{const s=Sn.clamp(e,t,r);return K.jsx("div",{style:{width:"90%",height:"30px",border:"1px solid #000000",borderRadius:"3px",background:"#ffffff",...i},children:K.jsx("div",{style:{width:`${s}%`,height:"100%",background:"#f58b00ff",...a}})})},ms=({src:e,width:t="22",height:r="28",stroke:i,viewBox:a="0 0 22 28",fill:s="#000000",alt:c="",onClick:l,styles:u})=>K.jsx("div",{style:{width:"fit-content",height:"fit-content",display:"flex",alignItems:"center",justifyContent:"center",...u},onClick:()=>l?.(),children:K.jsx("svg",{width:t,height:r,viewBox:a,fill:s,stroke:i,xmlns:"http://www.w3.org/2000/svg",style:{display:"flex"},children:e})}),vs=Pe.div`
|
|
179
|
+
`,ns=e=>{const{containerStyles:t,pageStyles:r,children:i,allowScroll:a=!0,floatingContent:s,reserveSpaceForScrollbar:c}=e,{footer:l,header:u}=ts(e);return K.jsxs(rs,{id:"page-container",styles:{...t},children:[u.visible&&K.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}),K.jsx("div",{id:"page-body",style:{width:"100%",overflow:"hidden",display:"flex",flex:1,marginTop:`-${u.height}px`,marginBottom:`-${l.height}px`},children:K.jsx("div",{id:"page-content",style:{width:"100%",overflowX:"hidden",overflowY:a?"auto":"hidden",display:"flex",flexDirection:"column",flex:1,minHeight:"100%",scrollbarGutter:c?"stable":void 0,paddingLeft:"0px",paddingRight:"0px",paddingTop:`${u.height}px`,paddingBottom:`${l.height}px`,...r},children:i})}),l.visible&&K.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 Sn{static clamp=(t,r,i)=>t>i?i:t<r?r:t}class is{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 as{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:{}},os=ft.exports,Lr;function ss(){return Lr||(Lr=1,function(e,t){(function(r,i){e.exports=i()})(os,function(){var r=1e3,i=6e4,a=36e5,s="millisecond",c="second",l="minute",u="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:u,m:l,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 u:return S(F+"Minutes",1);case l: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[u]=n+"Hours",H[l]=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[l]=i,H[u]=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 u:m=L/a;break;case l: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",l],["$H",u],["$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 ls=ss();const dt=Ut(ls);var ht={exports:{}},us=ht.exports,Dr;function cs(){return Dr||(Dr=1,function(e,t){(function(r,i){e.exports=i()})(us,function(){var r="minute",i=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(s,c,l){var u=c.prototype;l.utc=function(p){var I={date:p,utc:!0,args:arguments};return new c(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 h=u.parse;u.parse=function(p){p.utc&&(this.$u=!0),this.$utils().u(p.$offset)||(this.$offset=p.$offset),h.call(this,p)};var g=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 g.call(this)};var x=u.utcOffset;u.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=u.format;u.format=function(p){var I=p||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return j.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 M=u.toDate;u.toDate=function(p){return p==="s"&&this.$offset?l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():M.call(this)};var P=u.diff;u.diff=function(p,I,C){if(p&&this.$u===p.$u)return P.call(this,p,I,C);var N=this.local(),U=l(p).local();return P.call(N,U,I,C)}}})}(ht)),ht.exports}var fs=cs();const ds=Ut(fs);dt.extend(ds);class hs{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(),l=r.minute(),u=r.day();return{day:i,month:a,year:s,hour:c,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 ps=({percentage:e,min:t=0,max:r=100,styles:i,barStyles:a})=>{const s=Sn.clamp(e,t,r);return K.jsx("div",{style:{width:"90%",height:"30px",border:"1px solid #000000",borderRadius:"3px",background:"#ffffff",...i},children:K.jsx("div",{style:{width:`${s}%`,height:"100%",background:"#f58b00ff",...a}})})},ms=({checked:e,onClick:t,styles:r,checkedStyles:i,customCheckedRender:a,customUncheckedRender:s})=>{const c=e?{...r,...i}:{...r};return K.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",...c},children:[e&&K.jsxs(K.Fragment,{children:[!a&&K.jsx("div",{style:{borderRadius:"50%",aspectRatio:"1/1",width:"40%",background:"#ffffff"}}),a]}),!e&&s]})},vs=({src:e,width:t="22",height:r="28",stroke:i,viewBox:a="0 0 22 28",fill:s="#000000",alt:c="",onClick:l,styles:u})=>K.jsx("div",{style:{width:"fit-content",height:"fit-content",display:"flex",alignItems:"center",justifyContent:"center",...u},onClick:()=>l?.(),children:K.jsx("svg",{width:t,height:r,viewBox:a,fill:s,stroke:i,xmlns:"http://www.w3.org/2000/svg",style:{display:"flex"},children:e})}),gs=Pe.div`
|
|
180
180
|
display: flex;
|
|
181
181
|
flex-direction: column;
|
|
182
182
|
font-family: inherit;
|
|
@@ -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
|
-
`,
|
|
201
|
+
`,ys=({name:e,label:t,leftIcon:r,rightIcon:i,bottomMessage:a,placeHolder:s,value:c,initialValue:l,onChange:u,onFocus:h,inputStyles:g,containerStyles:x,styles:j})=>{const M=p=>{u?.(p.currentTarget.value)},P=p=>{p.preventDefault(),p.stopPropagation(),h?.()};return K.jsxs(gs,{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:l,onChange:M,onFocus:P}),i]}),a]})},bs=({id:e,children:t,styles:r,durationInSeconds:i=3})=>{const a=Y.useRef(!1),{isItemVisible:s,hideItem:c}=et();return Y.useEffect(()=>{const l=s(e);a.current!==l&&(a.current=l,l&&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:l=>{l.stopPropagation(),l.preventDefault()},children:t})})},ws=({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});exports.Button=Rn;exports.Carousel=aa;exports.Checkbox=oa;exports.Drawer=Bo;exports.FeedbackProvider=Yo;exports.Form=Go;exports.Image=Ko;exports.InputField=Zo;exports.Loader=Qo;exports.Modal=es;exports.NavigationProvider=Uo;exports.NumberHelper=Sn;exports.PageLayout=ns;exports.ProgressBar=ps;exports.RadioButton=ms;exports.ScrollHelper=is;exports.SvgImage=vs;exports.TextAreaField=ys;exports.TextHelper=as;exports.TimeHelper=hs;exports.Toast=bs;exports.Typography=ws;exports.defaultBreakpoints=Qr;exports.useDidMount=sa;exports.useDrag=Zr;exports.useFeedback=et;exports.useFetch=la;exports.useNavigation=Wo;exports.useOnScreen=ua;exports.usePointer=Jr;exports.useResponsive=ca;exports.useTranslations=ha;
|