@aleleba/ro-ut-ui 4.1.1 → 4.2.1

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.js CHANGED
@@ -1 +1 @@
1
- !function(r,a){"object"==typeof exports&&"object"==typeof module?module.exports=a():"function"==typeof define&&define.amd?define([],a):"object"==typeof exports?exports["ui-library"]=a():r["ui-library"]=a()}(this,()=>(()=>{"use strict";var r={d:(a,e)=>{for(var t in e)r.o(e,t)&&!r.o(a,t)&&Object.defineProperty(a,t,{enumerable:!0,get:e[t]})},o:(r,a)=>Object.prototype.hasOwnProperty.call(r,a),r:r=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})}},a={};r.r(a),r.d(a,{BorderCard:()=>Ir,Button:()=>Pr,ButtonThemes:()=>Cr,ButtonTypes:()=>Nr,Card:()=>Tr,CardThemes:()=>_r,Icon:()=>Q,IconNames:()=>D,Input:()=>Ur,InputThemes:()=>Vr,getBorderCard:()=>Kr,getButtonThemeClass:()=>xr,getCardThemeClass:()=>Hr,getIconClass:()=>ur,getInputThemeClass:()=>Xr});const e="namBd2yDO5uRnuiJiF4I",t="IezAhh3IOxZrbRaPnSuX",n="peAKuLVAiIXSFB_8weUX",c="fX0XkPg_VOwlCS_puohG",o="uRh5AMB7fHGMjymlSkIe",i="A61ABO8IXKvkyJ2iRq6l",u="jtiHB4J2Gd75DxgbExDU",s="htFKNG_lNNMADoynscvf",d="b41eXc_YG54TSjVcPdr3",l="iDCPPzPmlHXmY6DeRlrz",m="qSKheV1seun_M2zooNYG",y="neFnz7mqfjyob2IpBRAB",p="W1_8p2A4KoAru1W3fQQt",f="tm0XixvT9lg82S8vBQ7H",h="s4WqNjDDGgeMddVjGC39",v="bedJB1k7F24TZZ14mvGS",b="PgNn5YrHhpkkzKgbQGHw",g="g7BsZUvE5UmvGR7yux1n",j="oCPQLbmQjjlb4QfF6N3z",O="w1jjKytmOVrGE_OOWN24",C="wxOwGgByggkSrx_yH1Mm",N="jyv2Pn76yjv7yHzme6Vi",P="l_u5YpNTZO_QLR2ODTsM",x="D3lpa3rGkDORSZEMO4Pu",q="ptOAordfG6nUqt1RGPGD",B="tcijTEF2DcjdTgUYgwm_",S="Sb74MmtzlQ4r_auGli10",w="iRPlBCtkk8OZ1fVrK6Ac",k=require("react/jsx-runtime");var D,G=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return r.filter(function(r){return r}).join(" ")},Q=function(r){var a=r.id,e=void 0===a?"":a,t=r.className,n=void 0===t?"":t,c=r.icon,o=G(c?ur({icon:c}):"",n);return(0,k.jsx)("span",{id:e,className:o})},R=e,A=g,_=b,I=l,T=s,H=u,K=c,M=t,V=N,U=i,X=y,z=d,F=h,E=f,Z=S,L=C,W=v,Y=O,J=m,$=x,rr=P,ar=q,er=B,tr=o,nr=j,cr=p,or=n,ir=w;!function(r){r.perfil="perfil",r.password="password",r.google="google",r.facebook="facebook",r.dashboard="dashboard",r.calendario="calendario",r.administracionDeUsuario="administracionDeUsuario",r.rutas="rutas",r.chat="chat",r.informes="informes",r.flecha="flecha",r.nuevaRuta="nuevaRuta",r.notificacion="notificacion",r.usuarioDentroApp="usuarioDentroApp",r.rutaNueva="rutaNueva",r.nuevaRuta2="nuevaRuta2",r.rutaCompletada="rutaCompletada",r.hoy="hoy",r.rutasProgramadas="rutasProgramadas",r.rutasEliminadas="rutasEliminadas",r.rutasReprogramadas="rutasReprogramadas",r.search="search",r.camion="camion",r.pickup="pickup",r.motocicleta="motocicleta",r.barco="barco",r.varios="varios"}(D||(D={}));var ur=function(r){switch(r.icon){case"perfil":return"".concat(R," ").concat(A);case"password":return"".concat(R," ").concat(_);case"google":return"".concat(R," ").concat(I);case"facebook":return"".concat(R," ").concat(T);case"dashboard":return"".concat(R," ").concat(H);case"calendario":return"".concat(R," ").concat(K);case"administracionDeUsuario":return"".concat(R," ").concat(M);case"rutas":return"".concat(R," ").concat(V);case"chat":return"".concat(R," ").concat(U);case"informes":return"".concat(R," ").concat(X);case"flecha":return"".concat(R," ").concat(z);case"nuevaRuta":return"".concat(R," ").concat(F);case"notificacion":return"".concat(R," ").concat(E);case"usuarioDentroApp":return"".concat(R," ").concat(Z);case"rutaNueva":return"".concat(R," ").concat(L);case"nuevaRuta2":return"".concat(R," ").concat(W);case"rutaCompletada":return"".concat(R," ").concat(Y);case"hoy":return"".concat(R," ").concat(J);case"rutasProgramadas":return"".concat(R," ").concat($);case"rutasEliminadas":return"".concat(R," ").concat(rr);case"rutasReprogramadas":return"".concat(R," ").concat(ar);case"search":return"".concat(R," ").concat(er);case"camion":return"".concat(R," ").concat(tr);case"pickup":return"".concat(R," ").concat(nr);case"motocicleta":return"".concat(R," ").concat(cr);case"barco":return"".concat(R," ").concat(or);case"varios":return"".concat(R," ").concat(ir);default:return""}};const sr="UxC2t97LIIISx7e71_3R",dr="JJF9nOwFrn4f4Agjebcs",lr="cwK5avZb5ShuVPiPWB8Q",mr="CFpiqnX4jq_EltxkwEvy",yr="yjB0ArEAyeYU6_u7zKsQ",pr="Djr8Yh2IQcUcgjSZ_WQ5",fr="uyBaWoSnHEIxM4x7jgQw",hr="qWYltwKufw7ZliVlCT9g",vr="oQRCOHaGpuh207HQzerc",br="HtF5k4mwsNW1v9YG7qd2",gr="Pg7VF5nFKczFtA3r5E88",jr="wXyKJ8kY_42bOcyetwnC",Or="dLCzLEcc0jSLJgsTyHoM";var Cr,Nr,Pr=function(r){var a=r.id,e=void 0===a?"":a,t=r.children,n=void 0===t?"":t,c=r.className,o=void 0===c?"":c,i=r.theme,u=void 0===i?Cr.primary:i,s=r.hardBorder,d=void 0===s||s,l=r.type,m=void 0===l?Nr.button:l,y=r.onClick,p=G(sr,xr({theme:u}),d?dr:lr,o);return(0,k.jsx)("button",{id:e,className:p,type:m,onClick:y,children:n})};!function(r){r.primary="primary",r.secondary="secondary",r.tertiary="tertiary",r.quaternary="quaternary",r.quinary="quinary",r.primaryOutline="primaryOutline",r.secondaryOutline="secondaryOutline",r.tertiaryOutline="tertiaryOutline",r.quaternaryOutline="quaternaryOutline",r.quinaryOutline="quinaryOutline"}(Cr||(Cr={})),function(r){r.submit="submit",r.reset="reset",r.button="button"}(Nr||(Nr={}));var xr=function(r){switch(r.theme){case Cr.primary:return mr;case Cr.secondary:return yr;case Cr.tertiary:return pr;case Cr.quaternary:return fr;case Cr.quinary:return hr;case Cr.primaryOutline:return vr;case Cr.secondaryOutline:return br;case Cr.tertiaryOutline:return gr;case Cr.quaternaryOutline:return jr;case Cr.quinaryOutline:return Or;default:return""}};const qr="pAD4BifhMTLUZvCJxyOx",Br="a2VHzo7AbMVmPMGC3mSx",Sr="W0VuH9q0UPwsyVsTQQJe",wr="SIPeMNZqcOWCkESf4cPg",kr="hPcmh2SHmHeXnUxGP93s",Dr="DcZJoe6Kl4lnV3k4i7nV",Gr="LH35do5a6HPSjPusBT_z",Qr="juXoWoLQrRgOgzapK6H9",Rr="tPCdlPqN6fB69GmnQ181",Ar="nsb5sNsicCrkfBe9SIFs";var _r,Ir,Tr=function(r){var a=r.children,e=void 0===a?"":a,t=r.className,n=void 0===t?"":t,c=r.theme,o=void 0===c?_r.primary:c,i=r.border,u=void 0===i?Ir.soft:i,s=r.title,d=G(qr,Hr({theme:o}),Kr({border:u}),n);return(0,k.jsxs)("div",{className:d,children:[s&&(0,k.jsx)("div",{className:Br,children:(0,k.jsx)("h5",{className:wr,children:s})}),(0,k.jsx)("div",{className:Sr,children:e})]})};!function(r){r.primary="primary",r.secondary="secondary",r.tertiary="tertiary",r.quaternary="quaternary"}(_r||(_r={})),function(r){r.soft="soft",r.hard="hard"}(Ir||(Ir={}));var Hr=function(r){switch(r.theme){case"primary":return Gr;case"secondary":return Qr;case"tertiary":return Rr;case"quaternary":return Ar;default:return""}},Kr=function(r){switch(r.border){case"soft":return kr;case"hard":return Dr;default:return""}};const Mr={"icon-input":"RaCKCo18u9LiXlNtfXSg","input-common":"LCo8ZQNn4x9t1bQv68YX","input-with-icon":"nB_qk0uh4VaPFqAV_rdo","input-secondary":"r2dDDK1b9GSUQ7KkjlAS","input-border-hard":"xghXNj3fj0NG1DBWKj8w","input-tertiary":"eB30gQUCIMLMoZPeOKil"};var Vr,Ur=function(r){var a=r.id,e=void 0===a?"":a,t=r.className,n=void 0===t?"":t,c=r.type,o=void 0===c?"text":c,i=r.theme,u=void 0===i?Vr.primary:i,s=r.placeholder,d=void 0===s?"":s,l=r.hardBorder,m=void 0!==l&&l,y=r.icon,p=r.onChange,f=void 0===p?function(){}:p,h=G(Mr["input-common"],Xr({theme:u}),m?Mr["input-border-hard"]:"",n,y?Mr["input-with-icon"]:"");return(0,k.jsxs)("div",{className:Mr.relative,children:[(0,k.jsx)("input",{id:e,className:h,placeholder:d,type:o,onChange:f}),y&&(0,k.jsx)(Q,{className:Mr["icon-input"],icon:y})]})};!function(r){r.primary="primary",r.secondary="secondary",r.tertiary="tertiary"}(Vr||(Vr={}));var Xr=function(r){switch(r.theme){case"primary":default:return"";case"secondary":return Mr["input-secondary"];case"tertiary":return Mr["input-tertiary"]}};return a})());
1
+ !function(e,a){"object"==typeof exports&&"object"==typeof module?module.exports=a():"function"==typeof define&&define.amd?define([],a):"object"==typeof exports?exports["ui-library"]=a():e["ui-library"]=a()}(this,()=>(()=>{"use strict";var e={d:(a,n)=>{for(var r in n)e.o(n,r)&&!e.o(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:n[r]})},o:(e,a)=>Object.prototype.hasOwnProperty.call(e,a),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},a={};e.r(a),e.d(a,{BorderCard:()=>He,Button:()=>ke,ButtonThemes:()=>Oe,ButtonTypes:()=>Ce,Card:()=>Le,CardThemes:()=>ze,Icon:()=>M,IconNames:()=>q,Input:()=>Ve,InputThemes:()=>Fe,LeftNavbar:()=>ga,LeftNavbarThemes:()=>Ta,NavItem:()=>Sa,NavList:()=>wa,NavMenuContext:()=>ia,Navbar:()=>ua,NavbarContext:()=>oa,NavbarThemes:()=>ka,TopNavbar:()=>da,TopNavbarThemes:()=>Qa,getBorderCard:()=>Re,getButtonThemeClass:()=>Qe,getCardThemeClass:()=>Ie,getIconClass:()=>de,getInputThemeClass:()=>Ze,getLeftNavbarThemeClass:()=>qa,getNavbarThemeClass:()=>Ea,getTopNavbarThemeClass:()=>Pa,useNavMenu:()=>sa,useNavbar:()=>ca});const n="namBd2yDO5uRnuiJiF4I",r="IezAhh3IOxZrbRaPnSuX",t="peAKuLVAiIXSFB_8weUX",o="fX0XkPg_VOwlCS_puohG",c="uRh5AMB7fHGMjymlSkIe",i="A61ABO8IXKvkyJ2iRq6l",s="jtiHB4J2Gd75DxgbExDU",u="htFKNG_lNNMADoynscvf",d="b41eXc_YG54TSjVcPdr3",l="iDCPPzPmlHXmY6DeRlrz",m="qSKheV1seun_M2zooNYG",v="neFnz7mqfjyob2IpBRAB",p="fMuDGJLmZu10m_5wuQwH",h="W1_8p2A4KoAru1W3fQQt",f="tm0XixvT9lg82S8vBQ7H",y="s4WqNjDDGgeMddVjGC39",b="bedJB1k7F24TZZ14mvGS",g="PgNn5YrHhpkkzKgbQGHw",x="g7BsZUvE5UmvGR7yux1n",N="oCPQLbmQjjlb4QfF6N3z",j="w1jjKytmOVrGE_OOWN24",w="wxOwGgByggkSrx_yH1Mm",O="jyv2Pn76yjv7yHzme6Vi",C="l_u5YpNTZO_QLR2ODTsM",k="D3lpa3rGkDORSZEMO4Pu",Q="ptOAordfG6nUqt1RGPGD",T="tcijTEF2DcjdTgUYgwm_",S="Sb74MmtzlQ4r_auGli10",E="iRPlBCtkk8OZ1fVrK6Ac",P=require("react/jsx-runtime");var q,B=function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];return e.filter(function(e){return e}).join(" ")},M=function(e){var a=e.id,n=void 0===a?"":a,r=e.className,t=void 0===r?"":r,o=e.icon,c=B(o?de({icon:o}):"",t);return(0,P.jsx)("span",{id:n,className:c})},_=n,D=x,G=g,z=l,H=u,L=s,I=o,R=r,A=O,F=i,V=v,Z=d,K=y,Y=f,U=S,W=w,X=b,J=j,$=m,ee=k,ae=C,ne=Q,re=T,te=c,oe=N,ce=h,ie=t,se=E,ue=p;!function(e){e.perfil="perfil",e.password="password",e.google="google",e.facebook="facebook",e.dashboard="dashboard",e.calendario="calendario",e.administracionDeUsuario="administracionDeUsuario",e.rutas="rutas",e.chat="chat",e.informes="informes",e.flecha="flecha",e.nuevaRuta="nuevaRuta",e.notificacion="notificacion",e.usuarioDentroApp="usuarioDentroApp",e.rutaNueva="rutaNueva",e.nuevaRuta2="nuevaRuta2",e.rutaCompletada="rutaCompletada",e.hoy="hoy",e.rutasProgramadas="rutasProgramadas",e.rutasEliminadas="rutasEliminadas",e.rutasReprogramadas="rutasReprogramadas",e.search="search",e.camion="camion",e.pickup="pickup",e.motocicleta="motocicleta",e.barco="barco",e.varios="varios",e.menu="menu"}(q||(q={}));var de=function(e){switch(e.icon){case"perfil":return"".concat(_," ").concat(D);case"password":return"".concat(_," ").concat(G);case"google":return"".concat(_," ").concat(z);case"facebook":return"".concat(_," ").concat(H);case"dashboard":return"".concat(_," ").concat(L);case"calendario":return"".concat(_," ").concat(I);case"administracionDeUsuario":return"".concat(_," ").concat(R);case"rutas":return"".concat(_," ").concat(A);case"chat":return"".concat(_," ").concat(F);case"informes":return"".concat(_," ").concat(V);case"flecha":return"".concat(_," ").concat(Z);case"nuevaRuta":return"".concat(_," ").concat(K);case"notificacion":return"".concat(_," ").concat(Y);case"usuarioDentroApp":return"".concat(_," ").concat(U);case"rutaNueva":return"".concat(_," ").concat(W);case"nuevaRuta2":return"".concat(_," ").concat(X);case"rutaCompletada":return"".concat(_," ").concat(J);case"hoy":return"".concat(_," ").concat($);case"rutasProgramadas":return"".concat(_," ").concat(ee);case"rutasEliminadas":return"".concat(_," ").concat(ae);case"rutasReprogramadas":return"".concat(_," ").concat(ne);case"search":return"".concat(_," ").concat(re);case"camion":return"".concat(_," ").concat(te);case"pickup":return"".concat(_," ").concat(oe);case"motocicleta":return"".concat(_," ").concat(ce);case"barco":return"".concat(_," ").concat(ie);case"varios":return"".concat(_," ").concat(se);case"menu":return"".concat(_," ").concat(ue);default:return""}};const le="UxC2t97LIIISx7e71_3R",me="JJF9nOwFrn4f4Agjebcs",ve="cwK5avZb5ShuVPiPWB8Q",pe="CFpiqnX4jq_EltxkwEvy",he="yjB0ArEAyeYU6_u7zKsQ",fe="Djr8Yh2IQcUcgjSZ_WQ5",ye="uyBaWoSnHEIxM4x7jgQw",be="qWYltwKufw7ZliVlCT9g",ge="oQRCOHaGpuh207HQzerc",xe="HtF5k4mwsNW1v9YG7qd2",Ne="Pg7VF5nFKczFtA3r5E88",je="wXyKJ8kY_42bOcyetwnC",we="dLCzLEcc0jSLJgsTyHoM";var Oe,Ce,ke=function(e){var a=e.id,n=void 0===a?"":a,r=e.children,t=void 0===r?"":r,o=e.className,c=void 0===o?"":o,i=e.theme,s=void 0===i?Oe.primary:i,u=e.hardBorder,d=void 0===u||u,l=e.type,m=void 0===l?Ce.button:l,v=e.onClick,p=B(le,Qe({theme:s}),d?me:ve,c);return(0,P.jsx)("button",{id:n,className:p,type:m,onClick:v,children:t})};!function(e){e.primary="primary",e.secondary="secondary",e.tertiary="tertiary",e.quaternary="quaternary",e.quinary="quinary",e.primaryOutline="primaryOutline",e.secondaryOutline="secondaryOutline",e.tertiaryOutline="tertiaryOutline",e.quaternaryOutline="quaternaryOutline",e.quinaryOutline="quinaryOutline"}(Oe||(Oe={})),function(e){e.submit="submit",e.reset="reset",e.button="button"}(Ce||(Ce={}));var Qe=function(e){switch(e.theme){case Oe.primary:return pe;case Oe.secondary:return he;case Oe.tertiary:return fe;case Oe.quaternary:return ye;case Oe.quinary:return be;case Oe.primaryOutline:return ge;case Oe.secondaryOutline:return xe;case Oe.tertiaryOutline:return Ne;case Oe.quaternaryOutline:return je;case Oe.quinaryOutline:return we;default:return""}};const Te="pAD4BifhMTLUZvCJxyOx",Se="a2VHzo7AbMVmPMGC3mSx",Ee="W0VuH9q0UPwsyVsTQQJe",Pe="SIPeMNZqcOWCkESf4cPg",qe="hPcmh2SHmHeXnUxGP93s",Be="DcZJoe6Kl4lnV3k4i7nV",Me="LH35do5a6HPSjPusBT_z",_e="juXoWoLQrRgOgzapK6H9",De="tPCdlPqN6fB69GmnQ181",Ge="nsb5sNsicCrkfBe9SIFs";var ze,He,Le=function(e){var a=e.children,n=void 0===a?"":a,r=e.className,t=void 0===r?"":r,o=e.theme,c=void 0===o?ze.primary:o,i=e.border,s=void 0===i?He.soft:i,u=e.title,d=B(Te,Ie({theme:c}),Re({border:s}),t);return(0,P.jsxs)("div",{className:d,children:[u&&(0,P.jsx)("div",{className:Se,children:(0,P.jsx)("h5",{className:Pe,children:u})}),(0,P.jsx)("div",{className:Ee,children:n})]})};!function(e){e.primary="primary",e.secondary="secondary",e.tertiary="tertiary",e.quaternary="quaternary"}(ze||(ze={})),function(e){e.soft="soft",e.hard="hard"}(He||(He={}));var Ie=function(e){switch(e.theme){case"primary":return Me;case"secondary":return _e;case"tertiary":return De;case"quaternary":return Ge;default:return""}},Re=function(e){switch(e.border){case"soft":return qe;case"hard":return Be;default:return""}};const Ae={"icon-input":"RaCKCo18u9LiXlNtfXSg","input-common":"LCo8ZQNn4x9t1bQv68YX","input-with-icon":"nB_qk0uh4VaPFqAV_rdo","input-secondary":"r2dDDK1b9GSUQ7KkjlAS","input-border-hard":"xghXNj3fj0NG1DBWKj8w","input-tertiary":"eB30gQUCIMLMoZPeOKil"};var Fe,Ve=function(e){var a=e.id,n=void 0===a?"":a,r=e.className,t=void 0===r?"":r,o=e.type,c=void 0===o?"text":o,i=e.theme,s=void 0===i?Fe.primary:i,u=e.placeholder,d=void 0===u?"":u,l=e.hardBorder,m=void 0!==l&&l,v=e.icon,p=e.onChange,h=void 0===p?function(){}:p,f=B(Ae["input-common"],Ze({theme:s}),m?Ae["input-border-hard"]:"",t,v?Ae["input-with-icon"]:"");return(0,P.jsxs)("div",{className:Ae.relative,children:[(0,P.jsx)("input",{id:n,className:f,placeholder:d,type:c,onChange:h}),v&&(0,P.jsx)(M,{className:Ae["icon-input"],icon:v})]})};!function(e){e.primary="primary",e.secondary="secondary",e.tertiary="tertiary"}(Fe||(Fe={}));var Ze=function(e){switch(e.theme){case"primary":default:return"";case"secondary":return Ae["input-secondary"];case"tertiary":return Ae["input-tertiary"]}};const Ke="FnQHiSW9NTFa3WlXGoCc",Ye="NatMJzDzTApsQaVDAagx",Ue="qY4Y2bWaIDQFsSw6KaT5",We="zguwwN6hze6uapnqp5Ni",Xe="ko1cAltyF24Od59He2SS",Je="kpCx3tGL8Ty2NT_5o1mJ",$e="F6hI7ZfLokc9h5jkh6IL",ea="qlSGENr4s2AUMMLzL8AR",aa="RY7dvVQ6fbBnjtgy0igh",na="OpF1ocsD_5dn_993DhqT",ra="FSuEOctgnc2BHuB5nXoQ",ta=require("react");var oa=(0,ta.createContext)(void 0),ca=function(){var e;return null!==(e=(0,ta.useContext)(oa))&&void 0!==e?e:{isOpen:!1,toggle:function(){},setOpen:function(){},isExpanded:!1,toggleExpanded:function(){},isMobile:!1}},ia=(0,ta.createContext)("accordion"),sa=function(){return(0,ta.useContext)(ia)},ua=function(e){var a=e.id,n=void 0===a?"":a,r=e.children,t=void 0===r?"":r,o=e.className,c=void 0===o?"":o,i=e.theme,s=void 0===i?ka.primary:i,u=e.defaultOpen,d=void 0!==u&&u,l=e.defaultExpanded,m=void 0!==l&&l,v=(0,ta.useState)(d),p=v[0],h=v[1],f=(0,ta.useState)(m),y=f[0],b=f[1],g=(0,ta.useState)(!1),x=g[0],N=g[1];(0,ta.useEffect)(function(){if("undefined"!=typeof window&&window.matchMedia){var e=window.matchMedia("(max-width: 767px)"),a=function(){return N(e.matches)};return a(),e.addEventListener?(e.addEventListener("change",a),function(){return e.removeEventListener("change",a)}):(e.addListener(a),function(){return e.removeListener(a)})}},[]),(0,ta.useEffect)(function(){if("undefined"!=typeof document){var e=document.documentElement;return e.style.setProperty("--ro-ut-sidebar-width",x?"0px":y?"24rem":"6rem"),e.style.setProperty("--ro-ut-topbar-height",x?"0px":"101px"),function(){e.style.removeProperty("--ro-ut-sidebar-width"),e.style.removeProperty("--ro-ut-topbar-height")}}},[x,y]);var j=(0,ta.useCallback)(function(){return h(function(e){return!e})},[]),w=(0,ta.useCallback)(function(e){return h(e)},[]),O=(0,ta.useCallback)(function(){return b(function(e){return!e})},[]),C={isOpen:p,toggle:j,setOpen:w,isExpanded:y,toggleExpanded:O,isMobile:x},k=B(Ke,Ea({theme:s}),c);return(0,P.jsx)(oa.Provider,{value:C,children:(0,P.jsx)("nav",{id:n,className:k,children:t})})},da=function(e){var a=e.id,n=void 0===a?"":a,r=e.children,t=void 0===r?"":r,o=e.className,c=void 0===o?"":o,i=e.theme,s=void 0===i?Qa.primary:i,u=e.brand,d=e.actions,l=e.menuIcon,m=void 0===l?q.menu:l,v=e.hideMenuToggle,p=void 0!==v&&v,h=ca(),f=h.isOpen,y=h.toggle,b=h.isMobile?"accordion":"dropdown",g=B(Ue,Pa({theme:s}),c),x=B($e,f?ea:aa);return(0,P.jsxs)("header",{id:n,className:g,children:[(0,P.jsxs)("div",{className:We,children:[u&&(0,P.jsx)("div",{className:Je,children:u}),!p&&(0,P.jsx)("button",{type:"button","aria-label":"Toggle menu",className:Xe,onClick:y,children:(0,P.jsx)(M,{icon:m})})]}),(0,P.jsx)(ia.Provider,{value:b,children:(0,P.jsx)("div",{className:x,children:t})}),d&&(0,P.jsx)("div",{className:na,children:d})]})};const la="lB8REa7QbS00_HY39qlv",ma="sSfHpXGaWQJlKsMHHaNz",va="KUAQgA5jKT0cpt4YT9My",pa="VHv_24fnWV6U7utpmyOv",ha="xz7mio21qHuZpdmkS_Ql",fa="mecTZPfsBQEB8_dRnBQz",ya="B9dyOyj_V1ejlMhgfn9g",ba="ZddvyvLdn43wm9cl0jwZ";var ga=function(e){var a=e.id,n=void 0===a?"":a,r=e.children,t=void 0===r?"":r,o=e.className,c=void 0===o?"":o,i=e.theme,s=void 0===i?Ta.primary:i,u=e.pinToggleIcon,d=void 0===u?q.flecha:u,l=e.hidePinToggle,m=void 0!==l&&l,v=ca(),p=v.isOpen,h=v.isExpanded,f=v.toggleExpanded,y=B(la,p?ma:va,h?ha:pa,qa({theme:s}),c);return(0,P.jsxs)("aside",{id:n,className:y,children:[(0,P.jsx)(ia.Provider,{value:"accordion",children:t}),!m&&(0,P.jsx)("button",{type:"button","aria-label":"Toggle sidebar",className:fa,onClick:f,children:(0,P.jsx)(M,{icon:d,className:B(ya,h?ba:"")})})]})};const xa="huVncZ_cd_BiHgGKvG2R",Na="OhBh129QqaKYIl1RoRRQ",ja="mpssuMH2mFjNpZnuMaOp";var wa=function(e){var a=e.id,n=void 0===a?"":a,r=e.children,t=e.className,o=void 0===t?"":t,c=e.level,i=void 0===c?1:c,s=sa(),u=B(xa,"dropdown"===s&&1===i?ja:Na,o);return(0,P.jsx)("ul",{id:n,className:u,children:ta.Children.map(r,function(e){return(0,ta.isValidElement)(e)?(0,ta.cloneElement)(e,{level:i}):e})})};const Oa=require("react-router-dom"),Ca={"nav-item-wrapper":"DYcbVGvq2gOTbslQ9dtd","nav-item":"UuLDbzdBjeWuOYQrYFWC","nav-item-inline":"poOzQJfQ4Zwl1iu2RK31","nav-item-l1":"k4ofdETJ7Y_29z1Izk5N","nav-item-l2":"_dxePEO0GOkz4uV9ZCih","nav-item-l3":"dhQwjaox_1b3Ne2rtLUV","nav-item-collapsed":"bMDMJ1WsQxyWIruZxhk4","nav-item-active":"Ox3zdaZO80qbQ_tOnwAf","nav-item-icon":"FGmw5cM6XpFJK0IFEZA_","nav-item-icon-active":"oxRil4wKmzylOy_4besK","nav-item-label":"g6mZSnz_vDZHIPu7Lcn0","nav-item-label-collapsed":"EdGVseAHauIZaFqII1Oc","nav-item-chevron":"oUSWwp2gN16l9XDwC401","is-open":"f2sCWSYLCu5BcSoAQUfJ","nav-item-chevron-collapsed":"hq0Y1ntvELh0Hqs1kXut","nav-dropdown-panel":"YFeh0FaB0H6yto5JgjF6","nav-dropdown-below":"zrQ1EkV9gwCROBuciEk9","nav-dropdown-side":"zs65yT6zCjjFDszT1VGQ"};var ka,Qa,Ta,Sa=function(e){var a=e.id,n=void 0===a?"":a,r=e.label,t=void 0===r?"":r,o=e.icon,c=e.children,i=e.className,s=void 0===i?"":i,u=e.active,d=void 0!==u&&u,l=e.to,m=e.href,v=e.onClick,p=e.defaultExpanded,h=void 0!==p&&p,f=e.level,y=void 0===f?1:f,b=sa(),g=ca().isExpanded,x=(0,ta.useState)(h),N=x[0],j=x[1],w=!!c&&y<3,O=y+1,C="accordion"===b&&!g,k=d&&y>1,Q=d&&1===y,T=B(Ca["nav-item-label"],C?Ca["nav-item-label-collapsed"]:""),S=B(Ca["nav-item"],"accordion"===b?Ca["nav-item-l".concat(y)]:Ca["nav-item-inline"],C?Ca["nav-item-collapsed"]:"",k?Ca["nav-item-active"]:"",s),E=function(e){w&&j(function(e){return!e}),v&&v(e)},_=(0,P.jsxs)(P.Fragment,{children:[o&&(0,P.jsx)(M,{icon:o,className:B(Ca["nav-item-icon"],Q?Ca["nav-item-icon-active"]:"")}),t&&(0,P.jsx)("span",{className:T,children:t}),w&&(0,P.jsx)(M,{icon:q.flecha,className:B(Ca["nav-item-chevron"],C?Ca["nav-item-chevron-collapsed"]:"",N?Ca["is-open"]:"")})]}),D=l?(0,P.jsx)(Oa.Link,{to:l,id:n,className:S,onClick:E,children:_}):m?(0,P.jsx)("a",{id:n,href:m,className:S,onClick:E,children:_}):(0,P.jsx)("button",{id:n,type:"button",className:S,onClick:E,children:_}),G=(0,ta.isValidElement)(c)?(0,ta.cloneElement)(c,{level:O}):c;return(0,P.jsxs)("li",{className:Ca["nav-item-wrapper"],onMouseEnter:"dropdown"===b&&w?function(){return j(!0)}:void 0,onMouseLeave:"dropdown"===b&&w?function(){return j(!1)}:void 0,children:[D,w&&N&&("accordion"===b?G:(0,P.jsx)("div",{className:B(Ca["nav-dropdown-panel"],1===y?Ca["nav-dropdown-below"]:Ca["nav-dropdown-side"]),children:G}))]})};!function(e){e.primary="primary"}(ka||(ka={})),function(e){e.primary="primary",e.dark="dark"}(Qa||(Qa={})),function(e){e.primary="primary"}(Ta||(Ta={}));var Ea=function(e){return e.theme===ka.primary?Ye:""},Pa=function(e){switch(e.theme){case Qa.primary:return"";case Qa.dark:return ra;default:return""}},qa=function(e){e.theme;return Ta.primary,""};return a})());
@@ -25,7 +25,8 @@ export declare enum IconNames {
25
25
  pickup = "pickup",
26
26
  motocicleta = "motocicleta",
27
27
  barco = "barco",
28
- varios = "varios"
28
+ varios = "varios",
29
+ menu = "menu"
29
30
  }
