@aleleba/ro-ut-ui 4.2.1 → 4.3.0
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.css +12 -4
- package/dist/index.js +1 -1
- package/dist/types/components/Checkboxes/Checkbox/index.d.ts +49 -0
- package/dist/types/components/Checkboxes/CheckboxGroup/index.d.ts +63 -0
- package/dist/types/components/Checkboxes/index.d.ts +8 -0
- package/dist/types/components/DatePickers/DatePicker/index.d.ts +54 -0
- package/dist/types/components/DatePickers/index.d.ts +7 -0
- package/dist/types/components/Icons/index.d.ts +3 -1
- package/dist/types/components/Radios/Radio/index.d.ts +45 -0
- package/dist/types/components/Radios/RadioGroup/index.d.ts +63 -0
- package/dist/types/components/Radios/index.d.ts +8 -0
- package/dist/types/components/Selects/Select/index.d.ts +84 -0
- package/dist/types/components/Selects/index.d.ts +8 -0
- package/dist/types/components/Textareas/Textarea/index.d.ts +49 -0
- package/dist/types/components/Textareas/index.d.ts +9 -0
- package/dist/types/components/Toggles/Toggle/index.d.ts +41 -0
- package/dist/types/components/Toggles/index.d.ts +7 -0
- package/dist/types/components/index.d.ts +6 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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})());
|
|
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:()=>Ve,Button:()=>Pe,ButtonThemes:()=>Se,ButtonTypes:()=>Ee,Card:()=>Ie,CardThemes:()=>Me,Checkbox:()=>Ya,CheckboxGroup:()=>nn,CheckboxGroupDirections:()=>$a,CheckboxThemes:()=>an,DatePicker:()=>Wn,DatePickerThemes:()=>Xn,Icon:()=>G,IconNames:()=>B,Input:()=>Je,InputThemes:()=>Ze,LeftNavbar:()=>ka,LeftNavbarThemes:()=>La,NavItem:()=>Da,NavList:()=>Oa,NavMenuContext:()=>la,Navbar:()=>ma,NavbarContext:()=>ua,NavbarThemes:()=>Pa,Radio:()=>Ma,RadioGroup:()=>Ua,RadioGroupDirections:()=>Fa,RadioThemes:()=>Ka,Select:()=>_n,SelectThemes:()=>Qn,Textarea:()=>bn,TextareaThemes:()=>yn,Toggle:()=>dn,ToggleThemes:()=>un,TopNavbar:()=>ha,TopNavbarThemes:()=>qa,getBorderCard:()=>Ke,getButtonThemeClass:()=>qe,getCardThemeClass:()=>Fe,getCheckboxThemeClass:()=>rn,getDatePickerThemeClass:()=>$n,getIconClass:()=>he,getInputThemeClass:()=>Ye,getLeftNavbarThemeClass:()=>Ga,getNavbarThemeClass:()=>Ba,getRadioThemeClass:()=>Za,getSelectThemeClass:()=>An,getTextareaThemeClass:()=>xn,getToggleThemeClass:()=>ln,getTopNavbarThemeClass:()=>Ra,useNavMenu:()=>va,useNavbar:()=>da});const n="namBd2yDO5uRnuiJiF4I",r="IezAhh3IOxZrbRaPnSuX",t="peAKuLVAiIXSFB_8weUX",i="fX0XkPg_VOwlCS_puohG",o="uRh5AMB7fHGMjymlSkIe",c="A61ABO8IXKvkyJ2iRq6l",s="nYNZP8pJf0SUq0ZPndyE",u="OOr9vC74FozQAPLK3TBF",d="jtiHB4J2Gd75DxgbExDU",l="htFKNG_lNNMADoynscvf",v="b41eXc_YG54TSjVcPdr3",m="iDCPPzPmlHXmY6DeRlrz",h="qSKheV1seun_M2zooNYG",p="neFnz7mqfjyob2IpBRAB",f="fMuDGJLmZu10m_5wuQwH",y="W1_8p2A4KoAru1W3fQQt",b="tm0XixvT9lg82S8vBQ7H",x="s4WqNjDDGgeMddVjGC39",g="bedJB1k7F24TZZ14mvGS",N="PgNn5YrHhpkkzKgbQGHw",j="g7BsZUvE5UmvGR7yux1n",k="oCPQLbmQjjlb4QfF6N3z",C="w1jjKytmOVrGE_OOWN24",w="wxOwGgByggkSrx_yH1Mm",T="jyv2Pn76yjv7yHzme6Vi",O="l_u5YpNTZO_QLR2ODTsM",S="D3lpa3rGkDORSZEMO4Pu",E="ptOAordfG6nUqt1RGPGD",P="tcijTEF2DcjdTgUYgwm_",q="Sb74MmtzlQ4r_auGli10",L="iRPlBCtkk8OZ1fVrK6Ac",D=require("react/jsx-runtime");var B,R=function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];return e.filter(function(e){return e}).join(" ")},G=function(e){var a=e.id,n=void 0===a?"":a,r=e.className,t=void 0===r?"":r,i=e.icon,o=R(i?he({icon:i}):"",t);return(0,D.jsx)("span",{id:n,className:o})},H=n,Q=j,z=N,_=m,A=l,M=d,V=i,I=r,F=T,K=c,U=p,Z=v,J=x,Y=b,X=q,W=w,$=g,ee=C,ae=h,ne=S,re=O,te=E,ie=P,oe=o,ce=k,se=y,ue=t,de=L,le=f,ve=u,me=s;!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",e.chevronDown="chevronDown",e.check="check"}(B||(B={}));var he=function(e){switch(e.icon){case"perfil":return"".concat(H," ").concat(Q);case"password":return"".concat(H," ").concat(z);case"google":return"".concat(H," ").concat(_);case"facebook":return"".concat(H," ").concat(A);case"dashboard":return"".concat(H," ").concat(M);case"calendario":return"".concat(H," ").concat(V);case"administracionDeUsuario":return"".concat(H," ").concat(I);case"rutas":return"".concat(H," ").concat(F);case"chat":return"".concat(H," ").concat(K);case"informes":return"".concat(H," ").concat(U);case"flecha":return"".concat(H," ").concat(Z);case"nuevaRuta":return"".concat(H," ").concat(J);case"notificacion":return"".concat(H," ").concat(Y);case"usuarioDentroApp":return"".concat(H," ").concat(X);case"rutaNueva":return"".concat(H," ").concat(W);case"nuevaRuta2":return"".concat(H," ").concat($);case"rutaCompletada":return"".concat(H," ").concat(ee);case"hoy":return"".concat(H," ").concat(ae);case"rutasProgramadas":return"".concat(H," ").concat(ne);case"rutasEliminadas":return"".concat(H," ").concat(re);case"rutasReprogramadas":return"".concat(H," ").concat(te);case"search":return"".concat(H," ").concat(ie);case"camion":return"".concat(H," ").concat(oe);case"pickup":return"".concat(H," ").concat(ce);case"motocicleta":return"".concat(H," ").concat(se);case"barco":return"".concat(H," ").concat(ue);case"varios":return"".concat(H," ").concat(de);case"menu":return"".concat(H," ").concat(le);case"chevronDown":return"".concat(H," ").concat(ve);case"check":return"".concat(H," ").concat(me);default:return""}};const pe="UxC2t97LIIISx7e71_3R",fe="JJF9nOwFrn4f4Agjebcs",ye="cwK5avZb5ShuVPiPWB8Q",be="CFpiqnX4jq_EltxkwEvy",xe="yjB0ArEAyeYU6_u7zKsQ",ge="Djr8Yh2IQcUcgjSZ_WQ5",Ne="uyBaWoSnHEIxM4x7jgQw",je="qWYltwKufw7ZliVlCT9g",ke="oQRCOHaGpuh207HQzerc",Ce="HtF5k4mwsNW1v9YG7qd2",we="Pg7VF5nFKczFtA3r5E88",Te="wXyKJ8kY_42bOcyetwnC",Oe="dLCzLEcc0jSLJgsTyHoM";var Se,Ee,Pe=function(e){var a=e.id,n=void 0===a?"":a,r=e.children,t=void 0===r?"":r,i=e.className,o=void 0===i?"":i,c=e.theme,s=void 0===c?Se.primary:c,u=e.hardBorder,d=void 0===u||u,l=e.type,v=void 0===l?Ee.button:l,m=e.onClick,h=R(pe,qe({theme:s}),d?fe:ye,o);return(0,D.jsx)("button",{id:n,className:h,type:v,onClick:m,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"}(Se||(Se={})),function(e){e.submit="submit",e.reset="reset",e.button="button"}(Ee||(Ee={}));var qe=function(e){switch(e.theme){case Se.primary:return be;case Se.secondary:return xe;case Se.tertiary:return ge;case Se.quaternary:return Ne;case Se.quinary:return je;case Se.primaryOutline:return ke;case Se.secondaryOutline:return Ce;case Se.tertiaryOutline:return we;case Se.quaternaryOutline:return Te;case Se.quinaryOutline:return Oe;default:return""}};const Le="pAD4BifhMTLUZvCJxyOx",De="a2VHzo7AbMVmPMGC3mSx",Be="W0VuH9q0UPwsyVsTQQJe",Re="SIPeMNZqcOWCkESf4cPg",Ge="hPcmh2SHmHeXnUxGP93s",He="DcZJoe6Kl4lnV3k4i7nV",Qe="LH35do5a6HPSjPusBT_z",ze="juXoWoLQrRgOgzapK6H9",_e="tPCdlPqN6fB69GmnQ181",Ae="nsb5sNsicCrkfBe9SIFs";var Me,Ve,Ie=function(e){var a=e.children,n=void 0===a?"":a,r=e.className,t=void 0===r?"":r,i=e.theme,o=void 0===i?Me.primary:i,c=e.border,s=void 0===c?Ve.soft:c,u=e.title,d=R(Le,Fe({theme:o}),Ke({border:s}),t);return(0,D.jsxs)("div",{className:d,children:[u&&(0,D.jsx)("div",{className:De,children:(0,D.jsx)("h5",{className:Re,children:u})}),(0,D.jsx)("div",{className:Be,children:n})]})};!function(e){e.primary="primary",e.secondary="secondary",e.tertiary="tertiary",e.quaternary="quaternary"}(Me||(Me={})),function(e){e.soft="soft",e.hard="hard"}(Ve||(Ve={}));var Fe=function(e){switch(e.theme){case"primary":return Qe;case"secondary":return ze;case"tertiary":return _e;case"quaternary":return Ae;default:return""}},Ke=function(e){switch(e.border){case"soft":return Ge;case"hard":return He;default:return""}};const Ue={"icon-input":"RaCKCo18u9LiXlNtfXSg","input-common":"LCo8ZQNn4x9t1bQv68YX","input-with-icon":"nB_qk0uh4VaPFqAV_rdo","input-secondary":"r2dDDK1b9GSUQ7KkjlAS","input-border-hard":"xghXNj3fj0NG1DBWKj8w","input-tertiary":"eB30gQUCIMLMoZPeOKil"};var Ze,Je=function(e){var a=e.id,n=void 0===a?"":a,r=e.className,t=void 0===r?"":r,i=e.type,o=void 0===i?"text":i,c=e.theme,s=void 0===c?Ze.primary:c,u=e.placeholder,d=void 0===u?"":u,l=e.hardBorder,v=void 0!==l&&l,m=e.icon,h=e.onChange,p=void 0===h?function(){}:h,f=R(Ue["input-common"],Ye({theme:s}),v?Ue["input-border-hard"]:"",t,m?Ue["input-with-icon"]:"");return(0,D.jsxs)("div",{className:Ue.relative,children:[(0,D.jsx)("input",{id:n,className:f,placeholder:d,type:o,onChange:p}),m&&(0,D.jsx)(G,{className:Ue["icon-input"],icon:m})]})};!function(e){e.primary="primary",e.secondary="secondary",e.tertiary="tertiary"}(Ze||(Ze={}));var Ye=function(e){switch(e.theme){case"primary":default:return"";case"secondary":return Ue["input-secondary"];case"tertiary":return Ue["input-tertiary"]}};const Xe="FnQHiSW9NTFa3WlXGoCc",We="NatMJzDzTApsQaVDAagx",$e="qY4Y2bWaIDQFsSw6KaT5",ea="zguwwN6hze6uapnqp5Ni",aa="ko1cAltyF24Od59He2SS",na="kpCx3tGL8Ty2NT_5o1mJ",ra="F6hI7ZfLokc9h5jkh6IL",ta="qlSGENr4s2AUMMLzL8AR",ia="RY7dvVQ6fbBnjtgy0igh",oa="OpF1ocsD_5dn_993DhqT",ca="FSuEOctgnc2BHuB5nXoQ",sa=require("react");var ua=(0,sa.createContext)(void 0),da=function(){var e;return null!==(e=(0,sa.useContext)(ua))&&void 0!==e?e:{isOpen:!1,toggle:function(){},setOpen:function(){},isExpanded:!1,toggleExpanded:function(){},isMobile:!1}},la=(0,sa.createContext)("accordion"),va=function(){return(0,sa.useContext)(la)},ma=function(e){var a=e.id,n=void 0===a?"":a,r=e.children,t=void 0===r?"":r,i=e.className,o=void 0===i?"":i,c=e.theme,s=void 0===c?Pa.primary:c,u=e.defaultOpen,d=void 0!==u&&u,l=e.defaultExpanded,v=void 0!==l&&l,m=(0,sa.useState)(d),h=m[0],p=m[1],f=(0,sa.useState)(v),y=f[0],b=f[1],x=(0,sa.useState)(!1),g=x[0],N=x[1];(0,sa.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,sa.useEffect)(function(){if("undefined"!=typeof document){var e=document.documentElement;return e.style.setProperty("--ro-ut-sidebar-width",g?"0px":y?"24rem":"6rem"),e.style.setProperty("--ro-ut-topbar-height",g?"0px":"101px"),function(){e.style.removeProperty("--ro-ut-sidebar-width"),e.style.removeProperty("--ro-ut-topbar-height")}}},[g,y]);var j=(0,sa.useCallback)(function(){return p(function(e){return!e})},[]),k=(0,sa.useCallback)(function(e){return p(e)},[]),C=(0,sa.useCallback)(function(){return b(function(e){return!e})},[]),w={isOpen:h,toggle:j,setOpen:k,isExpanded:y,toggleExpanded:C,isMobile:g},T=R(Xe,Ba({theme:s}),o);return(0,D.jsx)(ua.Provider,{value:w,children:(0,D.jsx)("nav",{id:n,className:T,children:t})})},ha=function(e){var a=e.id,n=void 0===a?"":a,r=e.children,t=void 0===r?"":r,i=e.className,o=void 0===i?"":i,c=e.theme,s=void 0===c?qa.primary:c,u=e.brand,d=e.actions,l=e.menuIcon,v=void 0===l?B.menu:l,m=e.hideMenuToggle,h=void 0!==m&&m,p=da(),f=p.isOpen,y=p.toggle,b=p.isMobile?"accordion":"dropdown",x=R($e,Ra({theme:s}),o),g=R(ra,f?ta:ia);return(0,D.jsxs)("header",{id:n,className:x,children:[(0,D.jsxs)("div",{className:ea,children:[u&&(0,D.jsx)("div",{className:na,children:u}),!h&&(0,D.jsx)("button",{type:"button","aria-label":"Toggle menu",className:aa,onClick:y,children:(0,D.jsx)(G,{icon:v})})]}),(0,D.jsx)(la.Provider,{value:b,children:(0,D.jsx)("div",{className:g,children:t})}),d&&(0,D.jsx)("div",{className:oa,children:d})]})};const pa="lB8REa7QbS00_HY39qlv",fa="sSfHpXGaWQJlKsMHHaNz",ya="KUAQgA5jKT0cpt4YT9My",ba="VHv_24fnWV6U7utpmyOv",xa="xz7mio21qHuZpdmkS_Ql",ga="mecTZPfsBQEB8_dRnBQz",Na="B9dyOyj_V1ejlMhgfn9g",ja="ZddvyvLdn43wm9cl0jwZ";var ka=function(e){var a=e.id,n=void 0===a?"":a,r=e.children,t=void 0===r?"":r,i=e.className,o=void 0===i?"":i,c=e.theme,s=void 0===c?La.primary:c,u=e.pinToggleIcon,d=void 0===u?B.flecha:u,l=e.hidePinToggle,v=void 0!==l&&l,m=da(),h=m.isOpen,p=m.isExpanded,f=m.toggleExpanded,y=R(pa,h?fa:ya,p?xa:ba,Ga({theme:s}),o);return(0,D.jsxs)("aside",{id:n,className:y,children:[(0,D.jsx)(la.Provider,{value:"accordion",children:t}),!v&&(0,D.jsx)("button",{type:"button","aria-label":"Toggle sidebar",className:ga,onClick:f,children:(0,D.jsx)(G,{icon:d,className:R(Na,p?ja:"")})})]})};const Ca="huVncZ_cd_BiHgGKvG2R",wa="OhBh129QqaKYIl1RoRRQ",Ta="mpssuMH2mFjNpZnuMaOp";var Oa=function(e){var a=e.id,n=void 0===a?"":a,r=e.children,t=e.className,i=void 0===t?"":t,o=e.level,c=void 0===o?1:o,s=va(),u=R(Ca,"dropdown"===s&&1===c?Ta:wa,i);return(0,D.jsx)("ul",{id:n,className:u,children:sa.Children.map(r,function(e){return(0,sa.isValidElement)(e)?(0,sa.cloneElement)(e,{level:c}):e})})};const Sa=require("react-router-dom"),Ea={"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 Pa,qa,La,Da=function(e){var a=e.id,n=void 0===a?"":a,r=e.label,t=void 0===r?"":r,i=e.icon,o=e.children,c=e.className,s=void 0===c?"":c,u=e.active,d=void 0!==u&&u,l=e.to,v=e.href,m=e.onClick,h=e.defaultExpanded,p=void 0!==h&&h,f=e.level,y=void 0===f?1:f,b=va(),x=da().isExpanded,g=(0,sa.useState)(p),N=g[0],j=g[1],k=!!o&&y<3,C=y+1,w="accordion"===b&&!x,T=d&&y>1,O=d&&1===y,S=R(Ea["nav-item-label"],w?Ea["nav-item-label-collapsed"]:""),E=R(Ea["nav-item"],"accordion"===b?Ea["nav-item-l".concat(y)]:Ea["nav-item-inline"],w?Ea["nav-item-collapsed"]:"",T?Ea["nav-item-active"]:"",s),P=function(e){k&&j(function(e){return!e}),m&&m(e)},q=(0,D.jsxs)(D.Fragment,{children:[i&&(0,D.jsx)(G,{icon:i,className:R(Ea["nav-item-icon"],O?Ea["nav-item-icon-active"]:"")}),t&&(0,D.jsx)("span",{className:S,children:t}),k&&(0,D.jsx)(G,{icon:B.flecha,className:R(Ea["nav-item-chevron"],w?Ea["nav-item-chevron-collapsed"]:"",N?Ea["is-open"]:"")})]}),L=l?(0,D.jsx)(Sa.Link,{to:l,id:n,className:E,onClick:P,children:q}):v?(0,D.jsx)("a",{id:n,href:v,className:E,onClick:P,children:q}):(0,D.jsx)("button",{id:n,type:"button",className:E,onClick:P,children:q}),H=(0,sa.isValidElement)(o)?(0,sa.cloneElement)(o,{level:C}):o;return(0,D.jsxs)("li",{className:Ea["nav-item-wrapper"],onMouseEnter:"dropdown"===b&&k?function(){return j(!0)}:void 0,onMouseLeave:"dropdown"===b&&k?function(){return j(!1)}:void 0,children:[L,k&&N&&("accordion"===b?H:(0,D.jsx)("div",{className:R(Ea["nav-dropdown-panel"],1===y?Ea["nav-dropdown-below"]:Ea["nav-dropdown-side"]),children:H}))]})};!function(e){e.primary="primary"}(Pa||(Pa={})),function(e){e.primary="primary",e.dark="dark"}(qa||(qa={})),function(e){e.primary="primary"}(La||(La={}));var Ba=function(e){return e.theme===Pa.primary?We:""},Ra=function(e){switch(e.theme){case qa.primary:return"";case qa.dark:return ca;default:return""}},Ga=function(e){e.theme;return La.primary,""};const Ha="GXbNNfaRE3TyRdoGrwb7",Qa="JJlpwqbl4lBtQC3RnNnw",za="YHIztbHCIlsXLL9Yn8ww",_a="KDNJqjBclhbRaDk4mBr6",Aa="EhYmjqYe_GtBncOd1xD9";var Ma=function(e){var a=e.id,n=e.className,r=void 0===n?"":n,t=e.theme,i=void 0===t?Ka.primary:t,o=e.name,c=e.value,s=e.label,u=e.checked,d=e.defaultChecked,l=e.disabled,v=void 0!==l&&l,m=e.onChange,h=void 0===m?function(){}:m,p=R(Ha,Za({theme:i}),v?Aa:"",r);return(0,D.jsxs)("label",{className:p,children:[(0,D.jsx)("input",{id:a,className:Qa,type:"radio",name:o,value:c,checked:u,defaultChecked:d,disabled:v,onChange:h}),(0,D.jsx)("span",{className:za,"aria-hidden":"true"}),s&&(0,D.jsx)("span",{className:_a,children:s})]})};const Va="QBLrCrEV0gM6Kw5pF1St",Ia="RU1XYIJgTOpk_L6PLAhf";var Fa;!function(e){e.vertical="vertical",e.horizontal="horizontal"}(Fa||(Fa={}));var Ka,Ua=function(e){var a=e.id,n=e.className,r=void 0===n?"":n,t=e.theme,i=void 0===t?Ka.primary:t,o=e.name,c=e.options,s=void 0===c?[]:c,u=e.value,d=e.defaultValue,l=void 0===d?"":d,v=e.direction,m=void 0===v?Fa.vertical:v,h=e.disabled,p=void 0!==h&&h,f=e.onChange,y=void 0===f?function(){}:f,b=(0,sa.useState)(l),x=b[0],g=b[1],N=void 0!==u?u:x,j=function(e){void 0===u&&g(e.target.value),y(e)},k=R(Va,m===Fa.horizontal?Ia:"",r);return(0,D.jsx)("div",{id:a,role:"radiogroup",className:k,children:s.map(function(e){return(0,D.jsx)(Ma,{theme:i,name:o,value:e.value,label:e.label,checked:N===e.value,disabled:p||e.disabled,onChange:j},e.value)})})};!function(e){e.primary="primary"}(Ka||(Ka={}));var Za=function(e){e.theme;return""};const Ja={"checkbox-label":"zjjHhR8Wrs1uEuvkvAET","checkbox-input":"jgDLO2lj8lIL4n2aUvd4","checkbox-box":"tBBM2Tox6G2Lc1HgNzpm","checkbox-check":"pwzoSwjqGtatjDWB8YwK","checkbox-dash":"tV_vzpZfKvHlPlIiWYQj","checkbox-disabled":"ntiFyXsULeH5Q21zjZaP"};var Ya=function(e){var a=e.id,n=e.className,r=void 0===n?"":n,t=e.theme,i=void 0===t?an.primary:t,o=e.name,c=e.value,s=e.label,u=e.checked,d=e.defaultChecked,l=e.indeterminate,v=void 0!==l&&l,m=e.disabled,h=void 0!==m&&m,p=e.onChange,f=void 0===p?function(){}:p,y=(0,sa.useRef)(null);(0,sa.useEffect)(function(){y.current&&(y.current.indeterminate=v)},[v]);var b=R(Ja["checkbox-label"],rn({theme:i}),h?Ja["checkbox-disabled"]:"",r);return(0,D.jsxs)("label",{className:b,children:[(0,D.jsx)("input",{ref:y,id:a,className:Ja["checkbox-input"],type:"checkbox",name:o,value:c,checked:u,defaultChecked:d,disabled:h,onChange:f}),(0,D.jsxs)("span",{className:Ja["checkbox-box"],"aria-hidden":"true",children:[(0,D.jsx)(G,{className:Ja["checkbox-check"],icon:B.check}),(0,D.jsx)("span",{className:Ja["checkbox-dash"]})]}),s&&(0,D.jsx)("span",{className:Ja["checkbox-text"],children:s})]})};const Xa="moROzwaINmGAqyCdeqUb",Wa="uGMTsBF__2RgYnA6S_ae";var $a,en=function(e,a,n){if(n||2===arguments.length)for(var r,t=0,i=a.length;t<i;t++)!r&&t in a||(r||(r=Array.prototype.slice.call(a,0,t)),r[t]=a[t]);return e.concat(r||Array.prototype.slice.call(a))};!function(e){e.vertical="vertical",e.horizontal="horizontal"}($a||($a={}));var an,nn=function(e){var a=e.id,n=e.className,r=void 0===n?"":n,t=e.theme,i=void 0===t?an.primary:t,o=e.name,c=e.options,s=void 0===c?[]:c,u=e.values,d=e.defaultValues,l=void 0===d?[]:d,v=e.direction,m=void 0===v?$a.vertical:v,h=e.disabled,p=void 0!==h&&h,f=e.onChange,y=void 0===f?function(){}:f,b=(0,sa.useState)(l),x=b[0],g=b[1],N=void 0!==u?u:x,j=R(Xa,m===$a.horizontal?Wa:"",r);return(0,D.jsx)("div",{id:a,role:"group",className:j,children:s.map(function(e){return(0,D.jsx)(Ya,{theme:i,name:o,value:e.value,label:e.label,checked:N.includes(e.value),disabled:p||e.disabled,onChange:function(){return a=e.value,n=N.includes(a)?N.filter(function(e){return e!==a}):en(en([],N,!0),[a],!1),void 0===u&&g(n),void y(n);var a,n}},e.value)})})};!function(e){e.primary="primary"}(an||(an={}));var rn=function(e){e.theme;return""};const tn="zegNFU1IXq2D0NAslGyj",on="rGbn8Dr7CvRzb5aBaIm6",cn="oHn7xu1kuT37RPqDSpc0",sn="VofOiaYafh2S6lqJD62h";var un,dn=function(e){var a=e.id,n=e.className,r=void 0===n?"":n,t=e.theme,i=void 0===t?un.primary:t,o=e.checked,c=e.defaultChecked,s=void 0!==c&&c,u=e.label,d=e.children,l=void 0===d?"Activar":d,v=e.disabled,m=void 0!==v&&v,h=e.onChange,p=void 0===h?function(){}:h,f=(0,sa.useState)(s),y=f[0],b=f[1],x=void 0!==o?o:y,g=R(cn,ln({theme:i}),x?sn:"",r);return(0,D.jsxs)("span",{className:tn,children:[u&&(0,D.jsx)("span",{className:on,children:u}),(0,D.jsx)("button",{id:a,type:"button",role:"switch","aria-checked":x,disabled:m,className:g,onClick:function(){void 0===o&&b(!x),p(!x)},children:l})]})};!function(e){e.primary="primary"}(un||(un={}));var ln=function(e){e.theme;return""};const vn="kkj7ttLeFO1S4d8mM_Pn",mn="a_HuZeJ_oVLoqS7eukOK",hn="OluyRygiDnbSKaGwqvJW",pn="h4zm0kOhR9ZxkSdTB7GN",fn="pfLJgfyLJlYmzTol8bA5";var yn,bn=function(e){var a=e.id,n=e.className,r=void 0===n?"":n,t=e.theme,i=void 0===t?yn.primary:t,o=e.value,c=e.defaultValue,s=e.placeholder,u=void 0===s?"":s,d=e.rows,l=void 0===d?4:d,v=e.autoResize,m=void 0!==v&&v,h=e.hardBorder,p=void 0!==h&&h,f=e.disabled,y=void 0!==f&&f,b=e.onChange,x=void 0===b?function(){}:b,g=R(vn,xn({theme:i}),p?pn:"",m?fn:"",r);return(0,D.jsx)("textarea",{id:a,className:g,value:o,defaultValue:c,placeholder:u,rows:l,disabled:y,onChange:function(e){m&&(e.currentTarget.style.height="auto",e.currentTarget.style.height="".concat(e.currentTarget.scrollHeight,"px")),x(e)}})};!function(e){e.primary="primary",e.secondary="secondary",e.tertiary="tertiary"}(yn||(yn={}));var xn=function(e){switch(e.theme){case"primary":default:return"";case"secondary":return mn;case"tertiary":return hn}};const gn="WihApGsGcC1E22NRG0P5",Nn="fUrHs64HZzxc8wuJx0Sb",jn="LXJF8zINUAOvCEJtkK8Q",kn="Wb8G9wRU_hGXsgxvtTI1",Cn="EkMWU0uN6UWfqy9bLsBt",wn="jFyLmbuHrBcChK1PCUAW",Tn="toX_UmDpZNE2kruEXl8S",On="H1zoebUk7LJVtn0H0Zu_",Sn="i_2UnWCN655j4bednibQ",En="SITJboRY_HWw8TaUHpkS",Pn="c4nJQCuqPERLXusqZmTf",qn="rVjFTHZ3d6gzTyGq1wOq",Ln="rLYHgyXqKJfVOrHCTUHr",Dn="_aOV8eUPNj11n_VY0NAB",Bn="gFuL19WEJXow8Pop913u",Rn="gdPP8CuH6BxL79m2ly8i",Gn="tm2CatA44Mbqd0CMaXp7",Hn="HfTjK7bgJmXNcDqfhL0J";var Qn,zn=function(e,a,n){if(n||2===arguments.length)for(var r,t=0,i=a.length;t<i;t++)!r&&t in a||(r||(r=Array.prototype.slice.call(a,0,t)),r[t]=a[t]);return e.concat(r||Array.prototype.slice.call(a))},_n=function(e){var a=e.id,n=e.className,r=void 0===n?"":n,t=e.theme,i=void 0===t?Qn.primary:t,o=e.options,c=void 0===o?[]:o,s=e.multiple,u=void 0!==s&&s,d=e.value,l=e.defaultValue,v=void 0===l?"":l,m=e.values,h=e.defaultValues,p=void 0===h?[]:h,f=e.placeholder,y=void 0===f?"":f,b=e.searchable,x=void 0!==b&&b,g=e.icon,N=e.emptyMessage,j=void 0===N?"Sin resultados":N,k=e.hardBorder,C=void 0!==k&&k,w=e.disabled,T=void 0!==w&&w,O=e.onChange,S=void 0===O?function(){}:O,E=(0,sa.useState)(!1),P=E[0],q=E[1],L=(0,sa.useState)(""),H=L[0],Q=L[1],z=(0,sa.useState)(0),_=z[0],A=z[1],M=(0,sa.useState)(v),V=M[0],I=M[1],F=(0,sa.useState)(p),K=F[0],U=F[1],Z=(0,sa.useRef)(null),J=(0,sa.useRef)(null),Y=(0,sa.useId)(),X=void 0!==d?d:V,W=void 0!==m?m:K,$=(u?c.filter(function(e){return W.includes(e.value)}):c.filter(function(e){return e.value===X})).map(function(e){return e.label}).join(", "),ee=x&&H?c.filter(function(e){return e.label.toLowerCase().includes(H.toLowerCase())}):c,ae=function(e){return u?W.includes(e.value):e.value===X};(0,sa.useEffect)(function(){if(P){var e=function(e){Z.current&&!Z.current.contains(e.target)&&(q(!1),Q(""))};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}}},[P]),(0,sa.useEffect)(function(){var e;P&&x&&(null===(e=J.current)||void 0===e||e.focus())},[P,x]);var ne=function(){T||(q(!0),A(0))},re=function(){q(!1),Q("")},te=function(e){if(!e.disabled)if(u){var a=W.includes(e.value)?W.filter(function(a){return a!==e.value}):zn(zn([],W,!0),[e.value],!1);void 0===m&&U(a),S(a)}else void 0===d&&I(e.value),S(e.value),re()},ie=R(Nn,An({theme:i}),C?Rn:"",T?Gn:"");return(0,D.jsxs)("div",{id:a,ref:Z,className:R(gn,r),children:[(0,D.jsxs)("div",{role:"combobox","aria-expanded":P,"aria-haspopup":"listbox","aria-controls":Y,"aria-disabled":T,tabIndex:T?-1:0,className:ie,onClick:function(){return P?re():ne()},onKeyDown:function(e){switch(e.key){case"ArrowDown":e.preventDefault(),P?A(function(e){return Math.min(e+1,ee.length-1)}):ne();break;case"ArrowUp":e.preventDefault(),A(function(e){return Math.max(e-1,0)});break;case"Enter":e.preventDefault(),P?ee[_]&&te(ee[_]):ne();break;case"Escape":re();break;case" ":P||x||(e.preventDefault(),ne())}},children:[g&&(0,D.jsx)(G,{className:wn,icon:g}),x&&P?(0,D.jsx)("input",{ref:J,className:Cn,value:H,placeholder:$||y,onChange:function(e){Q(e.target.value),A(0)},onClick:function(e){return e.stopPropagation()}}):(0,D.jsx)("span",{className:R(jn,$?"":kn),children:$||y}),(0,D.jsx)(G,{className:Tn,icon:B.chevronDown})]}),P&&(0,D.jsxs)("ul",{id:Y,role:"listbox","aria-multiselectable":u,className:On,children:[0===ee.length&&(0,D.jsx)("li",{className:Bn,children:j}),ee.map(function(e,a){return(0,D.jsxs)("li",{role:"option","aria-selected":ae(e),className:R(Sn,a===_?Pn:"",ae(e)?qn:"",e.disabled?Dn:""),onMouseEnter:function(){return A(a)},onClick:function(a){a.stopPropagation(),te(e)},children:[(0,D.jsx)("span",{className:En,children:e.label}),ae(e)&&(0,D.jsx)(G,{className:Ln,icon:B.check})]},e.value)})]})]})};!function(e){e.primary="primary",e.dark="dark"}(Qn||(Qn={}));var An=function(e){switch(e.theme){case"primary":default:return"";case"dark":return Hn}};const Mn="HVj3aNmDW6tJTr0uageu",Vn="hW1Ev2Vff5FMrAuQdu5Q",In="ZI5_XWdK17MXXnYMh5O_",Fn="PhpcwVhP56ggFwiGvuAl",Kn="ndBtMO52dtAMHPla372a",Un="YxneKx82bAQhUpOy8Adj",Zn="rEwN2ippBOfwtYrsL8xL",Jn="QGvk3ZseIqrsJEo4c5E8",Yn="cS9mLM8C2odtqKRL50qU";var Xn,Wn=function(e){var a=e.id,n=e.className,r=void 0===n?"":n,t=e.theme,i=void 0===t?Xn.primary:t,o=e.value,c=e.defaultValue,s=void 0===c?"":c,u=e.min,d=e.max,l=e.placeholder,v=void 0===l?"":l,m=e.icon,h=void 0===m?B.calendario:m,p=e.hardBorder,f=void 0!==p&&p,y=e.disabled,b=void 0!==y&&y,x=e.onChange,g=void 0===x?function(){}:x,N=(0,sa.useRef)(null),j=(0,sa.useState)(s),k=j[0],C=j[1],w=void 0!==o?o:k,T=R(Mn,$n({theme:i}),f?Jn:"",b?Yn:"",r);return(0,D.jsxs)("div",{className:T,onClick:function(){var e,a,n;if(!b){null===(e=N.current)||void 0===e||e.focus();try{null===(n=null===(a=N.current)||void 0===a?void 0:a.showPicker)||void 0===n||n.call(a)}catch(e){}}},children:[(0,D.jsx)(G,{className:Vn,icon:h}),(0,D.jsxs)("span",{className:In,children:[(0,D.jsx)("input",{ref:N,id:a,className:R(Fn,!w&&v?Kn:""),type:"date",value:w,min:u,max:d,disabled:b,onChange:function(e){void 0===o&&C(e.target.value),g(e)}}),!w&&v&&(0,D.jsx)("span",{className:Un,children:v})]}),(0,D.jsx)(G,{className:Zn,icon:B.chevronDown})]})};!function(e){e.primary="primary"}(Xn||(Xn={}));var $n=function(e){e.theme;return""};return a})());
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { FC, ChangeEventHandler } from 'react';
|
|
2
|
+
import { CheckboxThemes } from '..';
|
|
3
|
+
export type TCheckboxProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Is this the id of the checkbox input.
|
|
6
|
+
*/
|
|
7
|
+
id?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Is this the classes that you want to add
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Is this the theme you want to add to the checkbox
|
|
14
|
+
*/
|
|
15
|
+
theme?: CheckboxThemes;
|
|
16
|
+
/**
|
|
17
|
+
* Is this the name of the checkbox group the checkbox belongs to
|
|
18
|
+
*/
|
|
19
|
+
name?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Is this the value of the checkbox
|
|
22
|
+
*/
|
|
23
|
+
value?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Is this the visible label of the checkbox
|
|
26
|
+
*/
|
|
27
|
+
label?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Is this the checked state of the checkbox (controlled)
|
|
30
|
+
*/
|
|
31
|
+
checked?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Is this the initial checked state of the checkbox (uncontrolled)
|
|
34
|
+
*/
|
|
35
|
+
defaultChecked?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Is this the indeterminate state of the checkbox
|
|
38
|
+
*/
|
|
39
|
+
indeterminate?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Is this the disabled state of the checkbox
|
|
42
|
+
*/
|
|
43
|
+
disabled?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Is this the onChange event of the checkbox
|
|
46
|
+
*/
|
|
47
|
+
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
48
|
+
};
|
|
49
|
+
export declare const Checkbox: FC<TCheckboxProps>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { CheckboxThemes } from '..';
|
|
3
|
+
export declare enum CheckboxGroupDirections {
|
|
4
|
+
vertical = "vertical",
|
|
5
|
+
horizontal = "horizontal"
|
|
6
|
+
}
|
|
7
|
+
export type TCheckboxOption = {
|
|
8
|
+
/**
|
|
9
|
+
* Is this the visible label of the option
|
|
10
|
+
*/
|
|
11
|
+
label: string;
|
|
12
|
+
/**
|
|
13
|
+
* Is this the value of the option
|
|
14
|
+
*/
|
|
15
|
+
value: string;
|
|
16
|
+
/**
|
|
17
|
+
* Is this the disabled state of the option
|
|
18
|
+
*/
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
};
|
|
21
|
+
export type TCheckboxGroupProps = {
|
|
22
|
+
/**
|
|
23
|
+
* Is this the id of the checkbox group.
|
|
24
|
+
*/
|
|
25
|
+
id?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Is this the classes that you want to add
|
|
28
|
+
*/
|
|
29
|
+
className?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Is this the theme you want to add to the checkboxes
|
|
32
|
+
*/
|
|
33
|
+
theme?: CheckboxThemes;
|
|
34
|
+
/**
|
|
35
|
+
* Is this the shared name of the checkboxes of the group
|
|
36
|
+
*/
|
|
37
|
+
name?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Is this the list of options of the group
|
|
40
|
+
*/
|
|
41
|
+
options?: TCheckboxOption[];
|
|
42
|
+
/**
|
|
43
|
+
* Is this the list of checked values of the group (controlled)
|
|
44
|
+
*/
|
|
45
|
+
values?: string[];
|
|
46
|
+
/**
|
|
47
|
+
* Is this the initial list of checked values of the group (uncontrolled)
|
|
48
|
+
*/
|
|
49
|
+
defaultValues?: string[];
|
|
50
|
+
/**
|
|
51
|
+
* Is this the layout direction of the group
|
|
52
|
+
*/
|
|
53
|
+
direction?: CheckboxGroupDirections;
|
|
54
|
+
/**
|
|
55
|
+
* Is this the disabled state of the whole group
|
|
56
|
+
*/
|
|
57
|
+
disabled?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Is this the onChange event of the group, called with the next list of checked values
|
|
60
|
+
*/
|
|
61
|
+
onChange?: (values: string[]) => void;
|
|
62
|
+
};
|
|
63
|
+
export declare const CheckboxGroup: FC<TCheckboxGroupProps>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { FC, ChangeEventHandler } from 'react';
|
|
2
|
+
import { IconNames } from '@components';
|
|
3
|
+
import { DatePickerThemes } from '..';
|
|
4
|
+
export type TDatePickerProps = {
|
|
5
|
+
/**
|
|
6
|
+
* Is this the id of the date input.
|
|
7
|
+
*/
|
|
8
|
+
id?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Is this the classes that you want to add
|
|
11
|
+
*/
|
|
12
|
+
className?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Is this the theme you want to add to the date picker
|
|
15
|
+
*/
|
|
16
|
+
theme?: DatePickerThemes;
|
|
17
|
+
/**
|
|
18
|
+
* Is this the value of the date input (controlled, format YYYY-MM-DD)
|
|
19
|
+
*/
|
|
20
|
+
value?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Is this the initial value of the date input (uncontrolled, format YYYY-MM-DD)
|
|
23
|
+
*/
|
|
24
|
+
defaultValue?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Is this the minimum selectable date (format YYYY-MM-DD)
|
|
27
|
+
*/
|
|
28
|
+
min?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Is this the maximum selectable date (format YYYY-MM-DD)
|
|
31
|
+
*/
|
|
32
|
+
max?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Is this the text shown when there is no selected date
|
|
35
|
+
*/
|
|
36
|
+
placeholder?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Is this the icon shown at the left of the date picker
|
|
39
|
+
*/
|
|
40
|
+
icon?: IconNames;
|
|
41
|
+
/**
|
|
42
|
+
* Is this the value if the date picker have hard border
|
|
43
|
+
*/
|
|
44
|
+
hardBorder?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Is this the disabled state of the date picker
|
|
47
|
+
*/
|
|
48
|
+
disabled?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Is this the onChange event of the date input
|
|
51
|
+
*/
|
|
52
|
+
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
53
|
+
};
|
|
54
|
+
export declare const DatePicker: FC<TDatePickerProps>;
|
|
@@ -26,7 +26,9 @@ export declare enum IconNames {
|
|
|
26
26
|
motocicleta = "motocicleta",
|
|
27
27
|
barco = "barco",
|
|
28
28
|
varios = "varios",
|
|
29
|
-
menu = "menu"
|
|
29
|
+
menu = "menu",
|
|
30
|
+
chevronDown = "chevronDown",
|
|
31
|
+
check = "check"
|
|
30
32
|
}
|
|
31
33
|
export declare const getIconClass: ({ icon }: {
|
|
32
34
|
icon: IconNames;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { FC, ChangeEventHandler } from 'react';
|
|
2
|
+
import { RadioThemes } from '..';
|
|
3
|
+
export type TRadioProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Is this the id of the radio input.
|
|
6
|
+
*/
|
|
7
|
+
id?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Is this the classes that you want to add
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Is this the theme you want to add to the radio
|
|
14
|
+
*/
|
|
15
|
+
theme?: RadioThemes;
|
|
16
|
+
/**
|
|
17
|
+
* Is this the name of the radio group the radio belongs to
|
|
18
|
+
*/
|
|
19
|
+
name?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Is this the value of the radio
|
|
22
|
+
*/
|
|
23
|
+
value?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Is this the visible label of the radio
|
|
26
|
+
*/
|
|
27
|
+
label?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Is this the checked state of the radio (controlled)
|
|
30
|
+
*/
|
|
31
|
+
checked?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Is this the initial checked state of the radio (uncontrolled)
|
|
34
|
+
*/
|
|
35
|
+
defaultChecked?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Is this the disabled state of the radio
|
|
38
|
+
*/
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Is this the onChange event of the radio
|
|
42
|
+
*/
|
|
43
|
+
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
44
|
+
};
|
|
45
|
+
export declare const Radio: FC<TRadioProps>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { FC, ChangeEventHandler } from 'react';
|
|
2
|
+
import { RadioThemes } from '..';
|
|
3
|
+
export declare enum RadioGroupDirections {
|
|
4
|
+
vertical = "vertical",
|
|
5
|
+
horizontal = "horizontal"
|
|
6
|
+
}
|
|
7
|
+
export type TRadioOption = {
|
|
8
|
+
/**
|
|
9
|
+
* Is this the visible label of the option
|
|
10
|
+
*/
|
|
11
|
+
label: string;
|
|
12
|
+
/**
|
|
13
|
+
* Is this the value of the option
|
|
14
|
+
*/
|
|
15
|
+
value: string;
|
|
16
|
+
/**
|
|
17
|
+
* Is this the disabled state of the option
|
|
18
|
+
*/
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
};
|
|
21
|
+
export type TRadioGroupProps = {
|
|
22
|
+
/**
|
|
23
|
+
* Is this the id of the radio group.
|
|
24
|
+
*/
|
|
25
|
+
id?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Is this the classes that you want to add
|
|
28
|
+
*/
|
|
29
|
+
className?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Is this the theme you want to add to the radios
|
|
32
|
+
*/
|
|
33
|
+
theme?: RadioThemes;
|
|
34
|
+
/**
|
|
35
|
+
* Is this the shared name of the radios of the group
|
|
36
|
+
*/
|
|
37
|
+
name?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Is this the list of options of the group
|
|
40
|
+
*/
|
|
41
|
+
options?: TRadioOption[];
|
|
42
|
+
/**
|
|
43
|
+
* Is this the selected value of the group (controlled)
|
|
44
|
+
*/
|
|
45
|
+
value?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Is this the initial selected value of the group (uncontrolled)
|
|
48
|
+
*/
|
|
49
|
+
defaultValue?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Is this the layout direction of the group
|
|
52
|
+
*/
|
|
53
|
+
direction?: RadioGroupDirections;
|
|
54
|
+
/**
|
|
55
|
+
* Is this the disabled state of the whole group
|
|
56
|
+
*/
|
|
57
|
+
disabled?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Is this the onChange event of the radios of the group
|
|
60
|
+
*/
|
|
61
|
+
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
62
|
+
};
|
|
63
|
+
export declare const RadioGroup: FC<TRadioGroupProps>;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { IconNames } from '@components';
|
|
3
|
+
import { SelectThemes } from '..';
|
|
4
|
+
export type TSelectOption = {
|
|
5
|
+
/**
|
|
6
|
+
* Is this the visible label of the option
|
|
7
|
+
*/
|
|
8
|
+
label: string;
|
|
9
|
+
/**
|
|
10
|
+
* Is this the value of the option
|
|
11
|
+
*/
|
|
12
|
+
value: string;
|
|
13
|
+
/**
|
|
14
|
+
* Is this the disabled state of the option
|
|
15
|
+
*/
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export type TSelectProps = {
|
|
19
|
+
/**
|
|
20
|
+
* Is this the id of the select.
|
|
21
|
+
*/
|
|
22
|
+
id?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Is this the classes that you want to add
|
|
25
|
+
*/
|
|
26
|
+
className?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Is this the theme you want to add to the select
|
|
29
|
+
*/
|
|
30
|
+
theme?: SelectThemes;
|
|
31
|
+
/**
|
|
32
|
+
* Is this the list of options of the select
|
|
33
|
+
*/
|
|
34
|
+
options?: TSelectOption[];
|
|
35
|
+
/**
|
|
36
|
+
* Is this the value if the select allows checking several options at once
|
|
37
|
+
*/
|
|
38
|
+
multiple?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Is this the selected value of the select (controlled, single mode)
|
|
41
|
+
*/
|
|
42
|
+
value?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Is this the initial selected value of the select (uncontrolled, single mode)
|
|
45
|
+
*/
|
|
46
|
+
defaultValue?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Is this the list of selected values of the select (controlled, multiple mode)
|
|
49
|
+
*/
|
|
50
|
+
values?: string[];
|
|
51
|
+
/**
|
|
52
|
+
* Is this the initial list of selected values of the select (uncontrolled, multiple mode)
|
|
53
|
+
*/
|
|
54
|
+
defaultValues?: string[];
|
|
55
|
+
/**
|
|
56
|
+
* Is this the text shown when there is no selected value
|
|
57
|
+
*/
|
|
58
|
+
placeholder?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Is this the value if the select allows filtering options by text
|
|
61
|
+
*/
|
|
62
|
+
searchable?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Is this the icon shown at the left of the select
|
|
65
|
+
*/
|
|
66
|
+
icon?: IconNames;
|
|
67
|
+
/**
|
|
68
|
+
* Is this the message shown when no option matches the search
|
|
69
|
+
*/
|
|
70
|
+
emptyMessage?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Is this the value if the select have hard border
|
|
73
|
+
*/
|
|
74
|
+
hardBorder?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Is this the disabled state of the select
|
|
77
|
+
*/
|
|
78
|
+
disabled?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Is this the onChange event of the select, called with the selected value (single mode) or the list of selected values (multiple mode)
|
|
81
|
+
*/
|
|
82
|
+
onChange?: (value: string | string[]) => void;
|
|
83
|
+
};
|
|
84
|
+
export declare const Select: FC<TSelectProps>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { FC, ChangeEventHandler } from 'react';
|
|
2
|
+
import { TextareaThemes } from '..';
|
|
3
|
+
export type TTextareaProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Is this the id of the textarea.
|
|
6
|
+
*/
|
|
7
|
+
id?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Is this the classes that you want to add
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Is this the theme you want to add to the textarea
|
|
14
|
+
*/
|
|
15
|
+
theme?: TextareaThemes;
|
|
16
|
+
/**
|
|
17
|
+
* Is this the value of the textarea (controlled)
|
|
18
|
+
*/
|
|
19
|
+
value?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Is this the initial value of the textarea (uncontrolled)
|
|
22
|
+
*/
|
|
23
|
+
defaultValue?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Is this the text you want to add to the textarea placeholder
|
|
26
|
+
*/
|
|
27
|
+
placeholder?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Is this the number of visible text lines of the textarea
|
|
30
|
+
*/
|
|
31
|
+
rows?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Is this the value if the textarea grows automatically with its content
|
|
34
|
+
*/
|
|
35
|
+
autoResize?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Is this the value if the textarea have hard border
|
|
38
|
+
*/
|
|
39
|
+
hardBorder?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Is this the disabled state of the textarea
|
|
42
|
+
*/
|
|
43
|
+
disabled?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Is this the onChange event of the textarea
|
|
46
|
+
*/
|
|
47
|
+
onChange?: ChangeEventHandler<HTMLTextAreaElement>;
|
|
48
|
+
};
|
|
49
|
+
export declare const Textarea: FC<TTextareaProps>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { ToggleThemes } from '..';
|
|
3
|
+
export type TToggleProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Is this the id of the toggle button.
|
|
6
|
+
*/
|
|
7
|
+
id?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Is this the classes that you want to add
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Is this the theme you want to add to the toggle
|
|
14
|
+
*/
|
|
15
|
+
theme?: ToggleThemes;
|
|
16
|
+
/**
|
|
17
|
+
* Is this the checked state of the toggle (controlled)
|
|
18
|
+
*/
|
|
19
|
+
checked?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Is this the initial checked state of the toggle (uncontrolled)
|
|
22
|
+
*/
|
|
23
|
+
defaultChecked?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Is this the optional label shown at the left of the toggle
|
|
26
|
+
*/
|
|
27
|
+
label?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Is this the text shown inside the toggle pill
|
|
30
|
+
*/
|
|
31
|
+
children?: ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* Is this the disabled state of the toggle
|
|
34
|
+
*/
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Is this the onChange event of the toggle, called with the next checked state
|
|
38
|
+
*/
|
|
39
|
+
onChange?: (checked: boolean) => void;
|
|
40
|
+
};
|
|
41
|
+
export declare const Toggle: FC<TToggleProps>;
|
|
@@ -4,3 +4,9 @@ export * from './Buttons';
|
|
|
4
4
|
export * from './Cards';
|
|
5
5
|
export * from './Inputs';
|
|
6
6
|
export * from './Navbar';
|
|
7
|
+
export * from './Radios';
|
|
8
|
+
export * from './Checkboxes';
|
|
9
|
+
export * from './Toggles';
|
|
10
|
+
export * from './Textareas';
|
|
11
|
+
export * from './Selects';
|
|
12
|
+
export * from './DatePickers';
|