cemtrik-dependencies 1.0.146 → 1.0.147
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 +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -32,7 +32,7 @@ Check the top-level render call using <`+j+">.")}return S}}function br(d,S){{if(
|
|
|
32
32
|
Copyright (c) 2018 Jed Watson.
|
|
33
33
|
Licensed under the MIT License (MIT), see
|
|
34
34
|
http://jedwatson.github.io/classnames
|
|
35
|
-
*/(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var l="",i=0;i<arguments.length;i++){var s=arguments[i];s&&(l=o(l,r(s)))}return l}function r(l){if(typeof l=="string"||typeof l=="number")return l;if(typeof l!="object")return"";if(Array.isArray(l))return t.apply(null,l);if(l.toString!==Object.prototype.toString&&!l.toString.toString().includes("[native code]"))return l.toString();var i="";for(var s in l)n.call(l,s)&&l[s]&&(i=o(i,s));return i}function o(l,i){return i?l?l+" "+i:l+i:l}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(rr);var xs=rr.exports;const Ae=kr(xs),or=({className:e="text-sm w-full rounded-md",children:n,icon:t=null,edge:r=null,disabled:o=!1,type:l="button",onClick:i,id:s})=>{const a=Ae({"ml-2":r==="start"&&t!==null,"mr-2":r==="end"&&t!==null});return f.jsxs("button",{className:P("flex justify-center items-center bg-white px-3 py-7px font-medium leading-6 text-white shadow-sm ring-1 ring-inset ring-gray-300 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 bg-gray-50",e),type:l,onClick:i,disabled:o,"data-testid":`button-outline-${s}`,id:`button-outline-${s}`,children:[r==="start"&&t!==null&&f.jsx("span",{children:t}),f.jsx("span",{className:P("flex",a),id:s,children:n}),r==="end"&&t!==null&&f.jsx("span",{children:t})]})},lr=({children:e,className:n="",icon:t=null,edge:r=null,disabled:o=!1,type:l="button",onClick:i,id:s})=>{const a=Ae({"ml-2":r==="start"&&t!==null,"mr-2":r==="end"&&t!==null});return f.jsxs("button",{className:`${n} flex justify-center items-center`,edge:r,type:l,onClick:i,disabled:o,"data-testid":`button-${s}`,children:[r==="start"&&t!==null&&f.jsx("span",{children:t}),f.jsx("span",{className:a,children:e}),r==="end"&&t!==null&&f.jsx("span",{children:t})]})},ot=({children:e,classNameButton:n="bg-indigo-600 hover:bg-indigo-700 focus-visible:outline-indigo-600 shadow-indigo-500 rounded font-semibold px-3 py-1.5 text-white w-full",classNameText:t="",icon:r=null,edge:o=null,disabled:l=!1,type:i="button",onClick:s,id:a,outline:c="0px 0px 0px 2px #6366F1, 0px 0px 0px 2px #FFF, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameContainer:p=""})=>{const[h,b]=u.useState(!1),m=Ae({"ml-2":o==="start"&&r!==null,"mr-2":o==="end"&&r!==null}),g=()=>{s&&s()};return f.jsx("div",{className:P("rounded-md p-0.5",p!==""&&p),style:{boxShadow:h?c:"0px 0px 0px 0px #6366F1, 0px 0px 0px 0px #FFF, 0px 0px 0px 0px rgba(0, 0, 0, 0.05)",transition:"box-shadow .1s ease-in-out"},"data-testid":"container-button",children:f.jsxs("button",{className:P("flex justify-center items-center text-sm leading-6 shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",l&&"text-white bg-gray-300 rounded focus:outline-none cursor-default",l?n.replace(/\bbg-\w+\b/g,""):n),type:i,onClick:g,onFocus:()=>b(!0),onBlur:()=>b(!1),disabled:l,"data-testid":`button-solid-${a}`,children:[o==="start"&&r!==null&&f.jsx("span",{className:"flex",children:r}),f.jsx("span",{className:P(t.length===0&&m,t.length!==0&&t),children:e}),o==="end"&&r!==null&&f.jsx("span",{children:r})]})})},ws=({label:e=null,checked:n=!1,onChange:t,id:r,className:o="",classNameCheckbox:l="h-4 w-4",style:i={},disabled:s=!1})=>{const[a,c]=u.useState(!1);return u.useEffect(()=>{c(n)},[n]),f.jsxs("div",{className:"flex items-center",style:i,"data-testid":`container-check-${r}`,children:[f.jsx("input",{checked:a,id:`${e}-${r}`,value:r,"aria-describedby":"comments-description",type:"checkbox",onChange:t,className:P("cursor-pointer rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",l!==""&&l),"data-testid":`checkbox-${r}`,disabled:s}),e!==null?f.jsx("label",{htmlFor:`${e}-${r}`,className:`ml-2.5 font-normal cursor-pointer ${o}`,id:`label-${r}`,"data-testid":"label",children:e}):null]})};function ys({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Es=E.forwardRef(ys);function Ss({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Ts=E.forwardRef(Ss);function Cs({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const Os=E.forwardRef(Cs);function js({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const Ns=E.forwardRef(js);function Fs({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const ks=E.forwardRef(Fs);function ir({children:e,className:n="sm:max-w-sm w-11/12 sm:my-8",classNameContainer:t="",isOpen:r=!1,setIsOpen:o,showIconSuccess:l=!0,showButton:i=!0,style:s={}}){return f.jsx(Re,{show:r,as:u.Fragment,children:f.jsxs(Yn,{as:"div",className:"relative z-50 relative",onClose:o,"data-testid":"modal",children:[f.jsx(Re.Child,{as:u.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-5",leave:"ease-in duration-200",leaveFrom:"opacity-5",leaveTo:"opacity-0",children:f.jsx("div",{className:"fixed inset-0 bg-opacity-40 bg-gray-900 transition-opacity","data-testid":"window-close",onClick:()=>o(!1)})}),f.jsx("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:f.jsx("div",{className:"flex min-h-full items-center justify-center xs:p-2 p-4 text-center sm:items-center sm:p-0",children:f.jsx(Re.Child,{as:u.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:f.jsxs(Yn.Panel,{className:P("relative transform rounded-lg bg-white px-4 pb-3 pt-5 text-left transition-all sm:w-full sm:pt-3 sm:px-3",n!==""&&n),style:s,children:[l&&f.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:f.jsx(Es,{className:"h-6 w-6 text-green-600","aria-hidden":"true"})}),f.jsx("div",{className:P(t!==""&&t),"data-testid":"content",children:e}),i&&f.jsx("div",{className:"mt-5 sm:mt-6",children:f.jsx(ot,{id:"close-modal",onClick:()=>o(!1),children:"Cerrar"})}),f.jsx("button",{className:"opacity-0 absolute"})]})})})})]})})}const Is=({isOpenModalConfirmation:e,setIsOpenModalConfirmation:n,close:t,title:r="¿Estás seguro de abandonar la creación de la acción?",description:o="La información se perderá si no creas la acción",classNameTitle:l="",classNameDescription:i=""})=>{const s=()=>{n(!1),t()};return f.jsxs(ir,{isOpen:e,setIsOpen:()=>n(),showButton:!1,showIconSuccess:!1,children:[f.jsx("p",{className:P("text-center text-sm",l!==""&&l),children:r}),f.jsx("p",{className:P("text-center text-sm",i!==""&&i),children:o}),f.jsxs("div",{className:"flex w-full justify-center mt-5",children:[f.jsx(or,{className:"rounded-md bg-white text-gray-500 text-sm shadow-sm ring-1 ring-inset ring-gray-300 bg-gray-50 w-24 h-9 mr-6",onClick:()=>n(),id:"cancel",children:"Cancelar"}),f.jsx(ot,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 focus-visible:outline-secondary-2 shadow-secondary-2 rounded py-1.5 text-white w-full px-5",outline:"0px 0px 0px 2px #3758F9, 0px 0px 0px 2px #243BBD, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",onClick:s,id:"confirmation",children:"Aceptar"})]})]})},$s=({className:e="",style:n={}})=>f.jsx("div",{className:P("w-px",e!==""&&e),style:n}),Ps=({onClick:e,id:n="",className:t=""})=>f.jsxs("div",{className:P("flex items-center text-default-5",t!==""&&t),"data-testid":n,children:[f.jsx(is,{className:"w-3 h-3 3xs:w-4 3xs:h-4 stroke-current cursor-pointer","data-testid":"chevron-left-icon",onClick:e}),f.jsx("span",{onClick:e,className:"text-sm cursor-pointer","data-testid":"go-back",children:"Volver"})]}),rn=({className:e="",classNameContainer:n="",children:t,message:r="",style:o={}})=>{const[l,i]=u.useState(!1),[s,a]=u.useState({top:0,left:0}),c=u.useRef(null),p=()=>{if(r==="")return;const m=c.current.getBoundingClientRect();a({top:m.bottom+window.scrollY,left:m.left+window.scrollX}),i(!0)},h=()=>{i(!1)},b=f.jsx(Re,{as:u.Fragment,enter:"transition ease-out duration-200",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-100 translate-y-0",leave:"transition ease-in duration-150",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-1",show:l,children:f.jsx("div",{className:P("absolute z-40 px-4 mt-0 sm:px-0",e!==""&&e),style:{top:s.top,left:s.left,position:"absolute"},children:f.jsx("div",{className:"bg-white p-2 text-center rounded-lg shadow-lg ring-1 ring-black ring-opacity-5",onMouseEnter:p,onMouseLeave:h,"data-testid":"message",children:r})})});return f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:c,className:P("inline-block",n!==""&&n),onMouseEnter:p,onMouseLeave:h,"data-testid":"container-tooltip",style:o,children:t}),typeof window<"u"&&Tt.createPortal(b,document.body)]})},on=({placeholder:e="",label:n="",htmlFor:t,type:r="text",name:o,handleChange:l,onClick:i=()=>{},value:s,isReadOnly:a=!1,isError:c=!1,helperText:p="",autocomplete:h="off",id:b,classNameLabel:m="",classNameContainerInput:g="",classNameContainer:v="",className:x="",icon:y=null,onKeyDown:w,onFocus:C,min:I,max:$,maxWidth:A=5e3})=>{const[Z,H]=u.useState(!1),D=Ae({"ring-red-300 focus:ring-red-300 text-red-900":c||Z,"focus:ring-indigo-600 text-gray-500":!c&&!Z}),B=L=>{if(l&&l(L),r!=="email")return;const{value:q}=L.target,Q=dn(q);H(!Q)};return f.jsxs("div",{"data-testid":`container-input-${b}`,className:v,children:[n!==""&&f.jsx("label",{htmlFor:t,className:P("block text-sm font-medium leading-6",m!==""?m:"text-gray-700"),"data-testid":`label-${b}`,children:n}),f.jsxs("div",{className:P("relative mt-1 rounded-md",g!==""&&g),children:[f.jsx(rn,{className:"text-sm",classNameContainer:"w-full",message:s,children:f.jsx("input",{id:b,name:o,type:r,autoComplete:h,placeholder:e,onChange:B,onClick:i,onKeyDown:w,onFocus:C,value:s,readOnly:a,"data-testid":`input-${b}`,min:I,className:P("block w-full rounded-md border-0 py-1.5 shadow-sm placeholder-gray-300 ring-1 ring-gray-300 ring-inset focus:ring-1 focus:ring-inset text-sm sm:leading-6 truncate",D,x!==""&&x),style:{maxWidth:`${A}px`}})}),y!==null&&f.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:y}),c&&y===null&&f.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:f.jsx(tr,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),p.length===0||!c?null:f.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${b}`,children:p})]})};function lt({className:e="w-6 h-6",color:n="#3730a3"}){return f.jsxs("svg",{className:P("fill-current animate-spin",e),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:n,strokeWidth:"4",fill:"none"}),f.jsx("path",{fill:n,d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}function Ms(){return f.jsxs("div",{className:"fixed top-0 left-0 right-0 bottom-0 w-full h-screen overflow-hidden bg-stone-600 opacity-75 flex flex-col items-center justify-center","data-testid":"spinner",style:{zIndex:60},children:[f.jsx("div",{className:"inline-block h-12 w-12 animate-[spinner-grow_0.75s_linear_infinite] rounded-full bg-current align-[-0.125em] opacity-0 motion-reduce:animate-[spinner-grow_1.5s_linear_infinite]",role:"status"}),f.jsx(lt,{className:"w-8 h-8 animate-spin"})]})}const sr=({height:e="36px",style:n={},styleMenu:t={},label:r="",onChange:o,isReadOnly:l=!1,isError:i=!1,helperText:s="",name:a,id:c,className:p="",classNameLabel:h="",classNameInput:b="",options:m,value:g=-1,defaultValue:v={value:-1,label:"",iconStart:null,iconEnd:null},defaultLabel:x="label",defaultId:y="value",bgOptionSelect:w="bg-indigo-600",isSearch:C=!1,loading:I=!1,isSingleOptionAndFirstLoad:$=!0,isTest:A=!1})=>{const[Z,H]=u.useState(""),[D,B]=u.useState(v),[L,q]=u.useState(!1),[Q,ae]=u.useState(!0);u.useEffect(()=>{if((m==null?void 0:m.length)!==1||!Q)return;ae(!1);const[k]=m,U=k[y],le=k[x];B({value:U,label:le}),$&&o({target:{value:k,checked:!1,name:a,type:void 0,id:k[y]}})},[m,y,x,o,a,Q,$]),u.useEffect(()=>{if(g===-1||(m==null?void 0:m.length)===0)return;const k=m==null?void 0:m.find(U=>U[y]===g);k&&B(k)},[g,m,y]),u.useEffect(()=>{g==="clear"&&(D[y]!==v[y]||D[x]!==v[x]||A)&&B(v)},[v,A,D,g,y,x]);const T=Z===""?m:m.filter(k=>k[x].normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().includes(Z.toLowerCase())),re=Ae({"ring-red-300 focus:ring-red-300 text-red-900":i&&!l,"text-gray-500":!i,"focus:ring-indigo-600":!i&&!l}),G=Ae({"text-red-400":i&&!l,"text-gray-400":!i}),K=k=>{B(k),o({target:{value:k,checked:!1,name:a,type:void 0,id:k[y]}})};return f.jsxs(Fe,{as:"div",value:D,children:[f.jsx(Fe.Label,{className:P("block text-sm font-medium leading-6 text-gray-500 mb-0.5",h!==""&&h),children:r}),f.jsxs("div",{className:P("relative",p!==""&&p),children:[f.jsx(rn,{className:"text-sm",classNameContainer:"w-full",message:D[x],children:f.jsxs(Fe.Button,{className:"w-full","data-testid":`listbox-button-${c}`,children:[D.iconStart&&f.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2",children:D.iconStart}),f.jsx(Fe.Input,{className:P("w-full rounded-md border-0 bg-white py-1.5 pr-10 text-gray-900 shadow-sm ring-1 ring-gray-300 sm:text-sm sm:leading-6 truncate block",!i&&!l&&"ring-inset focus:ring-inset focus:ring-2 focus:ring-indigo-600",l&&"focus:ring-gray-300",re,b!==""&&b),onChange:k=>H(k.target.value.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),displayValue:k=>{var U;return(U=k[x])==null?void 0:U.trim()},autoComplete:"off",readOnly:!C||l,style:{height:e,...n},"data-testid":"input-search",onClick:()=>q(l?!1:!L),onBlur:()=>q(!1)})]})}),D.iconEnd&&f.jsx("span",{className:"absolute inset-y-0 right-4 flex items-center pr-4",children:D.iconEnd}),!l&&f.jsx(Fe.Button,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>q(l?!1:!L),"data-testid":"arrow-button",children:L?f.jsx(Ki,{className:P("h-5 w-5",G),"aria-hidden":"true"}):f.jsx(Gi,{className:P("h-5 w-5",G),"aria-hidden":"true"})}),!l&&f.jsx(f.Fragment,{children:I?f.jsx(Fe.Options,{className:"absolute z-10 mt-1 max-h-60 w-full rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none flex justify-center items-center py-2",children:f.jsx(lt,{})}):(T??[]).length>0?f.jsx(Fe.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm py-0.5 overflow-x-hidden",style:t,children:T.map((k,U)=>f.jsx(Fe.Option,{value:k,className:P(k[y]===D[y]?`${w} text-white`:"text-gray-900",`relative cursor-default select-none p-2 hover:text-white hover:${w}`),"data-testid":`select-${c}-${k[y]}`,onClick:()=>K(k),children:f.jsxs("div",{className:"flex justify-between items-center",children:[f.jsxs("div",{className:"flex items-center",children:[k.iconStart&&f.jsx("span",{className:"mr-2","aria-hidden":"true",children:k.iconStart}),f.jsx("span",{className:"font-normal hyphens-auto break-words overflow-hidden",children:k[x]})]}),k.iconEnd&&f.jsx("span",{className:"ml-2","aria-hidden":"true",children:k.iconEnd})]})},U))}):f.jsx(Fe.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm py-0.5 overflow-x-hidden flex justify-center items-center py-2",children:f.jsx("p",{"data-testid":"empty-options",children:"Sin opciones"})})})]}),s.length>0&&i&&f.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${c}`,children:s})]})},As=({placeholder:e="",label:n="",htmlFor:t,name:r,handleChange:o,onClick:l=()=>{},value:i,valueSelect:s,isReadOnly:a=!1,isError:c=!1,helperText:p="",autocomplete:h="on",id:b,classNameLabel:m="",classNameContainer:g="",className:v="",onKeyDown:x,options:y,idSelect:w,isMarginLeft:C=!0,classNameSelect:I="w-20",type:$="text"})=>{const{width:A}=Ot(),Z=Ae({"ring-red-300 focus:ring-red-300 text-red-900":c,"focus:ring-indigo-600 text-gray-500":!c});return f.jsxs(f.Fragment,{children:[f.jsx("style",{children:`
|
|
35
|
+
*/(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var l="",i=0;i<arguments.length;i++){var s=arguments[i];s&&(l=o(l,r(s)))}return l}function r(l){if(typeof l=="string"||typeof l=="number")return l;if(typeof l!="object")return"";if(Array.isArray(l))return t.apply(null,l);if(l.toString!==Object.prototype.toString&&!l.toString.toString().includes("[native code]"))return l.toString();var i="";for(var s in l)n.call(l,s)&&l[s]&&(i=o(i,s));return i}function o(l,i){return i?l?l+" "+i:l+i:l}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(rr);var xs=rr.exports;const Ae=kr(xs),or=({className:e="text-sm w-full rounded-md",children:n,icon:t=null,edge:r=null,disabled:o=!1,type:l="button",onClick:i,id:s})=>{const a=Ae({"ml-2":r==="start"&&t!==null,"mr-2":r==="end"&&t!==null});return f.jsxs("button",{className:P("flex justify-center items-center bg-white px-3 py-7px font-medium leading-6 text-white shadow-sm ring-1 ring-inset ring-gray-300 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 bg-gray-50",e),type:l,onClick:i,disabled:o,"data-testid":`button-outline-${s}`,id:`button-outline-${s}`,children:[r==="start"&&t!==null&&f.jsx("span",{children:t}),f.jsx("span",{className:P("flex",a),id:s,children:n}),r==="end"&&t!==null&&f.jsx("span",{children:t})]})},lr=({children:e,className:n="",icon:t=null,edge:r=null,disabled:o=!1,type:l="button",onClick:i,id:s})=>{const a=Ae({"ml-2":r==="start"&&t!==null,"mr-2":r==="end"&&t!==null});return f.jsxs("button",{className:`${n} flex justify-center items-center`,edge:r,type:l,onClick:i,disabled:o,"data-testid":`button-${s}`,children:[r==="start"&&t!==null&&f.jsx("span",{children:t}),f.jsx("span",{className:a,children:e}),r==="end"&&t!==null&&f.jsx("span",{children:t})]})},ot=({children:e,classNameButton:n="bg-indigo-600 hover:bg-indigo-700 focus-visible:outline-indigo-600 shadow-indigo-500 rounded font-semibold px-3 py-1.5 text-white w-full",classNameText:t="",icon:r=null,edge:o=null,disabled:l=!1,type:i="button",onClick:s,id:a,outline:c="0px 0px 0px 2px #6366F1, 0px 0px 0px 2px #FFF, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameContainer:p=""})=>{const[h,b]=u.useState(!1),m=Ae({"ml-2":o==="start"&&r!==null,"mr-2":o==="end"&&r!==null}),g=()=>{s&&s()};return f.jsx("div",{className:P("rounded-md p-0.5",p!==""&&p),style:{boxShadow:h?c:"0px 0px 0px 0px #6366F1, 0px 0px 0px 0px #FFF, 0px 0px 0px 0px rgba(0, 0, 0, 0.05)",transition:"box-shadow .1s ease-in-out"},"data-testid":"container-button",children:f.jsxs("button",{className:P("flex justify-center items-center text-sm leading-6 shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",l&&"text-white bg-gray-300 rounded focus:outline-none cursor-default",l?n.replace(/\bbg-\w+\b/g,""):n),type:i,onClick:g,onFocus:()=>b(!0),onBlur:()=>b(!1),disabled:l,"data-testid":`button-solid-${a}`,children:[o==="start"&&r!==null&&f.jsx("span",{className:"flex",children:r}),f.jsx("span",{className:P(t.length===0&&m,t.length!==0&&t),children:e}),o==="end"&&r!==null&&f.jsx("span",{children:r})]})})},ws=({label:e=null,checked:n=!1,onChange:t,id:r,className:o="",classNameCheckbox:l="h-4 w-4",style:i={},disabled:s=!1})=>{const[a,c]=u.useState(!1);return u.useEffect(()=>{c(n)},[n]),f.jsxs("div",{className:"flex items-center",style:i,"data-testid":`container-check-${r}`,children:[f.jsx("input",{checked:a,id:`${e}-${r}`,value:r,"aria-describedby":"comments-description",type:"checkbox",onChange:t,className:P("cursor-pointer rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",l!==""&&l),"data-testid":`checkbox-${r}`,disabled:s}),e!==null?f.jsx("label",{htmlFor:`${e}-${r}`,className:`ml-2.5 font-normal cursor-pointer ${o}`,id:`label-${r}`,"data-testid":"label",children:e}):null]})};function ys({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Es=E.forwardRef(ys);function Ss({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Ts=E.forwardRef(Ss);function Cs({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const Os=E.forwardRef(Cs);function js({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const Ns=E.forwardRef(js);function Fs({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const ks=E.forwardRef(Fs);function ir({children:e,className:n="sm:max-w-sm w-11/12 sm:my-8",classNameContainer:t="",isOpen:r=!1,setIsOpen:o,showIconSuccess:l=!0,showButton:i=!0,style:s={}}){return f.jsx(Re,{show:r,as:u.Fragment,children:f.jsxs(Yn,{as:"div",className:"relative z-50 relative",onClose:o,"data-testid":"modal",children:[f.jsx(Re.Child,{as:u.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-5",leave:"ease-in duration-200",leaveFrom:"opacity-5",leaveTo:"opacity-0",children:f.jsx("div",{className:"fixed inset-0 bg-opacity-40 bg-gray-900 transition-opacity","data-testid":"window-close",onClick:()=>o(!1)})}),f.jsx("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:f.jsx("div",{className:"flex min-h-full items-center justify-center xs:p-2 p-4 text-center sm:items-center sm:p-0",children:f.jsx(Re.Child,{as:u.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:f.jsxs(Yn.Panel,{className:P("relative transform rounded-lg bg-white px-4 pb-3 pt-5 text-left transition-all sm:w-full sm:pt-3 sm:px-3",n!==""&&n),style:s,children:[l&&f.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:f.jsx(Es,{className:"h-6 w-6 text-green-600","aria-hidden":"true"})}),f.jsx("div",{className:P(t!==""&&t),"data-testid":"content",children:e}),i&&f.jsx("div",{className:"mt-5 sm:mt-6",children:f.jsx(ot,{id:"close-modal",onClick:()=>o(!1),children:"Cerrar"})}),f.jsx("button",{className:"opacity-0 absolute"})]})})})})]})})}const Is=({isOpenModalConfirmation:e,setIsOpenModalConfirmation:n,close:t,title:r="¿Estás seguro de abandonar la creación de la acción?",description:o="La información se perderá si no creas la acción",classNameTitle:l="",classNameDescription:i=""})=>{const s=()=>{n(!1),t()};return f.jsxs(ir,{isOpen:e,setIsOpen:()=>n(),showButton:!1,showIconSuccess:!1,children:[f.jsx("p",{className:P("text-center text-sm",l!==""&&l),children:r}),f.jsx("p",{className:P("text-center text-sm",i!==""&&i),children:o}),f.jsxs("div",{className:"flex w-full justify-center mt-5",children:[f.jsx(or,{className:"rounded-md bg-white text-gray-500 text-sm shadow-sm ring-1 ring-inset ring-gray-300 bg-gray-50 w-24 h-9 mr-6",onClick:()=>n(),id:"cancel",children:"Cancelar"}),f.jsx(ot,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 focus-visible:outline-secondary-2 shadow-secondary-2 rounded py-1.5 text-white w-full px-5",outline:"0px 0px 0px 2px #3758F9, 0px 0px 0px 2px #243BBD, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",onClick:s,id:"confirmation",children:"Aceptar"})]})]})},$s=({className:e="",style:n={}})=>f.jsx("div",{className:P("w-px",e!==""&&e),style:n}),Ps=({onClick:e,id:n="",className:t=""})=>f.jsxs("div",{className:P("flex items-center text-default-5",t!==""&&t),"data-testid":n,children:[f.jsx(is,{className:"w-3 h-3 3xs:w-4 3xs:h-4 stroke-current cursor-pointer","data-testid":"chevron-left-icon",onClick:e}),f.jsx("span",{onClick:e,className:"text-sm cursor-pointer","data-testid":"go-back",children:"Volver"})]}),rn=({className:e="",classNameContainer:n="",children:t,message:r="",style:o={}})=>{const[l,i]=u.useState(!1),[s,a]=u.useState({top:0,left:0}),c=u.useRef(null),p=()=>{if(r==="")return;const m=c.current.getBoundingClientRect();a({top:m.bottom+window.scrollY,left:m.left+window.scrollX}),i(!0)},h=()=>{i(!1)},b=f.jsx(Re,{as:u.Fragment,enter:"transition ease-out duration-200",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-100 translate-y-0",leave:"transition ease-in duration-150",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-1",show:l,children:f.jsx("div",{className:P("absolute z-40 px-4 mt-0 sm:px-0",e!==""&&e),style:{top:s.top,left:s.left,position:"absolute"},children:f.jsx("div",{className:"bg-white p-2 text-center rounded-lg shadow-lg ring-1 ring-black ring-opacity-5",onMouseEnter:p,onMouseLeave:h,"data-testid":"message",children:r})})});return f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:c,className:P("inline-block",n!==""&&n),onMouseEnter:p,onMouseLeave:h,"data-testid":"container-tooltip",style:o,children:t}),typeof window<"u"&&r!==""&&Tt.createPortal(b,document.body)]})},on=({placeholder:e="",label:n="",htmlFor:t,type:r="text",name:o,handleChange:l,onClick:i=()=>{},value:s,isReadOnly:a=!1,isError:c=!1,helperText:p="",autocomplete:h="off",id:b,classNameLabel:m="",classNameContainerInput:g="",classNameContainer:v="",className:x="",icon:y=null,onKeyDown:w,onFocus:C,min:I,max:$,maxWidth:A=5e3})=>{const[Z,H]=u.useState(!1),D=Ae({"ring-red-300 focus:ring-red-300 text-red-900":c||Z,"focus:ring-indigo-600 text-gray-500":!c&&!Z}),B=L=>{if(l&&l(L),r!=="email")return;const{value:q}=L.target,Q=dn(q);H(!Q)};return f.jsxs("div",{"data-testid":`container-input-${b}`,className:v,children:[n!==""&&f.jsx("label",{htmlFor:t,className:P("block text-sm font-medium leading-6",m!==""?m:"text-gray-700"),"data-testid":`label-${b}`,children:n}),f.jsxs("div",{className:P("relative mt-1 rounded-md",g!==""&&g),children:[f.jsx(rn,{className:"text-sm",classNameContainer:"w-full",message:s,children:f.jsx("input",{id:b,name:o,type:r,autoComplete:h,placeholder:e,onChange:B,onClick:i,onKeyDown:w,onFocus:C,value:s,readOnly:a,"data-testid":`input-${b}`,min:I,className:P("block w-full rounded-md border-0 py-1.5 shadow-sm placeholder-gray-300 ring-1 ring-gray-300 ring-inset focus:ring-1 focus:ring-inset text-sm sm:leading-6 truncate",D,x!==""&&x),style:{maxWidth:`${A}px`}})}),y!==null&&f.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:y}),c&&y===null&&f.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:f.jsx(tr,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),p.length===0||!c?null:f.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${b}`,children:p})]})};function lt({className:e="w-6 h-6",color:n="#3730a3"}){return f.jsxs("svg",{className:P("fill-current animate-spin",e),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:n,strokeWidth:"4",fill:"none"}),f.jsx("path",{fill:n,d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}function Ms(){return f.jsxs("div",{className:"fixed top-0 left-0 right-0 bottom-0 w-full h-screen overflow-hidden bg-stone-600 opacity-75 flex flex-col items-center justify-center","data-testid":"spinner",style:{zIndex:60},children:[f.jsx("div",{className:"inline-block h-12 w-12 animate-[spinner-grow_0.75s_linear_infinite] rounded-full bg-current align-[-0.125em] opacity-0 motion-reduce:animate-[spinner-grow_1.5s_linear_infinite]",role:"status"}),f.jsx(lt,{className:"w-8 h-8 animate-spin"})]})}const sr=({height:e="36px",style:n={},styleMenu:t={},label:r="",onChange:o,isReadOnly:l=!1,isError:i=!1,helperText:s="",name:a,id:c,className:p="",classNameLabel:h="",classNameInput:b="",options:m,value:g=-1,defaultValue:v={value:-1,label:"",iconStart:null,iconEnd:null},defaultLabel:x="label",defaultId:y="value",bgOptionSelect:w="bg-indigo-600",isSearch:C=!1,loading:I=!1,isSingleOptionAndFirstLoad:$=!0,isTest:A=!1})=>{const[Z,H]=u.useState(""),[D,B]=u.useState(v),[L,q]=u.useState(!1),[Q,ae]=u.useState(!0);u.useEffect(()=>{if((m==null?void 0:m.length)!==1||!Q)return;ae(!1);const[k]=m,U=k[y],le=k[x];B({value:U,label:le}),$&&o({target:{value:k,checked:!1,name:a,type:void 0,id:k[y]}})},[m,y,x,o,a,Q,$]),u.useEffect(()=>{if(g===-1||(m==null?void 0:m.length)===0)return;const k=m==null?void 0:m.find(U=>U[y]===g);k&&B(k)},[g,m,y]),u.useEffect(()=>{g==="clear"&&(D[y]!==v[y]||D[x]!==v[x]||A)&&B(v)},[v,A,D,g,y,x]);const T=Z===""?m:m.filter(k=>k[x].normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().includes(Z.toLowerCase())),re=Ae({"ring-red-300 focus:ring-red-300 text-red-900":i&&!l,"text-gray-500":!i,"focus:ring-indigo-600":!i&&!l}),G=Ae({"text-red-400":i&&!l,"text-gray-400":!i}),K=k=>{B(k),o({target:{value:k,checked:!1,name:a,type:void 0,id:k[y]}})};return f.jsxs(Fe,{as:"div",value:D,children:[f.jsx(Fe.Label,{className:P("block text-sm font-medium leading-6 text-gray-500 mb-0.5",h!==""&&h),children:r}),f.jsxs("div",{className:P("relative",p!==""&&p),children:[f.jsx(rn,{className:"text-sm",classNameContainer:"w-full",message:D[x],children:f.jsxs(Fe.Button,{className:"w-full","data-testid":`listbox-button-${c}`,children:[D.iconStart&&f.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2",children:D.iconStart}),f.jsx(Fe.Input,{className:P("w-full rounded-md border-0 bg-white py-1.5 pr-10 text-gray-900 shadow-sm ring-1 ring-gray-300 sm:text-sm sm:leading-6 truncate block",!i&&!l&&"ring-inset focus:ring-inset focus:ring-2 focus:ring-indigo-600",l&&"focus:ring-gray-300",re,b!==""&&b),onChange:k=>H(k.target.value.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),displayValue:k=>{var U;return(U=k[x])==null?void 0:U.trim()},autoComplete:"off",readOnly:!C||l,style:{height:e,...n},"data-testid":"input-search",onClick:()=>q(l?!1:!L),onBlur:()=>q(!1)})]})}),D.iconEnd&&f.jsx("span",{className:"absolute inset-y-0 right-4 flex items-center pr-4",children:D.iconEnd}),!l&&f.jsx(Fe.Button,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>q(l?!1:!L),"data-testid":"arrow-button",children:L?f.jsx(Ki,{className:P("h-5 w-5",G),"aria-hidden":"true"}):f.jsx(Gi,{className:P("h-5 w-5",G),"aria-hidden":"true"})}),!l&&f.jsx(f.Fragment,{children:I?f.jsx(Fe.Options,{className:"absolute z-10 mt-1 max-h-60 w-full rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none flex justify-center items-center py-2",children:f.jsx(lt,{})}):(T??[]).length>0?f.jsx(Fe.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm py-0.5 overflow-x-hidden",style:t,children:T.map((k,U)=>f.jsx(Fe.Option,{value:k,className:P(k[y]===D[y]?`${w} text-white`:"text-gray-900",`relative cursor-default select-none p-2 hover:text-white hover:${w}`),"data-testid":`select-${c}-${k[y]}`,onClick:()=>K(k),children:f.jsxs("div",{className:"flex justify-between items-center",children:[f.jsxs("div",{className:"flex items-center",children:[k.iconStart&&f.jsx("span",{className:"mr-2","aria-hidden":"true",children:k.iconStart}),f.jsx("span",{className:"font-normal hyphens-auto break-words overflow-hidden",children:k[x]})]}),k.iconEnd&&f.jsx("span",{className:"ml-2","aria-hidden":"true",children:k.iconEnd})]})},U))}):f.jsx(Fe.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm py-0.5 overflow-x-hidden flex justify-center items-center py-2",children:f.jsx("p",{"data-testid":"empty-options",children:"Sin opciones"})})})]}),s.length>0&&i&&f.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${c}`,children:s})]})},As=({placeholder:e="",label:n="",htmlFor:t,name:r,handleChange:o,onClick:l=()=>{},value:i,valueSelect:s,isReadOnly:a=!1,isError:c=!1,helperText:p="",autocomplete:h="on",id:b,classNameLabel:m="",classNameContainer:g="",className:v="",onKeyDown:x,options:y,idSelect:w,isMarginLeft:C=!0,classNameSelect:I="w-20",type:$="text"})=>{const{width:A}=Ot(),Z=Ae({"ring-red-300 focus:ring-red-300 text-red-900":c,"focus:ring-indigo-600 text-gray-500":!c});return f.jsxs(f.Fragment,{children:[f.jsx("style",{children:`
|
|
36
36
|
input[type="number"]::-webkit-inner-spin-button,
|
|
37
37
|
input[type="number"]::-webkit-outer-spin-button {
|
|
38
38
|
-webkit-appearance: none;
|