30
31
  export declare const getIconClass: ({ icon }: {
31
32
  icon: IconNames;
@@ -0,0 +1,30 @@
1
+ import { FC, ReactNode, ReactElement } from 'react';
2
+ import { IconNames } from '@components';
3
+ import { LeftNavbarThemes } from '..';
4
+ export type TLeftNavbarProps = {
5
+ /**
6
+ * Is this the id of the left navbar.
7
+ */
8
+ id?: string | undefined;
9
+ /**
10
+ * The sidebar content (typically a single <NavList />).
11
+ */
12
+ children?: string | ReactNode | ReactNode[] | ReactElement;
13
+ /**
14
+ * Is this the classes that you want to add
15
+ */
16
+ className?: string;
17
+ /**
18
+ * Is this the theme you want to add to the left navbar
19
+ */
20
+ theme?: LeftNavbarThemes;
21
+ /**
22
+ * Icon used for the desktop pin/collapse toggle. Default IconNames.flecha.
23
+ */
24
+ pinToggleIcon?: IconNames;
25
+ /**
26
+ * Hide the desktop pin/collapse toggle. Default false.
27
+ */
28
+ hidePinToggle?: boolean;
29
+ };
30
+ export declare const LeftNavbar: FC<TLeftNavbarProps>;
@@ -0,0 +1,49 @@
1
+ import { FC, ReactNode, ReactElement, MouseEventHandler } from 'react';
2
+ import { IconNames } from '@components';
3
+ export type TNavItemProps = {
4
+ /**
5
+ * Is this the id of the item.
6
+ */
7
+ id?: string | undefined;
8
+ /**
9
+ * Visible label.
10
+ */
11
+ label?: string;
12
+ /**
13
+ * Optional leading icon.
14
+ */
15
+ icon?: IconNames;
16
+ /**
17
+ * Nested list (a <NavList />). Renders an accordion/dropdown toggle when level < 3.
18
+ */
19
+ children?: string | ReactNode | ReactNode[] | ReactElement;
20
+ /**
21
+ * Is this the classes that you want to add
22
+ */
23
+ className?: string;
24
+ /**
25
+ * Marks the item as the active/current route.
26
+ */
27
+ active?: boolean;
28
+ /**
29
+ * react-router destination. Renders a <Link> when provided.
30
+ */
31
+ to?: string;
32
+ /**
33
+ * Plain href. Renders an <a> when provided (and `to` is not).
34
+ */
35
+ href?: string;
36
+ /**
37
+ * Click handler (navigation or custom action).
38
+ */
39
+ onClick?: MouseEventHandler<HTMLElement>;
40
+ /**
41
+ * Start expanded (only relevant when it has a nested NavList). Default false.
42
+ */
43
+ defaultExpanded?: boolean;
44
+ /**
45
+ * Nesting depth (1..3). Auto-injected by the parent NavList; consumers never set this.
46
+ */
47
+ level?: 1 | 2 | 3;
48
+ };
49
+ export declare const NavItem: FC<TNavItemProps>;
@@ -0,0 +1,20 @@
1
+ import { FC, ReactNode, ReactElement } from 'react';
2
+ export type TNavListProps = {
3
+ /**
4
+ * Is this the id of the list.
5
+ */
6
+ id?: string | undefined;
7
+ /**
8
+ * The list items (<NavItem />).
9
+ */
10
+ children?: string | ReactNode | ReactNode[] | ReactElement;
11
+ /**
12
+ * Is this the classes that you want to add
13
+ */
14
+ className?: string;
15
+ /**
16
+ * Nesting level (1..3). Auto-injected by NavItem; consumers set only the root (defaults to 1).
17
+ */
18
+ level?: 1 | 2 | 3;
19
+ };
20
+ export declare const NavList: FC<TNavListProps>;
@@ -0,0 +1,29 @@
1
+ import { FC, ReactNode, ReactElement } from 'react';
2
+ import { NavbarThemes } from '..';
3
+ export type TNavbarProps = {
4
+ /**
5
+ * Is this the id of the navbar.
6
+ */
7
+ id?: string | undefined;
8
+ /**
9
+ * The navbar children. Expects <TopNavbar /> and <LeftNavbar />.
10
+ */
11
+ children?: string | ReactNode | ReactNode[] | ReactElement;
12
+ /**
13
+ * Is this the classes that you want to add
14
+ */
15
+ className?: string;
16
+ /**
17
+ * Is this the theme you want to add to the navbar
18
+ */
19
+ theme?: NavbarThemes;
20
+ /**
21
+ * Start with the mobile menu open. Default false.
22
+ */
23
+ defaultOpen?: boolean;
24
+ /**
25
+ * Start with the desktop sidebar pinned-expanded. Default false.
26
+ */
27
+ defaultExpanded?: boolean;
28
+ };
29
+ export declare const Navbar: FC<TNavbarProps>;
@@ -0,0 +1,38 @@
1
+ import { FC, ReactNode, ReactElement } from 'react';
2
+ import { IconNames } from '@components';
3
+ import { TopNavbarThemes } from '..';
4
+ export type TTopNavbarProps = {
5
+ /**
6
+ * Is this the id of the top navbar.
7
+ */
8
+ id?: string | undefined;
9
+ /**
10
+ * The top navbar content (typically a <NavList />).
11
+ */
12
+ children?: string | ReactNode | ReactNode[] | ReactElement;
13
+ /**
14
+ * Is this the classes that you want to add
15
+ */
16
+ className?: string;
17
+ /**
18
+ * Is this the theme you want to add to the top navbar
19
+ */
20
+ theme?: TopNavbarThemes;
21
+ /**
22
+ * Brand/logo node rendered at the start of the bar.
23
+ */
24
+ brand?: ReactNode | ReactElement;
25
+ /**
26
+ * Action nodes (notifications, user) rendered at the end of the bar (desktop only).
27
+ */
28
+ actions?: ReactNode | ReactElement;
29
+ /**
30
+ * Icon used for the mobile hamburger toggle. Default IconNames.menu.
31
+ */
32
+ menuIcon?: IconNames;
33
+ /**
34
+ * Hide the hamburger toggle entirely (e.g. there is no LeftNavbar). Default false.
35
+ */
36
+ hideMenuToggle?: boolean;
37
+ };
38
+ export declare const TopNavbar: FC<TTopNavbarProps>;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * How nested NavLists are presented inside a navbar:
3
+ * - 'accordion' (LeftNavbar): nested levels expand vertically below the item.
4
+ * - 'dropdown' (TopNavbar): nested levels appear as floating panels.
5
+ */
6
+ export type TNavMenuMode = 'accordion' | 'dropdown';
7
+ export declare const NavMenuContext: import("react").Context<TNavMenuMode>;
8
+ export declare const useNavMenu: () => TNavMenuMode;
@@ -0,0 +1,33 @@
1
+ export type TNavbarContext = {
2
+ /**
3
+ * Whether the mobile menu (hamburger) is open. Only relevant below the collapse breakpoint (md).
4
+ */
5
+ isOpen: boolean;
6
+ /**
7
+ * Toggle the mobile menu open/closed.
8
+ */
9
+ toggle: () => void;
10
+ /**
11
+ * Explicit setter for the mobile menu (e.g. close-on-navigate).
12
+ */
13
+ setOpen: (open: boolean) => void;
14
+ /**
15
+ * Whether the desktop sidebar is pinned-expanded (~387px) vs collapsed (~93px).
16
+ */
17
+ isExpanded: boolean;
18
+ /**
19
+ * Pin/collapse the desktop sidebar.
20
+ */
21
+ toggleExpanded: () => void;
22
+ /**
23
+ * Whether the viewport is below the collapse breakpoint (md). Drives responsive behavior
24
+ * that CSS cannot express (e.g. TopNavbar switching from dropdown to accordion).
25
+ */
26
+ isMobile: boolean;
27
+ };
28
+ export declare const NavbarContext: import("react").Context<TNavbarContext | undefined>;
29
+ /**
30
+ * Reads the NavbarContext. Returns a safe no-op default when used outside of <Navbar>,
31
+ * so TopNavbar/LeftNavbar can also render standalone (e.g. isolation stories/tests).
32
+ */
33
+ export declare const useNavbar: () => TNavbarContext;
@@ -0,0 +1,26 @@
1
+ export declare enum NavbarThemes {
2
+ primary = "primary"
3
+ }
4
+ export declare enum TopNavbarThemes {
5
+ primary = "primary",
6
+ dark = "dark"
7
+ }
8
+ export declare enum LeftNavbarThemes {
9
+ primary = "primary"
10
+ }
11
+ export declare const getNavbarThemeClass: ({ theme }: {
12
+ theme: NavbarThemes;
13
+ }) => string;
14
+ export declare const getTopNavbarThemeClass: ({ theme }: {
15
+ theme: TopNavbarThemes;
16
+ }) => string;
17
+ export declare const getLeftNavbarThemeClass: ({ theme }: {
18
+ theme: LeftNavbarThemes;
19
+ }) => string;
20
+ export * from './context/NavbarContext';
21
+ export * from './context/NavMenuContext';
22
+ export * from './Navbar';
23
+ export * from './TopNavbar';
24
+ export * from './LeftNavbar';
25
+ export * from './NavList';
26
+ export * from './NavItem';
@@ -3,3 +3,4 @@ export * from './Icons';
3
3
  export * from './Buttons';
4
4
  export * from './Cards';
5
5
  export * from './Inputs';
6
+ export * from './Navbar';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aleleba/ro-ut-ui",
3
- "version": "4.1.1",
3
+ "version": "4.2.1",
4
4
  "description": "UI Component for Ro-ut App",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/types/components/index.d.ts",
@@ -113,7 +113,8 @@
113
113
  },
114
114
  "peerDependencies": {
115
115
  "react": "^19.1.0",
116
- "react-dom": "^19.1.0"
116
+ "react-dom": "^19.1.0",
117
+ "react-router-dom": "^7.0.0"
117
118
  },
118
119
  "overrides": {
119
120
  "node-gyp": "^12.4.0",