anima-ds-nucleus 1.0.89 → 1.0.90

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.
@@ -1506,7 +1506,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
1506
1506
  font-weight: 600;
1507
1507
  }
1508
1508
  }
1509
- `,ca={...gW},bW={display:"block",marginBottom:"8px",fontFamily:F,fontWeight:500,fontSize:"14px",lineHeight:"21px",color:"var(--color-main-800)"},xW={width:"100%",height:"84px",minHeight:"84px",maxHeight:"84px",padding:"12px",borderRadius:"8px",border:"1px solid #38656D",fontFamily:F,fontSize:"16px",lineHeight:"24px",color:"var(--color-main-800)",boxSizing:"border-box",resize:"none",overflowY:"auto"},Ya={nombre:"",apellido:"",fechaNacimiento:"",genero:"",nacionalidad:"",tipoDocumento:"",numeroDocumento:"",paisEmision:"",emailPersonal:"",telefonoMovil:"",calle:"",numero:"",piso:"",departamento:"",pais:"",provincia:"",ciudad:"",codigoPostal:"",notasAdicionales:"",fotoUrl:""};function sa(a){return{...Ya,...a&&typeof a=="object"?a:{}}}function x0({title:a,children:r,style:n}){return l.jsxs("div",{style:{...Xa,...n},children:[a?l.jsx("h2",{style:wW,children:a}):null,r]})}const RW=({mode:a="create",initialValues:r,onSave:n,onCancel:t,generoOptions:o=[{value:"",label:"Seleccionar"},{value:"Femenino",label:"Femenino"},{value:"Masculino",label:"Masculino"},{value:"Otro",label:"Otro"},{value:"Prefiero no decir",label:"Prefiero no decir"}],nacionalidadOptions:i=[{value:"",label:"Seleccionar"}],tipoDocumentoOptions:c=[{value:"",label:"Seleccionar"},{value:"DNI",label:"DNI"},{value:"Pasaporte",label:"Pasaporte"},{value:"Cédula",label:"Cédula"}],paisOptions:d=[{value:"",label:"Seleccionar"}],provinciaOptions:u=[{value:"",label:"Seleccionar"}],laboralesContent:s,imageError:f="",imageErrorTitle:h="La imagen seleccionada, no cumple las especificaciones.",imageErrorSubtitle:m="Inténtelo nuevamente.",onFotoSelect:p,nombreRequiredMessage:b,apellidoRequiredMessage:j,fechaNacimientoMin:x,fechaNacimientoMax:y,fechaNacimientoError:v="",onFechaNacimientoChange:R,fechaNacimientoErrorTextStyle:E,fechaNacimientoEdadMinimaAnios:M,fechaNacimientoEdadErrorMessage:H,fechaNacimientoOmitirMaxNativo:A=!1,onAfterFormFieldChange:L,className:O="",style:D={},...B})=>{const{t:Z}=je.useTranslation(),W=g.useRef(null),[P,I]=g.useState(0),T=g.useMemo(()=>sa(r),[r]),[k,ce]=g.useState(T),[U,_]=g.useState(null),[Y,se]=g.useState(T.fotoUrl||""),[K,X]=g.useState(""),[N,fe]=g.useState(""),[he,Q]=g.useState("");g.useEffect(()=>{const re=sa(r);ce(re),se(re.fotoUrl||""),_(null),X(""),fe(""),Q("")},[r,a]);const q=g.useMemo(()=>a==="create"?Z("persona.alta.titleCreate",{defaultValue:"Nueva Persona"}):`${k.nombre??""} ${k.apellido??""}`.trim()||Z("persona.alta.titleEdit",{defaultValue:"Editar Persona"}),[a,k.nombre,k.apellido,Z]),Re=g.useMemo(()=>{const re=(k.nombre??"").trim(),ee=(k.apellido??"").trim(),$e=(We,de)=>(We.charAt(de)||"").toUpperCase(),be=$e(re,0),Ce=$e(ee,0);return be&&Ce?`${be}${Ce}`:be&&re.length>=2?`${be}${$e(re,1)}`:be||Ce||"—"},[k.nombre,k.apellido]),ue=g.useCallback(re=>ee=>{const $e=ee?.target?.value??ee;ce(be=>{const Ce={...be,[re]:$e};return typeof L=="function"&&L(re,String($e??""),Ce),Ce}),re==="nombre"&&X(""),re==="apellido"&&fe("")},[L]),me=re=>{const ee=re.target?.files?.[0];ee&&(Y&&Y.startsWith("blob:")&&URL.revokeObjectURL(Y),_(ee),se(URL.createObjectURL(ee)),p?.(ee))},Ze=typeof f=="string"?f:f?h:"",ve=!!(f&&(typeof f!="string"||f)),Se=g.useMemo(()=>H!==void 0?H:Z("persona.alta.errorFechaEdadMinima",{defaultValue:"Debés tener al menos 16 años."}),[H,Z]),Ve=!A&&y!=null&&y!=="",we=()=>{Q("");const re=(k.nombre??"").trim(),ee=(k.apellido??"").trim(),$e=b!==void 0?b:Z("persona.alta.errorNombreRequerido",{defaultValue:"El nombre es obligatorio."}),be=j!==void 0?j:Z("persona.alta.errorApellidoRequerido",{defaultValue:"El apellido es obligatorio."}),Ce=re?"":$e,We=ee?"":be;if(X(Ce),fe(We),Ce||We)return;const de=(k.fechaNacimiento??"").trim();let le="";M!=null&&Number.isFinite(Number(M))&&de&&!b5(de,Number(M))&&(le=Se),Q(le),!le&&n?.({...k,nombre:re,apellido:ee,fotoFile:U??null,fotoRemoved:!Y&&!!r?.fotoUrl})},Ne=[{id:"personal",label:Z("persona.alta.tabPersonal",{defaultValue:"Información personal"})},{id:"laboral",label:Z("persona.alta.tabLaboral",{defaultValue:"Datos laborales"})}],xe=l.jsxs(l.Fragment,{children:[l.jsxs(x0,{children:[l.jsxs("div",{className:"anima-alta-personas__photo-row",children:[l.jsx("div",{className:"anima-alta-personas__photo-avatar",children:Y?l.jsx("img",{src:Y,alt:"",style:{width:"100%",height:"100%",objectFit:"cover"}}):l.jsx("span",{className:"anima-alta-personas__photo-initials","aria-hidden":!0,children:Re})}),l.jsxs("div",{className:"anima-alta-personas__photo-copy",children:[l.jsx("p",{className:"anima-alta-personas__photo-heading",children:Z("persona.alta.sectionPhoto",{defaultValue:"Foto de perfil"})}),l.jsxs("p",{className:"anima-alta-personas__photo-desc",children:[l.jsx("span",{className:"anima-alta-personas__photo-desc-part1",children:Z("persona.alta.photoLine1",{defaultValue:"Sube una imagen de perfil clara."})})," ",l.jsx("span",{className:"anima-alta-personas__photo-desc-part2",children:Z("persona.alta.photoLine2",{defaultValue:"Archivos JPG o PNG de máximo 2Mb"})})]}),l.jsx("input",{ref:W,type:"file",accept:"image/jpeg,image/png,.jpg,.jpeg,.png",style:{display:"none"},onChange:me}),l.jsx("div",{className:"anima-alta-personas__photo-upload-wrap",children:l.jsx(r0,{type:"button",text:Y?Z("persona.alta.changeImage",{defaultValue:"Cambiar imagen"}):Z("persona.alta.uploadImage",{defaultValue:"Subir imagen"}),onClick:()=>W.current?.click(),style:pW,textStyle:u5})})]})]}),ve?l.jsxs("div",{className:"anima-alta-personas__foto-error-box",style:{marginTop:"16px",paddingTop:"12px",paddingRight:"16px",paddingBottom:"12px",paddingLeft:"16px",gap:"4px",borderRadius:"8px",border:"1px solid #B30808",backgroundColor:"#F8DBDB",display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box"},role:"alert",children:[l.jsx(C,{variant:"body2",style:{fontFamily:Be,fontWeight:400,fontStyle:"normal",fontSize:"14px",lineHeight:"21px",letterSpacing:"0.02em",color:"#B30808",margin:0},children:Ze}),l.jsx(C,{variant:"body2",style:{fontFamily:Be,fontWeight:400,fontStyle:"normal",fontSize:"14px",lineHeight:"21px",letterSpacing:"0.02em",color:"#B30808",margin:0},children:m})]}):null]}),l.jsxs(x0,{title:Z("persona.alta.sectionPersonal",{defaultValue:"Datos personales"}),style:{marginTop:16},children:[l.jsxs("div",{className:"anima-alta-personas__grid3",children:[l.jsx(l0,{id:"persona-nombre",label:Z("persona.alta.nombre",{defaultValue:"Nombre"}),placeholder:Z("persona.alta.ph.nombre",{defaultValue:"Ingresa tu nombre"}),value:k.nombre,onChange:ue("nombre"),required:!0,error:K,errorTextStyle:f5}),l.jsx(l0,{id:"persona-apellido",label:Z("persona.alta.apellido",{defaultValue:"Apellido"}),placeholder:Z("persona.alta.ph.apellido",{defaultValue:"Ingresa tu apellido"}),value:k.apellido,onChange:ue("apellido"),required:!0,error:N,errorTextStyle:f5}),l.jsx(l0,{id:"persona-fechaNac",type:"date",label:Z("persona.alta.fechaNacimiento",{defaultValue:"Fecha de nacimiento"}),placeholder:Z("persona.alta.ph.fechaNacimiento",{defaultValue:"Ingresa tu fecha de nacimiento"}),value:k.fechaNacimiento,onChange:re=>{const ee=re?.target?.value??"";ue("fechaNacimiento")(re),R?.(ee),M!=null&&Number.isFinite(Number(M))&&/^\d{4}-\d{2}-\d{2}$/.test(ee)?Q(b5(ee,Number(M))?"":Se):Q("")},...x!=null&&x!==""?{min:x}:{},...Ve?{max:y}:{},error:v||he,errorTextStyle:E??f5})]}),l.jsxs("div",{className:"anima-alta-personas__grid3",style:{marginTop:16},children:[l.jsx(d0,{id:"persona-genero",label:Z("persona.alta.genero",{defaultValue:"Género"}),options:o,value:k.genero,onChange:ue("genero")}),l.jsx(d0,{id:"persona-nacionalidad",label:Z("persona.alta.nacionalidad",{defaultValue:"Nacionalidad"}),options:i,value:k.nacionalidad,onChange:ue("nacionalidad")}),l.jsx("div",{})]})]}),l.jsx(x0,{title:Z("persona.alta.sectionId",{defaultValue:"Identificación"}),style:{marginTop:16},children:l.jsxs("div",{className:"anima-alta-personas__grid3",children:[l.jsx(d0,{id:"persona-tipoDoc",label:Z("persona.alta.tipoDocumento",{defaultValue:"Tipo de documento"}),options:c,value:k.tipoDocumento,onChange:ue("tipoDocumento")}),l.jsx(l0,{id:"persona-numDoc",label:Z("persona.alta.numeroDocumento",{defaultValue:"Número de documento"}),placeholder:Z("persona.alta.ph.numeroDocumento",{defaultValue:"Ingresa tu N° de documento"}),value:k.numeroDocumento,onChange:ue("numeroDocumento")}),l.jsx(d0,{id:"persona-paisEmision",label:Z("persona.alta.paisEmision",{defaultValue:"País de emisión"}),options:d,value:k.paisEmision,onChange:ue("paisEmision")})]})}),l.jsx(x0,{title:Z("persona.alta.sectionContact",{defaultValue:"Contacto"}),style:{marginTop:16},children:l.jsxs("div",{className:"anima-alta-personas__grid4",children:[l.jsx("div",{className:"anima-alta-personas__contact-span2",children:l.jsx(l0,{id:"persona-email",type:"email",label:Z("persona.alta.emailPersonal",{defaultValue:"Email personal"}),placeholder:Z("persona.alta.ph.email",{defaultValue:"Ingresa tu email"}),value:k.emailPersonal,onChange:ue("emailPersonal")})}),l.jsx("div",{className:"anima-alta-personas__contact-span2",children:l.jsx(l0,{id:"persona-tel",type:"tel",label:Z("persona.alta.telefonoMovil",{defaultValue:"Teléfono móvil"}),placeholder:Z("persona.alta.ph.telefono",{defaultValue:"Ingresa tu teléfono"}),value:k.telefonoMovil,onChange:ue("telefonoMovil")})})]})}),l.jsxs(x0,{title:Z("persona.alta.sectionAddress",{defaultValue:"Dirección"}),style:{marginTop:16},children:[l.jsxs("div",{className:"anima-alta-personas__grid4 anima-alta-personas__grid4-dir",children:[l.jsx(l0,{id:"persona-calle",label:Z("persona.alta.calle",{defaultValue:"Calle"}),value:k.calle,onChange:ue("calle")}),l.jsx(l0,{id:"persona-numero",label:Z("persona.alta.numero",{defaultValue:"Número"}),value:k.numero,onChange:ue("numero")}),l.jsx(l0,{id:"persona-piso",label:Z("persona.alta.piso",{defaultValue:"Piso"}),value:k.piso,onChange:ue("piso")}),l.jsx(l0,{id:"persona-depto",label:Z("persona.alta.departamento",{defaultValue:"Departamento"}),value:k.departamento,onChange:ue("departamento")})]}),l.jsxs("div",{className:"anima-alta-personas__grid4",style:{marginTop:16},children:[l.jsx(d0,{id:"persona-pais",label:Z("persona.alta.pais",{defaultValue:"País"}),options:d,value:k.pais,onChange:ue("pais")}),l.jsx(d0,{id:"persona-provincia",label:Z("persona.alta.provincia",{defaultValue:"Provincia"}),options:u,value:k.provincia,onChange:ue("provincia")}),l.jsx(l0,{id:"persona-ciudad",label:Z("persona.alta.ciudad",{defaultValue:"Ciudad"}),placeholder:Z("persona.alta.ph.ciudad",{defaultValue:"Ingresa tu ciudad"}),value:k.ciudad,onChange:ue("ciudad")}),l.jsx(l0,{id:"persona-cp",label:Z("persona.alta.codigoPostal",{defaultValue:"Código postal"}),placeholder:Z("persona.alta.ph.codigoPostal",{defaultValue:"Ingresa tu CP"}),value:k.codigoPostal,onChange:ue("codigoPostal")})]})]}),l.jsxs(x0,{title:Z("persona.alta.sectionExtra",{defaultValue:"Información adicional"}),style:{marginTop:16},children:[l.jsx("label",{htmlFor:"persona-notas-adic",style:bW,children:Z("persona.alta.notasAdicionales",{defaultValue:"Notas adicionales"})}),l.jsx("textarea",{id:"persona-notas-adic",value:k.notasAdicionales,onChange:ue("notasAdicionales"),style:xW})]})]}),J=s??l.jsxs("div",{style:{...Xa,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",width:"100%",maxWidth:"380px",maxHeight:"280px",margin:"0 auto",padding:"24px",boxSizing:"border-box",overflowY:"auto"},role:"status","aria-live":"polite",children:[l.jsx("div",{style:{background:"#E8F4F8",borderRadius:"20px",padding:"16px",marginBottom:"24px",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center"},"aria-hidden":!0,children:l.jsx($,{name:"InformationCircleIcon",variant:"24-outline",size:56,style:{color:"#38656D",flexShrink:0}})}),l.jsx("h2",{style:{fontFamily:F,fontWeight:400,fontStyle:"normal",fontSize:"24px",lineHeight:"36px",letterSpacing:"0",textAlign:"center",color:"#29474C",margin:"0 0 12px 0"},children:Z("persona.alta.laboralesTitle",{defaultValue:"Datos Laborales"})}),l.jsxs("p",{style:{fontFamily:F,fontWeight:400,fontStyle:"normal",fontSize:"14px",lineHeight:"21px",letterSpacing:"0.01em",textAlign:"center",color:"#5F5F5F",margin:0,maxWidth:"100%"},children:[Z("persona.alta.laboralesSoonLine1",{defaultValue:"Estamos trabajando para traerte esta"}),l.jsx("br",{}),Z("persona.alta.laboralesSoonLine2",{defaultValue:"funcionalidad muy pronto."})]})]});return l.jsxs("div",{className:`anima-alta-personas ${O}`,style:{width:"100%",maxWidth:"100%",minHeight:"100%",background:"transparent",padding:"24px",boxSizing:"border-box",...D},...B,children:[l.jsx("style",{children:vW}),l.jsx("header",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:"16px",flexWrap:"wrap",marginBottom:"8px"},children:l.jsx(C,{variant:"h5",style:{fontFamily:F,fontWeight:500,fontStyle:"normal",fontSize:"24px",lineHeight:"36px",letterSpacing:"0",verticalAlign:"middle",color:"#29474C",margin:0,textAlign:"left"},children:q})}),l.jsx("div",{className:"anima-alta-personas__tabs-wrap",children:l.jsx("nav",{className:"anima-alta-personas__tabs-nav","aria-label":"Secciones",children:Ne.map((re,ee)=>l.jsx("button",{type:"button",onClick:()=>I(ee),className:P===ee?"anima-alta-personas__tab anima-alta-personas__tab--active":"anima-alta-personas__tab",children:re.label},re.id))})}),P===0?xe:J,P===0?l.jsxs("footer",{className:"anima-alta-personas__footer-actions","aria-label":Z("persona.alta.footerActionsLabel",{defaultValue:"Acciones del formulario"}),children:[l.jsx(r0,{type:"button",variant:"outline",text:Z("persona.alta.cancel",{defaultValue:"Cancelar"}),onClick:t,style:ca,textStyle:u5}),l.jsx(r0,{type:"button",text:Z("persona.alta.save",{defaultValue:"Guardar"}),onClick:we,style:ca,textStyle:u5})]}):null]})},Ka=2*1024*1024,Qa=["image/jpeg","image/png"];function yW(a,r={}){if(!a)return"";const n=r.maxBytes??Ka,t=r.acceptMime??Qa,o=(a.type||"").toLowerCase();return t.includes(o)?a.size>n?"El archivo supera el tamaño máximo permitido (2 Mb).":"":"La imagen debe ser JPG o PNG."}const da=768,ua={info:"LinkSlashIcon",error:"LinkSlashIcon",success:"LinkSlashIcon"},fa={info:"blue-600",error:"red-600",success:"green-600"},EW=({text:a="",type:r="info",className:n="",style:t,...o})=>{const i={info:"#2563EB",error:"#FF0000",success:"#16A34A"},c=i[r]??i.info,d=ua[r]??ua.info,u=fa[r]??fa.info,[s,f]=g.useState(()=>typeof window<"u"?window.innerWidth<=da:!1),[h,m]=g.useState(!1),p=g.useRef(null);g.useEffect(()=>{const x=()=>f(window.innerWidth<=da);return window.addEventListener("resize",x),()=>window.removeEventListener("resize",x)},[]);const b=()=>{const x=p.current;x&&m(x.scrollWidth>x.clientWidth)},j=x=>{p.current=x,x&&requestAnimationFrame(b)};return g.useEffect(()=>{let x;const y=requestAnimationFrame(()=>{b();const v=p.current;v&&(x=new ResizeObserver(()=>requestAnimationFrame(b)),x.observe(v))});return()=>{cancelAnimationFrame(y),x&&x.disconnect()}},[a,s]),l.jsxs("div",{className:`anima-badgeinformativo ${n}`,style:{minHeight:"30px",height:s?"auto":"30px",width:s?"100%":"fit-content",maxWidth:s?"100%":void 0,marginLeft:s?0:"10px",marginRight:s?0:"10px",borderRadius:"8px",border:`1px solid ${c}`,backgroundColor:"#FFFFFF",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"flex-start",paddingTop:s?"0.5rem":void 0,paddingBottom:s?"0.5rem":void 0,paddingLeft:"1rem",paddingRight:"1rem",gap:"1rem",...t},...o,children:[l.jsx($,{name:d,size:16,color:u,strokeWidth:2,style:{flexShrink:0,...r==="error"?{color:"#FF0000"}:{}}}),l.jsx("div",{style:{minWidth:0,flex:1,overflow:s?"visible":"hidden",display:"flex",alignItems:"center",alignSelf:"stretch",height:s?void 0:"100%"},children:!s&&h?l.jsx(Ea,{content:a,position:"bottom",style:{width:"100%",display:"flex",alignItems:"center"},children:l.jsx("span",{ref:j,style:{color:c,fontFamily:F,fontWeight:400,fontStyle:"normal",fontSize:"14px",lineHeight:"21px",letterSpacing:"0%",direction:"ltr",textAlign:"left",verticalAlign:"middle",textTransform:"uppercase",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"block"},children:a})}):l.jsx("span",{ref:j,style:{color:c,fontFamily:F,fontWeight:400,fontStyle:"normal",fontSize:"14px",lineHeight:"21px",letterSpacing:"0%",direction:"ltr",textAlign:"left",verticalAlign:"middle",textTransform:"uppercase",whiteSpace:s?"normal":"nowrap",overflow:s?"visible":"hidden",textOverflow:s?void 0:"ellipsis",display:"block",wordBreak:s?"break-word":void 0},children:a})})]})},ma=769,ha=768,jW=({title:a="Configuración inicial",titleStyle:r,titleClassName:n="",badgeText:t="Contenido sin funcionalidad definida, no conectado a Backend.",badgeType:o="error",children:i,slotStates:c=["Completado","Completado","Pendiente","Pendiente","Pendiente"],slotTitles:d=["Tenant configurado (nombre/idioma/timezone/logo)","Administradores existentes (al menos 1)","Integración SSO/AD","Configuración de Roles RBAC","Empresas"],slotSubtitles:u=["Parámetros básicos de identidad y localización definidos.","Acceso técnico de administración garantizado.","Conexión con el proveedor de identidad externa.","Definición de matrices de permisos y perfiles.","Carga de razones sociales y estructura legal."],onSlotStateChange:s,containerStyle:f,containerClassName:h="",titleContainerStyle:m,titleContainerClassName:p="",contentContainerStyle:b,contentContainerClassName:j="",className:x="",...y})=>{const{t:v}=je.useTranslation(),R=v("overview.taskCompleted",{defaultValue:"Completado"}),E=D=>{const B=String(D??"").trim().toLowerCase();return B===String(R).trim().toLowerCase()||B==="completado"||B==="completed"},[M,H]=g.useState(()=>typeof window<"u"?window.innerWidth<=ma:!1),[A,L]=g.useState(()=>typeof window<"u"?window.innerWidth>ha:!0),O=()=>{const D=window.innerWidth;H(D<=ma),L(D>ha)};return g.useLayoutEffect(()=>{O()},[]),g.useEffect(()=>(window.addEventListener("resize",O),()=>window.removeEventListener("resize",O)),[]),l.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",gap:"1rem"},children:[l.jsx(EW,{text:t,type:o}),l.jsxs("div",{className:`anima-configuracionoverview__container ${h} ${x}`,style:{width:"100%",minWidth:0,height:A?"490px":"auto",minHeight:A?void 0:"490px",borderRadius:"var(--radius-16, 16px)",border:"1px solid var(--color-grey-200, #c4c4c4)",backgroundColor:"var(--color-neutrals-white, #FFFFFF)",boxSizing:"border-box",display:"flex",flexDirection:"column",overflow:"hidden",...f||{}},...y,children:[l.jsx("div",{className:`anima-configuracionoverview__title-container ${p}`,style:{width:"100%",minHeight:0,flexShrink:0,paddingTop:"24px",paddingRight:"var(--space-16, 1rem)",paddingBottom:"4px",paddingLeft:"var(--space-16, 1rem)",gap:"8px",opacity:1,boxSizing:"border-box",display:"flex",flexDirection:"column",...m||{}},children:l.jsxs("div",{style:{width:"100%",minHeight:0,minWidth:0,boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"12px"},children:[a&&l.jsx(C,{variant:"h5",className:n,style:{fontFamily:F,fontWeight:500,fontStyle:"normal",fontSize:"24px",lineHeight:"36px",letterSpacing:"0%",verticalAlign:"middle",color:"var(--color-cyan-19)",margin:0,flex:"1 1 auto",minWidth:0,...r||{}},children:a}),A&&l.jsx("div",{style:{flexShrink:0,height:"24px",display:"flex",alignItems:"center"},children:l.jsxs(u0,{variant:"success",size:"small",className:"anima-configuracionoverview__title-badge",style:{height:"24px",minWidth:"96px",opacity:1,borderRadius:"var(--radius-16, 16px)",paddingTop:"2px",paddingRight:"12px",paddingBottom:"4px",paddingLeft:"12px",backgroundColor:"var(--color-cyan-82, #B8E2E9)",fontFamily:Be,fontWeight:400,fontStyle:"normal",fontSize:"12px",lineHeight:"18px",letterSpacing:"0%",textAlign:"right",verticalAlign:"middle",color:"var(--color-grey-700, #474747)",display:"inline-flex",alignItems:"center",justifyContent:"flex-end",boxSizing:"border-box"},children:[c.filter(D=>E(D)).length," ",v("overview.completedTasks",{defaultValue:"Tareas completadas"})]})})]})}),i!=null&&l.jsx("div",{className:`anima-configuracionoverview__content ${j}`,style:{width:"100%",minWidth:0,minHeight:0,flex:"1 1 auto",paddingTop:"16px",paddingRight:M?"16px":"24px",paddingBottom:"24px",paddingLeft:M?"16px":"24px",opacity:1,boxSizing:"border-box",display:"flex",flexDirection:"column",gap:"24px",...b||{}},children:i}),l.jsx("div",{className:"anima-configuracionoverview__bottom-panel",style:{width:"100%",minWidth:0,height:A?"424px":"auto",flexShrink:0,margin:0,paddingLeft:"var(--space-16, 1rem)",paddingRight:"var(--space-16, 1rem)",paddingTop:A?0:"var(--space-16, 1rem)",paddingBottom:"var(--space-16, 1rem)",boxSizing:"border-box",display:"flex",flexDirection:"column",overflow:"hidden"},children:[0,1,2,3,4].map(D=>{const B=E(c[D])?R:"Pendiente",Z=B===R?"CheckCircleIcon":"EllipsisHorizontalCircleIcon",W=B===R?{flexShrink:0,fill:"#D3FFDF",stroke:"var(--misc-exito-info, #0A742C)"}:{flexShrink:0,color:"var(--color-grey-400, #919191)"},P=()=>{typeof s=="function"&&s(D,B===R?"Pendiente":R)},I=se=>{typeof s=="function"&&(se.key==="Enter"||se.key===" ")&&(se.preventDefault(),P())},T=typeof s=="function",k=B===R?"var(--color-cyan-19)":"var(--color-grey-600, #5F5F5F)",ce=d[D]??"",U=u[D]??"",_={fontFamily:F,fontWeight:500,fontStyle:"normal",fontSize:"16px",lineHeight:"24px",letterSpacing:"0%",verticalAlign:"middle",color:k,margin:0},Y={fontFamily:F,fontWeight:400,fontStyle:"normal",fontSize:"16px",lineHeight:"24px",letterSpacing:"0%",verticalAlign:"middle",color:k,margin:0};return l.jsx("div",{className:"anima-configuracionoverview__bottom-panel-slot",style:{width:"100%",minHeight:A?"80px":"116px",flexShrink:0,boxSizing:"border-box",display:"flex",alignItems:A?"center":"flex-start",justifyContent:"center",...D<4?{borderBottom:"1px solid #E5E5E5"}:{}},children:l.jsxs("div",{className:"anima-configuracionoverview__bottom-panel-slot-inner",role:T?"button":void 0,tabIndex:T?0:void 0,onClick:T?P:void 0,onKeyDown:T?I:void 0,style:{width:"100%",minHeight:A?"48px":void 0,height:A?void 0:"auto",flexShrink:0,boxSizing:"border-box",display:"flex",flexDirection:A?"row":"column",alignItems:A?"center":"stretch",alignSelf:"stretch",paddingLeft:A?"12px":0,paddingTop:A?0:"12px",paddingBottom:A?0:"12px",gap:"12px",...T?{cursor:"pointer"}:{}},children:[A&&l.jsx($,{name:Z,size:24,style:W}),l.jsxs("div",{style:{flex:A?"1 1 0":"0 0 auto",minWidth:0,minHeight:"48px",display:"flex",flexDirection:"column",gap:0},children:[l.jsx("div",{className:"anima-configuracionoverview__slot-inner-green",style:{width:"100%",minHeight:"24px",flexShrink:0,boxSizing:"border-box",display:"flex",alignItems:"flex-start",paddingRight:"12px"},children:l.jsx(C,{component:"span",style:{..._,wordBreak:"break-word",overflowWrap:"break-word",display:"block"},children:ce||" "})}),l.jsx("div",{className:"anima-configuracionoverview__slot-inner-green",style:{width:"100%",minHeight:"24px",flexShrink:0,boxSizing:"border-box",display:"flex",alignItems:"flex-start",paddingRight:"12px"},children:l.jsx(C,{component:"span",style:{...Y,wordBreak:"break-word",overflowWrap:"break-word",display:"block"},children:U||" "})})]}),l.jsx("div",{style:{flexShrink:0,height:"24px",display:"flex",alignItems:"center",...A?{}:{marginTop:"8px"}},children:l.jsx(u0,{variant:B===R?"success":"danger",size:"small",className:"anima-configuracionoverview__slot-badge",style:{width:"96px",height:"24px",opacity:1,borderRadius:"var(--radius-16, 16px)",borderWidth:"1px",borderStyle:"solid",borderColor:B===R?"var(--color-status-success, #0A742C)":"var(--color-status-warning, #CC4908)",paddingTop:"2px",paddingRight:"12px",paddingBottom:"4px",paddingLeft:"12px",backgroundColor:B===R?"var(--misc-exito-fondo, #D3FFDF)":"var(--color-neutrals-white, #FFFFFF)",fontFamily:Be,fontWeight:400,fontStyle:"normal",fontSize:"12px",lineHeight:"18px",letterSpacing:"0%",textAlign:B===R?"right":"center",verticalAlign:"middle",color:B===R?"var(--color-status-success, #0A742C)":"var(--color-status-warning, #CC4908)",display:"inline-flex",alignItems:"center",justifyContent:B===R?"flex-end":"center",boxSizing:"border-box"},children:B===R?R:"Pendiente"})})]})},D)})})]})]})},CW=`
1509
+ `,ca={...gW},bW={display:"block",marginBottom:"8px",fontFamily:F,fontWeight:500,fontSize:"14px",lineHeight:"21px",color:"var(--color-main-800)"},xW={width:"100%",height:"84px",minHeight:"84px",maxHeight:"84px",padding:"12px",borderRadius:"8px",border:"1px solid #38656D",fontFamily:F,fontSize:"16px",lineHeight:"24px",color:"var(--color-main-800)",boxSizing:"border-box",resize:"none",overflowY:"auto"},Ya={nombre:"",apellido:"",fechaNacimiento:"",genero:"",nacionalidad:"",tipoDocumento:"",numeroDocumento:"",paisEmision:"",emailPersonal:"",telefonoMovil:"",calle:"",numero:"",piso:"",departamento:"",pais:"",provincia:"",ciudad:"",codigoPostal:"",notasAdicionales:"",fotoUrl:""};function sa(a){return{...Ya,...a&&typeof a=="object"?a:{}}}function x0({title:a,children:r,style:n}){return l.jsxs("div",{style:{...Xa,...n},children:[a?l.jsx("h2",{style:wW,children:a}):null,r]})}const RW=({mode:a="create",initialValues:r,onSave:n,onCancel:t,generoOptions:o=[{value:"",label:"Seleccionar"},{value:"Femenino",label:"Femenino"},{value:"Masculino",label:"Masculino"},{value:"Otro",label:"Otro"},{value:"Prefiero no decir",label:"Prefiero no decir"}],nacionalidadOptions:i=[{value:"",label:"Seleccionar"}],tipoDocumentoOptions:c=[{value:"",label:"Seleccionar"},{value:"DNI",label:"DNI"},{value:"Pasaporte",label:"Pasaporte"},{value:"Cédula",label:"Cédula"}],paisOptions:d=[{value:"",label:"Seleccionar"}],provinciaOptions:u=[{value:"",label:"Seleccionar"}],laboralesContent:s,imageError:f="",imageErrorTitle:h="La imagen seleccionada, no cumple las especificaciones.",imageErrorSubtitle:m="Inténtelo nuevamente.",onFotoSelect:p,nombreRequiredMessage:b,apellidoRequiredMessage:j,fechaNacimientoMin:x,fechaNacimientoMax:y,fechaNacimientoError:v="",onFechaNacimientoChange:R,fechaNacimientoErrorTextStyle:E,fechaNacimientoEdadMinimaAnios:M,fechaNacimientoEdadErrorMessage:H,fechaNacimientoOmitirMaxNativo:A=!1,onAfterFormFieldChange:L,className:O="",style:D={},...B})=>{const{t:Z}=je.useTranslation(),W=g.useRef(null),[P,I]=g.useState(0),T=g.useMemo(()=>sa(r),[r]),[k,ce]=g.useState(T),[U,_]=g.useState(null),[Y,se]=g.useState(T.fotoUrl||""),[K,X]=g.useState(""),[N,fe]=g.useState(""),[he,Q]=g.useState("");g.useEffect(()=>{const re=sa(r);ce(re),se(re.fotoUrl||""),_(null),X(""),fe(""),Q("")},[r,a]);const q=g.useMemo(()=>a==="create"?Z("persona.alta.titleCreate",{defaultValue:"Nueva Persona"}):`${k.nombre??""} ${k.apellido??""}`.trim()||Z("persona.alta.titleEdit",{defaultValue:"Editar Persona"}),[a,k.nombre,k.apellido,Z]),Re=g.useMemo(()=>{const re=(k.nombre??"").trim(),ee=(k.apellido??"").trim(),$e=(We,de)=>(We.charAt(de)||"").toUpperCase(),be=$e(re,0),Ce=$e(ee,0);return be&&Ce?`${be}${Ce}`:be&&re.length>=2?`${be}${$e(re,1)}`:be||Ce||"—"},[k.nombre,k.apellido]),ue=g.useCallback(re=>ee=>{const $e=ee?.target?.value??ee;ce(be=>{const Ce={...be,[re]:$e};return typeof L=="function"&&L(re,String($e??""),Ce),Ce}),re==="nombre"&&X(""),re==="apellido"&&fe("")},[L]),me=re=>{const ee=re.target?.files?.[0];ee&&(Y&&Y.startsWith("blob:")&&URL.revokeObjectURL(Y),_(ee),se(URL.createObjectURL(ee)),p?.(ee))},Ze=typeof f=="string"?f:f?h:"",ve=!!(f&&(typeof f!="string"||f)),Se=g.useMemo(()=>H!==void 0?H:Z("persona.alta.errorFechaEdadMinima",{defaultValue:"Debés tener al menos 16 años."}),[H,Z]),Ve=!A&&y!=null&&y!=="",we=()=>{Q("");const re=(k.nombre??"").trim(),ee=(k.apellido??"").trim(),$e=b!==void 0?b:Z("persona.alta.errorNombreRequerido",{defaultValue:"El nombre es obligatorio."}),be=j!==void 0?j:Z("persona.alta.errorApellidoRequerido",{defaultValue:"El apellido es obligatorio."}),Ce=re?"":$e,We=ee?"":be;if(X(Ce),fe(We),Ce||We)return;const de=(k.fechaNacimiento??"").trim();let le="";M!=null&&Number.isFinite(Number(M))&&de&&!b5(de,Number(M))&&(le=Se),Q(le),!le&&n?.({...k,nombre:re,apellido:ee,fotoFile:U??null,fotoRemoved:!Y&&!!r?.fotoUrl})},Ne=[{id:"personal",label:Z("persona.alta.tabPersonal",{defaultValue:"Información personal"})},{id:"laboral",label:Z("persona.alta.tabLaboral",{defaultValue:"Datos laborales"})}],xe=l.jsxs(l.Fragment,{children:[l.jsxs(x0,{children:[l.jsxs("div",{className:"anima-alta-personas__photo-row",children:[l.jsx("div",{className:"anima-alta-personas__photo-avatar",children:Y?l.jsx("img",{src:Y,alt:"",style:{width:"100%",height:"100%",objectFit:"cover"}}):l.jsx("span",{className:"anima-alta-personas__photo-initials","aria-hidden":!0,children:Re})}),l.jsxs("div",{className:"anima-alta-personas__photo-copy",children:[l.jsx("p",{className:"anima-alta-personas__photo-heading",children:Z("persona.alta.sectionPhoto",{defaultValue:"Foto de perfil"})}),l.jsxs("p",{className:"anima-alta-personas__photo-desc",children:[l.jsx("span",{className:"anima-alta-personas__photo-desc-part1",children:Z("persona.alta.photoLine1",{defaultValue:"Sube una imagen de perfil clara."})})," ",l.jsx("span",{className:"anima-alta-personas__photo-desc-part2",children:Z("persona.alta.photoLine2",{defaultValue:"Archivos JPG o PNG de máximo 2Mb"})})]}),l.jsx("input",{ref:W,type:"file",accept:"image/jpeg,image/png,.jpg,.jpeg,.png",style:{display:"none"},onChange:me}),l.jsx("div",{className:"anima-alta-personas__photo-upload-wrap",children:l.jsx(r0,{type:"button",text:Y?Z("persona.alta.changeImage",{defaultValue:"Cambiar imagen"}):Z("persona.alta.uploadImage",{defaultValue:"Subir imagen"}),onClick:()=>W.current?.click(),style:pW,textStyle:u5})})]})]}),ve?l.jsxs("div",{className:"anima-alta-personas__foto-error-box",style:{marginTop:"16px",paddingTop:"12px",paddingRight:"16px",paddingBottom:"12px",paddingLeft:"16px",gap:"4px",borderRadius:"8px",border:"1px solid #B30808",backgroundColor:"#F8DBDB",display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box"},role:"alert",children:[l.jsx(C,{variant:"body2",style:{fontFamily:Be,fontWeight:400,fontStyle:"normal",fontSize:"14px",lineHeight:"21px",letterSpacing:"0.02em",color:"#B30808",margin:0},children:Ze}),l.jsx(C,{variant:"body2",style:{fontFamily:Be,fontWeight:400,fontStyle:"normal",fontSize:"14px",lineHeight:"21px",letterSpacing:"0.02em",color:"#B30808",margin:0},children:m})]}):null]}),l.jsxs(x0,{title:Z("persona.alta.sectionPersonal",{defaultValue:"Datos personales"}),style:{marginTop:16},children:[l.jsxs("div",{className:"anima-alta-personas__grid3",children:[l.jsx(l0,{id:"persona-nombre",label:Z("persona.alta.nombre",{defaultValue:"Nombre"}),placeholder:Z("persona.alta.ph.nombre",{defaultValue:"Ingresa tu nombre"}),value:k.nombre,onChange:ue("nombre"),required:!0,error:K,errorTextStyle:f5}),l.jsx(l0,{id:"persona-apellido",label:Z("persona.alta.apellido",{defaultValue:"Apellido"}),placeholder:Z("persona.alta.ph.apellido",{defaultValue:"Ingresa tu apellido"}),value:k.apellido,onChange:ue("apellido"),required:!0,error:N,errorTextStyle:f5}),l.jsx(l0,{id:"persona-fechaNac",type:"date",label:Z("persona.alta.fechaNacimiento",{defaultValue:"Fecha de nacimiento"}),placeholder:Z("persona.alta.ph.fechaNacimiento",{defaultValue:"Ingresa tu fecha de nacimiento"}),value:k.fechaNacimiento,onChange:re=>{const ee=re?.target?.value??"";ue("fechaNacimiento")(re),R?.(ee),M!=null&&Number.isFinite(Number(M))&&/^\d{4}-\d{2}-\d{2}$/.test(ee)?Q(b5(ee,Number(M))?"":Se):Q("")},...x!=null&&x!==""?{min:x}:{},...Ve?{max:y}:{},error:v||he,errorTextStyle:E??f5})]}),l.jsxs("div",{className:"anima-alta-personas__grid3",style:{marginTop:16},children:[l.jsx(d0,{id:"persona-genero",label:Z("persona.alta.genero",{defaultValue:"Género"}),options:o,value:k.genero,onChange:ue("genero")}),l.jsx(d0,{id:"persona-nacionalidad",label:Z("persona.alta.nacionalidad",{defaultValue:"Nacionalidad"}),options:i,value:k.nacionalidad,onChange:ue("nacionalidad")}),l.jsx("div",{})]})]}),l.jsx(x0,{title:Z("persona.alta.sectionId",{defaultValue:"Identificación"}),style:{marginTop:16},children:l.jsxs("div",{className:"anima-alta-personas__grid3",children:[l.jsx(d0,{id:"persona-paisEmision",label:Z("persona.alta.paisEmision",{defaultValue:"País de emisión"}),options:d,value:k.paisEmision,onChange:ue("paisEmision")}),l.jsx(d0,{id:"persona-tipoDoc",label:Z("persona.alta.tipoDocumento",{defaultValue:"Tipo de documento"}),options:c,value:k.tipoDocumento,onChange:ue("tipoDocumento")}),l.jsx(l0,{id:"persona-numDoc",label:Z("persona.alta.numeroDocumento",{defaultValue:"Número de documento"}),placeholder:Z("persona.alta.ph.numeroDocumento",{defaultValue:"Ingresa tu N° de documento"}),value:k.numeroDocumento,onChange:ue("numeroDocumento")})]})}),l.jsx(x0,{title:Z("persona.alta.sectionContact",{defaultValue:"Contacto"}),style:{marginTop:16},children:l.jsxs("div",{className:"anima-alta-personas__grid4",children:[l.jsx("div",{className:"anima-alta-personas__contact-span2",children:l.jsx(l0,{id:"persona-email",type:"email",label:Z("persona.alta.emailPersonal",{defaultValue:"Email personal"}),placeholder:Z("persona.alta.ph.email",{defaultValue:"Ingresa tu email"}),value:k.emailPersonal,onChange:ue("emailPersonal")})}),l.jsx("div",{className:"anima-alta-personas__contact-span2",children:l.jsx(l0,{id:"persona-tel",type:"tel",label:Z("persona.alta.telefonoMovil",{defaultValue:"Teléfono móvil"}),placeholder:Z("persona.alta.ph.telefono",{defaultValue:"Ingresa tu teléfono"}),value:k.telefonoMovil,onChange:ue("telefonoMovil")})})]})}),l.jsxs(x0,{title:Z("persona.alta.sectionAddress",{defaultValue:"Dirección"}),style:{marginTop:16},children:[l.jsxs("div",{className:"anima-alta-personas__grid4 anima-alta-personas__grid4-dir",children:[l.jsx(l0,{id:"persona-calle",label:Z("persona.alta.calle",{defaultValue:"Calle"}),value:k.calle,onChange:ue("calle")}),l.jsx(l0,{id:"persona-numero",label:Z("persona.alta.numero",{defaultValue:"Número"}),value:k.numero,onChange:ue("numero")}),l.jsx(l0,{id:"persona-piso",label:Z("persona.alta.piso",{defaultValue:"Piso"}),value:k.piso,onChange:ue("piso")}),l.jsx(l0,{id:"persona-depto",label:Z("persona.alta.departamento",{defaultValue:"Departamento"}),value:k.departamento,onChange:ue("departamento")})]}),l.jsxs("div",{className:"anima-alta-personas__grid4",style:{marginTop:16},children:[l.jsx(d0,{id:"persona-pais",label:Z("persona.alta.pais",{defaultValue:"País"}),options:d,value:k.pais,onChange:ue("pais")}),l.jsx(d0,{id:"persona-provincia",label:Z("persona.alta.provincia",{defaultValue:"Provincia"}),options:u,value:k.provincia,onChange:ue("provincia")}),l.jsx(l0,{id:"persona-ciudad",label:Z("persona.alta.ciudad",{defaultValue:"Ciudad"}),placeholder:Z("persona.alta.ph.ciudad",{defaultValue:"Ingresa tu ciudad"}),value:k.ciudad,onChange:ue("ciudad")}),l.jsx(l0,{id:"persona-cp",label:Z("persona.alta.codigoPostal",{defaultValue:"Código postal"}),placeholder:Z("persona.alta.ph.codigoPostal",{defaultValue:"Ingresa tu CP"}),value:k.codigoPostal,onChange:ue("codigoPostal")})]})]}),l.jsxs(x0,{title:Z("persona.alta.sectionExtra",{defaultValue:"Información adicional"}),style:{marginTop:16},children:[l.jsx("label",{htmlFor:"persona-notas-adic",style:bW,children:Z("persona.alta.notasAdicionales",{defaultValue:"Notas adicionales"})}),l.jsx("textarea",{id:"persona-notas-adic",value:k.notasAdicionales,onChange:ue("notasAdicionales"),style:xW})]})]}),J=s??l.jsxs("div",{style:{...Xa,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",width:"100%",maxWidth:"380px",maxHeight:"280px",margin:"0 auto",padding:"24px",boxSizing:"border-box",overflowY:"auto"},role:"status","aria-live":"polite",children:[l.jsx("div",{style:{background:"#E8F4F8",borderRadius:"20px",padding:"16px",marginBottom:"24px",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center"},"aria-hidden":!0,children:l.jsx($,{name:"InformationCircleIcon",variant:"24-outline",size:56,style:{color:"#38656D",flexShrink:0}})}),l.jsx("h2",{style:{fontFamily:F,fontWeight:400,fontStyle:"normal",fontSize:"24px",lineHeight:"36px",letterSpacing:"0",textAlign:"center",color:"#29474C",margin:"0 0 12px 0"},children:Z("persona.alta.laboralesTitle",{defaultValue:"Datos Laborales"})}),l.jsxs("p",{style:{fontFamily:F,fontWeight:400,fontStyle:"normal",fontSize:"14px",lineHeight:"21px",letterSpacing:"0.01em",textAlign:"center",color:"#5F5F5F",margin:0,maxWidth:"100%"},children:[Z("persona.alta.laboralesSoonLine1",{defaultValue:"Estamos trabajando para traerte esta"}),l.jsx("br",{}),Z("persona.alta.laboralesSoonLine2",{defaultValue:"funcionalidad muy pronto."})]})]});return l.jsxs("div",{className:`anima-alta-personas ${O}`,style:{width:"100%",maxWidth:"100%",minHeight:"100%",background:"transparent",padding:"24px",boxSizing:"border-box",...D},...B,children:[l.jsx("style",{children:vW}),l.jsx("header",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:"16px",flexWrap:"wrap",marginBottom:"8px"},children:l.jsx(C,{variant:"h5",style:{fontFamily:F,fontWeight:500,fontStyle:"normal",fontSize:"24px",lineHeight:"36px",letterSpacing:"0",verticalAlign:"middle",color:"#29474C",margin:0,textAlign:"left"},children:q})}),l.jsx("div",{className:"anima-alta-personas__tabs-wrap",children:l.jsx("nav",{className:"anima-alta-personas__tabs-nav","aria-label":"Secciones",children:Ne.map((re,ee)=>l.jsx("button",{type:"button",onClick:()=>I(ee),className:P===ee?"anima-alta-personas__tab anima-alta-personas__tab--active":"anima-alta-personas__tab",children:re.label},re.id))})}),P===0?xe:J,P===0?l.jsxs("footer",{className:"anima-alta-personas__footer-actions","aria-label":Z("persona.alta.footerActionsLabel",{defaultValue:"Acciones del formulario"}),children:[l.jsx(r0,{type:"button",variant:"outline",text:Z("persona.alta.cancel",{defaultValue:"Cancelar"}),onClick:t,style:ca,textStyle:u5}),l.jsx(r0,{type:"button",text:Z("persona.alta.save",{defaultValue:"Guardar"}),onClick:we,style:ca,textStyle:u5})]}):null]})},Ka=2*1024*1024,Qa=["image/jpeg","image/png"];function yW(a,r={}){if(!a)return"";const n=r.maxBytes??Ka,t=r.acceptMime??Qa,o=(a.type||"").toLowerCase();return t.includes(o)?a.size>n?"El archivo supera el tamaño máximo permitido (2 Mb).":"":"La imagen debe ser JPG o PNG."}const da=768,ua={info:"LinkSlashIcon",error:"LinkSlashIcon",success:"LinkSlashIcon"},fa={info:"blue-600",error:"red-600",success:"green-600"},EW=({text:a="",type:r="info",className:n="",style:t,...o})=>{const i={info:"#2563EB",error:"#FF0000",success:"#16A34A"},c=i[r]??i.info,d=ua[r]??ua.info,u=fa[r]??fa.info,[s,f]=g.useState(()=>typeof window<"u"?window.innerWidth<=da:!1),[h,m]=g.useState(!1),p=g.useRef(null);g.useEffect(()=>{const x=()=>f(window.innerWidth<=da);return window.addEventListener("resize",x),()=>window.removeEventListener("resize",x)},[]);const b=()=>{const x=p.current;x&&m(x.scrollWidth>x.clientWidth)},j=x=>{p.current=x,x&&requestAnimationFrame(b)};return g.useEffect(()=>{let x;const y=requestAnimationFrame(()=>{b();const v=p.current;v&&(x=new ResizeObserver(()=>requestAnimationFrame(b)),x.observe(v))});return()=>{cancelAnimationFrame(y),x&&x.disconnect()}},[a,s]),l.jsxs("div",{className:`anima-badgeinformativo ${n}`,style:{minHeight:"30px",height:s?"auto":"30px",width:s?"100%":"fit-content",maxWidth:s?"100%":void 0,marginLeft:s?0:"10px",marginRight:s?0:"10px",borderRadius:"8px",border:`1px solid ${c}`,backgroundColor:"#FFFFFF",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"flex-start",paddingTop:s?"0.5rem":void 0,paddingBottom:s?"0.5rem":void 0,paddingLeft:"1rem",paddingRight:"1rem",gap:"1rem",...t},...o,children:[l.jsx($,{name:d,size:16,color:u,strokeWidth:2,style:{flexShrink:0,...r==="error"?{color:"#FF0000"}:{}}}),l.jsx("div",{style:{minWidth:0,flex:1,overflow:s?"visible":"hidden",display:"flex",alignItems:"center",alignSelf:"stretch",height:s?void 0:"100%"},children:!s&&h?l.jsx(Ea,{content:a,position:"bottom",style:{width:"100%",display:"flex",alignItems:"center"},children:l.jsx("span",{ref:j,style:{color:c,fontFamily:F,fontWeight:400,fontStyle:"normal",fontSize:"14px",lineHeight:"21px",letterSpacing:"0%",direction:"ltr",textAlign:"left",verticalAlign:"middle",textTransform:"uppercase",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"block"},children:a})}):l.jsx("span",{ref:j,style:{color:c,fontFamily:F,fontWeight:400,fontStyle:"normal",fontSize:"14px",lineHeight:"21px",letterSpacing:"0%",direction:"ltr",textAlign:"left",verticalAlign:"middle",textTransform:"uppercase",whiteSpace:s?"normal":"nowrap",overflow:s?"visible":"hidden",textOverflow:s?void 0:"ellipsis",display:"block",wordBreak:s?"break-word":void 0},children:a})})]})},ma=769,ha=768,jW=({title:a="Configuración inicial",titleStyle:r,titleClassName:n="",badgeText:t="Contenido sin funcionalidad definida, no conectado a Backend.",badgeType:o="error",children:i,slotStates:c=["Completado","Completado","Pendiente","Pendiente","Pendiente"],slotTitles:d=["Tenant configurado (nombre/idioma/timezone/logo)","Administradores existentes (al menos 1)","Integración SSO/AD","Configuración de Roles RBAC","Empresas"],slotSubtitles:u=["Parámetros básicos de identidad y localización definidos.","Acceso técnico de administración garantizado.","Conexión con el proveedor de identidad externa.","Definición de matrices de permisos y perfiles.","Carga de razones sociales y estructura legal."],onSlotStateChange:s,containerStyle:f,containerClassName:h="",titleContainerStyle:m,titleContainerClassName:p="",contentContainerStyle:b,contentContainerClassName:j="",className:x="",...y})=>{const{t:v}=je.useTranslation(),R=v("overview.taskCompleted",{defaultValue:"Completado"}),E=D=>{const B=String(D??"").trim().toLowerCase();return B===String(R).trim().toLowerCase()||B==="completado"||B==="completed"},[M,H]=g.useState(()=>typeof window<"u"?window.innerWidth<=ma:!1),[A,L]=g.useState(()=>typeof window<"u"?window.innerWidth>ha:!0),O=()=>{const D=window.innerWidth;H(D<=ma),L(D>ha)};return g.useLayoutEffect(()=>{O()},[]),g.useEffect(()=>(window.addEventListener("resize",O),()=>window.removeEventListener("resize",O)),[]),l.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",gap:"1rem"},children:[l.jsx(EW,{text:t,type:o}),l.jsxs("div",{className:`anima-configuracionoverview__container ${h} ${x}`,style:{width:"100%",minWidth:0,height:A?"490px":"auto",minHeight:A?void 0:"490px",borderRadius:"var(--radius-16, 16px)",border:"1px solid var(--color-grey-200, #c4c4c4)",backgroundColor:"var(--color-neutrals-white, #FFFFFF)",boxSizing:"border-box",display:"flex",flexDirection:"column",overflow:"hidden",...f||{}},...y,children:[l.jsx("div",{className:`anima-configuracionoverview__title-container ${p}`,style:{width:"100%",minHeight:0,flexShrink:0,paddingTop:"24px",paddingRight:"var(--space-16, 1rem)",paddingBottom:"4px",paddingLeft:"var(--space-16, 1rem)",gap:"8px",opacity:1,boxSizing:"border-box",display:"flex",flexDirection:"column",...m||{}},children:l.jsxs("div",{style:{width:"100%",minHeight:0,minWidth:0,boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"12px"},children:[a&&l.jsx(C,{variant:"h5",className:n,style:{fontFamily:F,fontWeight:500,fontStyle:"normal",fontSize:"24px",lineHeight:"36px",letterSpacing:"0%",verticalAlign:"middle",color:"var(--color-cyan-19)",margin:0,flex:"1 1 auto",minWidth:0,...r||{}},children:a}),A&&l.jsx("div",{style:{flexShrink:0,height:"24px",display:"flex",alignItems:"center"},children:l.jsxs(u0,{variant:"success",size:"small",className:"anima-configuracionoverview__title-badge",style:{height:"24px",minWidth:"96px",opacity:1,borderRadius:"var(--radius-16, 16px)",paddingTop:"2px",paddingRight:"12px",paddingBottom:"4px",paddingLeft:"12px",backgroundColor:"var(--color-cyan-82, #B8E2E9)",fontFamily:Be,fontWeight:400,fontStyle:"normal",fontSize:"12px",lineHeight:"18px",letterSpacing:"0%",textAlign:"right",verticalAlign:"middle",color:"var(--color-grey-700, #474747)",display:"inline-flex",alignItems:"center",justifyContent:"flex-end",boxSizing:"border-box"},children:[c.filter(D=>E(D)).length," ",v("overview.completedTasks",{defaultValue:"Tareas completadas"})]})})]})}),i!=null&&l.jsx("div",{className:`anima-configuracionoverview__content ${j}`,style:{width:"100%",minWidth:0,minHeight:0,flex:"1 1 auto",paddingTop:"16px",paddingRight:M?"16px":"24px",paddingBottom:"24px",paddingLeft:M?"16px":"24px",opacity:1,boxSizing:"border-box",display:"flex",flexDirection:"column",gap:"24px",...b||{}},children:i}),l.jsx("div",{className:"anima-configuracionoverview__bottom-panel",style:{width:"100%",minWidth:0,height:A?"424px":"auto",flexShrink:0,margin:0,paddingLeft:"var(--space-16, 1rem)",paddingRight:"var(--space-16, 1rem)",paddingTop:A?0:"var(--space-16, 1rem)",paddingBottom:"var(--space-16, 1rem)",boxSizing:"border-box",display:"flex",flexDirection:"column",overflow:"hidden"},children:[0,1,2,3,4].map(D=>{const B=E(c[D])?R:"Pendiente",Z=B===R?"CheckCircleIcon":"EllipsisHorizontalCircleIcon",W=B===R?{flexShrink:0,fill:"#D3FFDF",stroke:"var(--misc-exito-info, #0A742C)"}:{flexShrink:0,color:"var(--color-grey-400, #919191)"},P=()=>{typeof s=="function"&&s(D,B===R?"Pendiente":R)},I=se=>{typeof s=="function"&&(se.key==="Enter"||se.key===" ")&&(se.preventDefault(),P())},T=typeof s=="function",k=B===R?"var(--color-cyan-19)":"var(--color-grey-600, #5F5F5F)",ce=d[D]??"",U=u[D]??"",_={fontFamily:F,fontWeight:500,fontStyle:"normal",fontSize:"16px",lineHeight:"24px",letterSpacing:"0%",verticalAlign:"middle",color:k,margin:0},Y={fontFamily:F,fontWeight:400,fontStyle:"normal",fontSize:"16px",lineHeight:"24px",letterSpacing:"0%",verticalAlign:"middle",color:k,margin:0};return l.jsx("div",{className:"anima-configuracionoverview__bottom-panel-slot",style:{width:"100%",minHeight:A?"80px":"116px",flexShrink:0,boxSizing:"border-box",display:"flex",alignItems:A?"center":"flex-start",justifyContent:"center",...D<4?{borderBottom:"1px solid #E5E5E5"}:{}},children:l.jsxs("div",{className:"anima-configuracionoverview__bottom-panel-slot-inner",role:T?"button":void 0,tabIndex:T?0:void 0,onClick:T?P:void 0,onKeyDown:T?I:void 0,style:{width:"100%",minHeight:A?"48px":void 0,height:A?void 0:"auto",flexShrink:0,boxSizing:"border-box",display:"flex",flexDirection:A?"row":"column",alignItems:A?"center":"stretch",alignSelf:"stretch",paddingLeft:A?"12px":0,paddingTop:A?0:"12px",paddingBottom:A?0:"12px",gap:"12px",...T?{cursor:"pointer"}:{}},children:[A&&l.jsx($,{name:Z,size:24,style:W}),l.jsxs("div",{style:{flex:A?"1 1 0":"0 0 auto",minWidth:0,minHeight:"48px",display:"flex",flexDirection:"column",gap:0},children:[l.jsx("div",{className:"anima-configuracionoverview__slot-inner-green",style:{width:"100%",minHeight:"24px",flexShrink:0,boxSizing:"border-box",display:"flex",alignItems:"flex-start",paddingRight:"12px"},children:l.jsx(C,{component:"span",style:{..._,wordBreak:"break-word",overflowWrap:"break-word",display:"block"},children:ce||" "})}),l.jsx("div",{className:"anima-configuracionoverview__slot-inner-green",style:{width:"100%",minHeight:"24px",flexShrink:0,boxSizing:"border-box",display:"flex",alignItems:"flex-start",paddingRight:"12px"},children:l.jsx(C,{component:"span",style:{...Y,wordBreak:"break-word",overflowWrap:"break-word",display:"block"},children:U||" "})})]}),l.jsx("div",{style:{flexShrink:0,height:"24px",display:"flex",alignItems:"center",...A?{}:{marginTop:"8px"}},children:l.jsx(u0,{variant:B===R?"success":"danger",size:"small",className:"anima-configuracionoverview__slot-badge",style:{width:"96px",height:"24px",opacity:1,borderRadius:"var(--radius-16, 16px)",borderWidth:"1px",borderStyle:"solid",borderColor:B===R?"var(--color-status-success, #0A742C)":"var(--color-status-warning, #CC4908)",paddingTop:"2px",paddingRight:"12px",paddingBottom:"4px",paddingLeft:"12px",backgroundColor:B===R?"var(--misc-exito-fondo, #D3FFDF)":"var(--color-neutrals-white, #FFFFFF)",fontFamily:Be,fontWeight:400,fontStyle:"normal",fontSize:"12px",lineHeight:"18px",letterSpacing:"0%",textAlign:B===R?"right":"center",verticalAlign:"middle",color:B===R?"var(--color-status-success, #0A742C)":"var(--color-status-warning, #CC4908)",display:"inline-flex",alignItems:"center",justifyContent:B===R?"flex-end":"center",boxSizing:"border-box"},children:B===R?R:"Pendiente"})})]})},D)})})]})]})},CW=`
1510
1510
  .anima-configuracionusuarios__container .anima-tabla__search-input::placeholder {
1511
1511
  font-family: var(--font-family-sans);
1512
1512
  font-weight: 400;
@@ -48830,6 +48830,16 @@ const qW = ({
48830
48830
  ] })
48831
48831
  ] }),
48832
48832
  /* @__PURE__ */ l.jsx(E0, { title: A("persona.alta.sectionId", { defaultValue: "Identificación" }), style: { marginTop: 16 }, children: /* @__PURE__ */ l.jsxs("div", { className: "anima-alta-personas__grid3", children: [
48833
+ /* @__PURE__ */ l.jsx(
48834
+ m0,
48835
+ {
48836
+ id: "persona-paisEmision",
48837
+ label: A("persona.alta.paisEmision", { defaultValue: "País de emisión" }),
48838
+ options: d,
48839
+ value: Z.paisEmision,
48840
+ onChange: ue("paisEmision")
48841
+ }
48842
+ ),
48833
48843
  /* @__PURE__ */ l.jsx(
48834
48844
  m0,
48835
48845
  {
@@ -48851,16 +48861,6 @@ const qW = ({
48851
48861
  value: Z.numeroDocumento,
48852
48862
  onChange: ue("numeroDocumento")
48853
48863
  }
48854
- ),
48855
- /* @__PURE__ */ l.jsx(
48856
- m0,
48857
- {
48858
- id: "persona-paisEmision",
48859
- label: A("persona.alta.paisEmision", { defaultValue: "País de emisión" }),
48860
- options: d,
48861
- value: Z.paisEmision,
48862
- onChange: ue("paisEmision")
48863
- }
48864
48864
  )
48865
48865
  ] }) }),
48866
48866
  /* @__PURE__ */ l.jsx(E0, { title: A("persona.alta.sectionContact", { defaultValue: "Contacto" }), style: { marginTop: 16 }, children: /* @__PURE__ */ l.jsxs("div", { className: "anima-alta-personas__grid4", children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anima-ds-nucleus",
3
- "version": "1.0.89",
3
+ "version": "1.0.90",
4
4
  "description": "Anima Design System - A comprehensive React component library",
5
5
  "author": "Nucleus Labs <ipvasallo@nucleus.com.ar>",
6
6
  "license": "UNLICENSED",
@@ -738,6 +738,13 @@ export const AltaEdicionPersonas = ({
738
738
 
739
739
  <SectionCard title={t('persona.alta.sectionId', { defaultValue: 'Identificación' })} style={{ marginTop: 16 }}>
740
740
  <div className="anima-alta-personas__grid3">
741
+ <PrimarySelect
742
+ id="persona-paisEmision"
743
+ label={t('persona.alta.paisEmision', { defaultValue: 'País de emisión' })}
744
+ options={paisOptions}
745
+ value={form.paisEmision}
746
+ onChange={update('paisEmision')}
747
+ />
741
748
  <PrimarySelect
742
749
  id="persona-tipoDoc"
743
750
  label={t('persona.alta.tipoDocumento', { defaultValue: 'Tipo de documento' })}
@@ -754,13 +761,6 @@ export const AltaEdicionPersonas = ({
754
761
  value={form.numeroDocumento}
755
762
  onChange={update('numeroDocumento')}
756
763
  />
757
- <PrimarySelect
758
- id="persona-paisEmision"
759
- label={t('persona.alta.paisEmision', { defaultValue: 'País de emisión' })}
760
- options={paisOptions}
761
- value={form.paisEmision}
762
- onChange={update('paisEmision')}
763
- />
764
764
  </div>
765
765
  </SectionCard>
766
766