prometeo-design-system 1.0.5 → 1.0.6
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.
|
@@ -1511,7 +1511,7 @@ const es = ({ sessionsShow: a, handleTokenLogin: t, onClickLogout: e, menuRef: r
|
|
|
1511
1511
|
const l = t(s.path) || (s.relatedPaths?.some(
|
|
1512
1512
|
(u) => t(u)
|
|
1513
1513
|
) ?? !1);
|
|
1514
|
-
return s.isView && s.
|
|
1514
|
+
return s.isView && s.viewAccess() && /* @__PURE__ */ d.jsxs(
|
|
1515
1515
|
N.div,
|
|
1516
1516
|
{
|
|
1517
1517
|
initial: { opacity: 0 },
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
22
|
<%s key={someKey} {...props} />`,K,st,fe,st),Jt[st+K]=!0)}if(st=null,A!==void 0&&(e(A),st=""+A),s(j)&&(e(j.key),st=""+j.key),"key"in j){A={};for(var Mr in j)Mr!=="key"&&(A[Mr]=j[Mr])}else A=j;return st&&o(A,typeof w=="function"?w.displayName||w.name||"Unknown":w),u(w,st,et,tt,i(),A,Ar,Nr)}function c(w){typeof w=="object"&&w!==null&&w.$$typeof===p&&w._store&&(w._store.validated=1)}var _=V,p=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),b=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),P=Symbol.for("react.client.reference"),N=_.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,E=Object.prototype.hasOwnProperty,M=Array.isArray,X=console.createTask?console.createTask:function(){return null};_={react_stack_bottom_frame:function(w){return w()}};var W,U={},G=_.react_stack_bottom_frame.bind(_,n)(),ct=X(r(n)),Jt={};ce.Fragment=h,ce.jsx=function(w,j,A,K,tt){var et=1e4>N.recentlyCreatedOwnerStacks++;return f(w,j,A,!1,K,tt,et?Error("react-stack-top-frame"):G,et?X(r(w)):ct)},ce.jsxs=function(w,j,A,K,tt){var et=1e4>N.recentlyCreatedOwnerStacks++;return f(w,j,A,!0,K,tt,et?Error("react-stack-top-frame"):G,et?X(r(w)):ct)}})()),ce}var Fr;function mn(){return Fr||(Fr=1,process.env.NODE_ENV==="production"?Oe.exports=_n():Oe.exports=pn()),Oe.exports}var d=mn();function L(...a){return un.twMerge(ln.clsx(a))}const gn={filled:{primary:L("bg-primary-default-default text-neutral-strong-default border-0 cursor-pointer flex items-center justify-center","hover:bg-primary-default-hover hover:text-neutral-strong-hover","focus:bg-primary-default-pressed focus:text-neutral-strong-focused","active:bg-primary-pressed active:text-neutral-strong-pressed","disabled:bg-primary-medium-disabled disabled:text-neutral-strong-disabled"),secondary:L("bg-neutral-strong-medium-default flex items-center justify-center text-neutral-strong-default","hover:bg-neutral-medium-hover hover:text-neutral-strong-hover","focus:bg-neutral-medium-pressed focus:text-neutral-strong-pressed","active:bg-neutral-medium-pressed","disabled:bg-primary-default-disabled disabled:text-neutral-strong-disabled")},outline:{primary:L("bg-transparent text-primary-medium-default border-1 border-primary-medium-default flex items-center justify-center","hover:bg-neutral-default-hover hover:text-primary-medium-hover hover:border-primary-medium-hover","focus:bg-neutral-default-pressed focus:text-primary-medium-pressed focus:border-primary-medium-pressed","active:bg-neutral-default-pressed active:text-primary-medium-pressed active:border-primary-medium-pressed","disabled:border-primary-disabled disabled:text-primary-disabled disabled:bg-transparent"),secondary:L("bg-transparent text-neutral-strong-default border-1 border-neutral-strong-default flex items-center justify-center","hover:bg-neutral-default-hover hover:text-neutral-strong-hover hover:border-neutral-strong-hover","focus:bg-neutral-default-pressed focus:text-neutral-strong-pressed focus:border-neutral-strong-pressed","active:bg-neutral-default-pressed active:text-neutral-strong-pressed active:border-neutral-strong-pressed","disabled:border-neutral-disabled disabled:text-neutral-disabled disabled:bg-transparent")},text:{primary:L("bg-transparent text-primary-medium-default border-0 flex items-center justify-center","hover:bg-neutral-default-hover hover:text-primary-medium-hover","focus:bg-neutral-default-pressed focus:text-primary-medium-pressed","active:bg-neutral-default-pressed active:text-primary-medium-pressed","disabled:text-primary-medium-disabled disabled:bg-transparent"),secondary:L("bg-transparent text-neutral-strong-default border-0 flex items-center justify-center","hover:bg-neutral-default-hover hover:text-primary-default-hover","focus:bg-neutral-default-pressed focus:text-primary-medium-pressed","active:bg-neutral-default-pressed active:text-primary-medium-pressed","disabled:text-primary-medium-disabled disabled:bg-transparent")}},vn={small:"h-[40px] min-w-[123px] px-2 py-3 text-sm rounded-md text-sm font-semibold",medium:"h-[48px] min-w-[134px] px-2 py-3 font-semibold text-base rounded-md",large:"h-[56px] min-w-[145px] px-4 py-3 text-base rounded-md font-semibold"};function xn({label:a,onClick:t,icon:e,classButton:r,classButtonText:i,animate:n=!0,animateIcon:s=!0,isLoading:o=!1,disabled:l=!1,type:u="button",variant:f="filled",color:c="primary",size:_="medium",children:p,Spinner:m}){const h=R.useAnimationControls(),g=()=>{!n||l||o||!s||h.start({rotate:90})},v=()=>{!n||l||o||!s||h.start({rotate:0})},y=r||L(gn[f][c],vn[_],(l||o)&&"opacity-50 cursor-not-allowed","focus:outline-none");return d.jsx(R.motion.button,{onClick:t,className:y,whileHover:n&&!l&&!o?{scale:1.05}:{},whileTap:n&&!l&&!o?{scale:.98}:{},transition:{type:"spring",stiffness:400,damping:17},onHoverStart:g,onHoverEnd:v,disabled:l||o,type:u,children:o?d.jsxs("div",{className:"flex items-center gap-2",children:[m,_!=="small"&&d.jsx("span",{children:"Cargando..."})]}):p||d.jsxs("span",{className:L("flex items-center indent-1",i),children:[e&&d.jsx(R.motion.div,{animate:s?h:void 0,transition:{type:"spring",stiffness:400,damping:17},children:e}),a&&d.jsx("span",{children:a})]})})}const yn=({label:a,icon:t,onChange:e,value:r="",debounceMs:i=0,name:n,width:s="100%",height:o="56px",className:l,id:u,isFetching:f=!1,placeholder:c="",disabled:_=!1,required:p=!1,error:m,type:h="text"})=>{const g=V.useId(),v=u||g,[y,b]=V.useState(r),[T,x]=V.useState(!1),[C]=fn.useDebounce(y,i>0?i:0);V.useEffect(()=>{b(r)},[r]),V.useEffect(()=>{i>0&&C!==r&&e(C)},[C,i,e,r]);const S=N=>{const E=N.target.value;b(E),i===0&&e(E)},O=y.length>0,q=m&&!T,P=T||O;return d.jsxs("div",{className:L("relative w-72",l),style:{width:s,height:o},children:[d.jsxs("div",{className:L("relative w-72 h-full","border-2 rounded-lg transition-all duration-200","bg-white hover:bg-gray-50",!m&&!T&&"border-gray-300",!m&&T&&"border-blue-500 ring-2 ring-blue-200",q&&"border-red-500 ring-2 ring-red-200",_&&"bg-gray-100 border-gray-200 cursor-not-allowed",t?"pl-12":"pl-4","pr-4"),children:[t&&d.jsx(R.motion.div,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 z-10",animate:{y:P?[-2,0]:0,rotate:T?[0,-10,10,-10,10,0]:0},transition:{duration:.7},children:d.jsx("span",{className:L("text-lg transition-colors duration-200",!m&&!P&&"text-gray-400",!m&&P&&"text-blue-500",q&&"text-red-500",_&&"text-gray-300"),children:t})}),d.jsx("input",{id:v,type:h,className:L("w-full h-full bg-transparent border-none outline-none","text-gray-900 text-base transition-all duration-200","placeholder-transparent","pt-6 pb-2",_&&"cursor-not-allowed text-gray-400","focus:outline-none"),name:n,value:y,placeholder:T?c:"",disabled:_,required:p,onFocus:()=>x(!0),onBlur:()=>x(!1),onChange:S,"aria-invalid":!!m,"aria-describedby":m?`${v}-error`:void 0}),d.jsxs(R.motion.label,{htmlFor:v,className:L("absolute left-0 top-1/2 transform origin-left cursor-text","transition-all duration-200 pointer-events-none select-none","text-gray-500 font-medium",t?"ml-12":"ml-4",!m&&!P&&"text-gray-500",!m&&P&&"text-blue-600",q&&"text-red-500",_&&"text-gray-400"),animate:{y:P?-20:-8,scale:P?.85:1},transition:{duration:.2,ease:"easeOut"},children:[a,p&&d.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),f&&d.jsx(R.motion.div,{className:"absolute right-3 top-1/2 transform -translate-y-1/2",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:d.jsx("div",{className:L("w-5 h-5 border-2 border-gray-300 border-t-blue-500","rounded-full animate-spin")})})]}),m&&d.jsx(R.motion.span,{id:`${v}-error`,className:L("block mt-1 text-sm text-red-500 font-medium","px-1"),initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},role:"alert",children:m})]})},wn=V.memo(yn),Lt={Ticket:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"M480-280q17 0 28.5-11.5T520-320q0-17-11.5-28.5T480-360q-17 0-28.5 11.5T440-320q0 17 11.5 28.5T480-280Zm0-160q17 0 28.5-11.5T520-480q0-17-11.5-28.5T480-520q-17 0-28.5 11.5T440-480q0 17 11.5 28.5T480-440Zm0-160q17 0 28.5-11.5T520-640q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640q0 17 11.5 28.5T480-600Zm320 440H160q-33 0-56.5-23.5T80-240v-160q33 0 56.5-23.5T160-480q0-33-23.5-56.5T80-560v-160q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v160q-33 0-56.5 23.5T800-480q0 33 23.5 56.5T880-400v160q0 33-23.5 56.5T800-160Zm0-80v-102q-37-22-58.5-58.5T720-480q0-43 21.5-79.5T800-618v-102H160v102q37 22 58.5 58.5T240-480q0 43-21.5 79.5T160-342v102h640ZM480-480Z"})}),Home:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"M240-200h120v-240h240v240h120v-360L480-740 240-560v360Zm-80 80v-480l320-240 320 240v480H520v-240h-80v240H160Zm320-350Z"})}),Boards:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm360-80h100v-480H520v480Zm-180 0h100v-480H340v480Zm-180 0h100v-480H160v480Zm540 0h100v-480H700v480Z"})}),Notifications:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"M160-200v-80h80v-280q0-83 50-147.5T420-792v-28q0-25 17.5-42.5T480-880q25 0 42.5 17.5T540-820v28q80 20 130 84.5T720-560v280h80v80H160Zm320-300Zm0 420q-33 0-56.5-23.5T400-160h160q0 33-23.5 56.5T480-80ZM320-280h320v-280q0-66-47-113t-113-47q-66 0-113 47t-47 113v280Z"})}),Help:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"M478-240q21 0 35.5-14.5T528-290q0-21-14.5-35.5T478-340q-21 0-35.5 14.5T428-290q0 21 14.5 35.5T478-240Zm-36-154h74q0-33 7.5-52t42.5-52q26-26 41-49.5t15-56.5q0-56-41-86t-97-30q-57 0-92.5 30T342-618l66 26q5-18 22.5-39t53.5-21q32 0 48 17.5t16 38.5q0 20-12 37.5T506-526q-44 39-54 59t-10 73Zm38 314q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"})}),Settings:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"m370-80-16-128q-13-5-24.5-12T307-235l-119 50L78-375l103-78q-1-7-1-13.5v-27q0-6.5 1-13.5L78-585l110-190 119 50q11-8 23-15t24-12l16-128h220l16 128q13 5 24.5 12t22.5 15l119-50 110 190-103 78q1 7 1 13.5v27q0 6.5-2 13.5l103 78-110 190-118-50q-11 8-23 15t-24 12L590-80H370Zm70-80h79l14-106q31-8 57.5-23.5T639-327l99 41 39-68-86-65q5-14 7-29.5t2-31.5q0-16-2-31.5t-7-29.5l86-65-39-68-99 42q-22-23-48.5-38.5T533-694l-13-106h-79l-14 106q-31 8-57.5 23.5T321-633l-99-41-39 68 86 64q-5 15-7 30t-2 32q0 16 2 31t7 30l-86 65 39 68 99-42q22 23 48.5 38.5T427-266l13 106Zm42-180q58 0 99-41t41-99q0-58-41-99t-99-41q-59 0-99.5 41T342-480q0 58 40.5 99t99.5 41Zm-2-140Z"})}),CrevronLeft:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"M560-240 320-480l240-240 56 56-184 184 184 184-56 56Z"})}),CrevronRight:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z"})}),ArrowLeft:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"M400-240 160-480l240-240 56 58-142 142h486v80H314l142 142-56 58Z"})}),Shared:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"M680-80q-50 0-85-35t-35-85q0-6 3-28L282-392q-16 15-37 23.5t-45 8.5q-50 0-85-35t-35-85q0-50 35-85t85-35q24 0 45 8.5t37 23.5l281-164q-2-7-2.5-13.5T560-760q0-50 35-85t85-35q50 0 85 35t35 85q0 50-35 85t-85 35q-24 0-45-8.5T598-672L317-508q2 7 2.5 13.5t.5 14.5q0 8-.5 14.5T317-452l281 164q16-15 37-23.5t45-8.5q50 0 85 35t35 85q0 50-35 85t-85 35Zm0-80q17 0 28.5-11.5T720-200q0-17-11.5-28.5T680-240q-17 0-28.5 11.5T640-200q0 17 11.5 28.5T680-160ZM200-440q17 0 28.5-11.5T240-480q0-17-11.5-28.5T200-520q-17 0-28.5 11.5T160-480q0 17 11.5 28.5T200-440Zm480-280q17 0 28.5-11.5T720-760q0-17-11.5-28.5T680-800q-17 0-28.5 11.5T640-760q0 17 11.5 28.5T680-720Zm0 520ZM200-480Zm480-280Z"})}),ChevronDown:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"M480-345 240-585l56-56 184 183 184-183 56 56-240 240Z"})}),Collapse:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"M440-440v240h-80v-160H200v-80h240Zm160-320v160h160v80H520v-240h80Z"})}),Calendar:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"M200-80q-33 0-56.5-23.5T120-160v-560q0-33 23.5-56.5T200-800h40v-80h80v80h320v-80h80v80h40q33 0 56.5 23.5T840-720v560q0 33-23.5 56.5T760-80H200Zm0-80h560v-400H200v400Zm0-480h560v-80H200v80Zm0 0v-80 80Zm280 240q-17 0-28.5-11.5T440-440q0-17 11.5-28.5T480-480q17 0 28.5 11.5T520-440q0 17-11.5 28.5T480-400Zm-160 0q-17 0-28.5-11.5T280-440q0-17 11.5-28.5T320-480q17 0 28.5 11.5T360-440q0 17-11.5 28.5T320-400Zm320 0q-17 0-28.5-11.5T600-440q0-17 11.5-28.5T640-480q17 0 28.5 11.5T680-440q0 17-11.5 28.5T640-400ZM480-240q-17 0-28.5-11.5T440-280q0-17 11.5-28.5T480-320q17 0 28.5 11.5T520-280q0 17-11.5 28.5T480-240Zm-160 0q-17 0-28.5-11.5T280-280q0-17 11.5-28.5T320-320q17 0 28.5 11.5T360-280q0 17-11.5 28.5T320-240Zm320 0q-17 0-28.5-11.5T600-280q0-17 11.5-28.5T640-320q17 0 28.5 11.5T680-280q0 17-11.5 28.5T640-240Z"})}),Close:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"})}),UserPerson:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"M480-480q-66 0-113-47t-47-113q0-66 47-113t113-47q66 0 113 47t47 113q0 66-47 113t-113 47ZM160-160v-112q0-34 17.5-62.5T224-378q62-31 126-46.5T480-440q66 0 130 15.5T736-378q29 15 46.5 43.5T800-272v112H160Zm80-80h480v-32q0-11-5.5-20T700-306q-54-27-109-40.5T480-360q-56 0-111 13.5T260-306q-9 5-14.5 14t-5.5 20v32Zm240-320q33 0 56.5-23.5T560-640q0-33-23.5-56.5T480-720q-33 0-56.5 23.5T400-640q0 33 23.5 56.5T480-560Zm0-80Zm0 400Z"})}),Logout:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h280v80H200v560h280v80H200Zm440-160-55-58 102-102H360v-80h327L585-622l55-58 200 200-200 200Z"})}),ArrowUpDown:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"M320-440v-287L217-624l-57-56 200-200 200 200-57 56-103-103v287h-80ZM600-80 400-280l57-56 103 103v-287h80v287l103-103 57 56L600-80Z"})}),Filter:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"M400-240v-80h160v80H400ZM240-440v-80h480v80H240ZM120-640v-80h720v80H120Z"})}),Search:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z"})}),Stars:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"m668-380 152-130 120 10-176 153 52 227-102-62-46-198Zm-94-292-42-98 46-110 92 217-96-9ZM294-287l126-76 126 77-33-144 111-96-146-13-58-136-58 135-146 13 111 97-33 143ZM173-120l65-281L20-590l288-25 112-265 112 265 288 25-218 189 65 281-247-149-247 149Zm247-340Z"})}),MoreVert:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"M480-160q-33 0-56.5-23.5T400-240q0-33 23.5-56.5T480-320q33 0 56.5 23.5T560-240q0 33-23.5 56.5T480-160Zm0-240q-33 0-56.5-23.5T400-480q0-33 23.5-56.5T480-560q33 0 56.5 23.5T560-480q0 33-23.5 56.5T480-400Zm0-240q-33 0-56.5-23.5T400-720q0-33 23.5-56.5T480-800q33 0 56.5 23.5T560-720q0 33-23.5 56.5T480-640Z"})}),Add:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"M440-440H200v-80h240v-240h80v240h240v80H520v240h-80v-240Z"})}),Edit:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"M200-200h57l391-391-57-57-391 391v57Zm-80 80v-170l528-527q12-11 26.5-17t30.5-6q16 0 31 6t26 18l55 56q12 11 17.5 26t5.5 30q0 16-5.5 30.5T817-647L290-120H120Zm640-584-56-56 56 56Zm-141 85-28-29 57 57-29-28Z"})}),Upload:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"M440-320v-326L336-542l-56-58 200-200 200 200-56 58-104-104v326h-80ZM240-160q-33 0-56.5-23.5T160-240v-120h80v120h480v-120h80v120q0 33-23.5 56.5T720-160H240Z"})}),Copy:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z"})}),FaLock:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"M80-200v-80h800v80H80Zm46-242-52-30 34-60H40v-60h68l-34-58 52-30 34 58 34-58 52 30-34 58h68v60h-68l34 60-52 30-34-60-34 60Zm320 0-52-30 34-60h-68v-60h68l-34-58 52-30 34 58 34-58 52 30-34 58h68v60h-68l34 60-52 30-34-60-34 60Zm320 0-52-30 34-60h-68v-60h68l-34-58 52-30 34 58 34-58 52 30-34 58h68v60h-68l34 60-52 30-34-60-34 60Z"})}),AccountCircle:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"M234-276q51-39 114-61.5T480-360q69 0 132 22.5T726-276q35-41 54.5-93T800-480q0-133-93.5-226.5T480-800q-133 0-226.5 93.5T160-480q0 59 19.5 111t54.5 93Zm246-164q-59 0-99.5-40.5T340-580q0-59 40.5-99.5T480-720q59 0 99.5 40.5T620-580q0 59-40.5 99.5T480-440Zm0 360q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q53 0 100-15.5t86-44.5q-39-29-86-44.5T480-280q-53 0-100 15.5T294-220q39 29 86 44.5T480-160Zm0-360q26 0 43-17t17-43q0-26-17-43t-43-17q-26 0-43 17t-17 43q0 26 17 43t43 17Zm0 360Z"})}),UserAdd:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"M720-400v-120H600v-80h120v-120h80v120h120v80H800v120h-80Zm-360-80q-66 0-113-47t-47-113q0-66 47-113t113-47q66 0 113 47t47 113q0 66-47 113t-113 47ZM40-160v-112q0-34 17.5-62.5T104-378q62-31 126-46.5T360-440q66 0 130 15.5T616-378q29 15 46.5 43.5T680-272v112H40Zm80-80h480v-32q0-11-5.5-20T580-306q-54-27-109-40.5T360-360q-56 0-111 13.5T140-306q-9 5-14.5 14t-5.5 20v32Zm240-320q33 0 56.5-23.5T440-640q0-33-23.5-56.5T360-720q-33 0-56.5 23.5T280-640q0 33 23.5 56.5T360-560Zm0-80Zm0 400Z"})}),AttachFile:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"M720-330q0 104-73 177T470-80q-104 0-177-73t-73-177v-370q0-75 52.5-127.5T400-880q75 0 127.5 52.5T580-700v350q0 46-32 78t-78 32q-46 0-78-32t-32-78v-370h80v370q0 13 8.5 21.5T470-320q13 0 21.5-8.5T500-350v-350q-1-42-29.5-71T400-800q-42 0-71 29t-29 71v370q-1 71 49 120.5T470-160q70 0 119-49.5T640-330v-390h80v390Z"})}),HistoryActivity:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"M480-80q-155 0-269-103T82-440h81q15 121 105.5 200.5T480-160q134 0 227-93t93-227q0-134-93-227t-227-93q-86 0-159.5 42.5T204-640h116v80H88q29-140 139-230t253-90q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm112-232L440-464v-216h80v184l128 128-56 56Z"})}),MessageSquare:({size:a,className:t,...e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,viewBox:"0 -960 960 960",width:a,height:a,fill:"currentColor",className:t,children:d.jsx("path",{d:"M80-80v-720q0-33 23.5-56.5T160-880h640q33 0 56.5 23.5T880-800v480q0 33-23.5 56.5T800-240H240L80-80Zm126-240h594v-480H160v525l46-45Zm-46 0v-480 480Z"})}),CloseNavBarDesktop:({size:a,className:t,...e})=>d.jsxs("svg",{width:a,height:a,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,className:t,children:[d.jsx("mask",{id:"mask0_977_20941",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:a,height:a,children:d.jsx("rect",{width:"24",height:"24",fill:"#D9D9D9"})}),d.jsx("g",{mask:"url(#mask0_977_20941)",children:d.jsx("path",{d:"M11 17V7L6 12L11 17ZM13 21H15V3H13V21Z",fill:"#E4E4E7"})})]})};function Tn({profileImage:a,size:t,sizeImage:e=5.5}){const[r,i]=V.useState(!1);return d.jsx(d.Fragment,{children:a&&!r?d.jsx("img",{onError:()=>{i(!0)},src:a,className:`w-${e} h-${e} rounded-full`}):d.jsx(hn,{size:t,name:a,variant:"beam",colors:["#92A1C6","#146A7C","#F0AB3D","#C271B4","#C20D90"]})})}const Ue=({user:a,isExpanded:t,onClick:e,onProfileClick:r,showOptions:i=!1,onClickLogout:n,sessions:s,handleTokenLogin:o})=>{const l=s?.filter(u=>u.email!==a?.email);return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"profile-container flex my-2 rounded-md text-white-prometeo overflow-hidden flex-shrink-0 ",children:[d.jsxs(R.motion.button,{onClick:r,className:L("flex flex-1 gap-1 rounded-l-md cursor-pointer justify-center relative overflow-hidden focus:outline-none hover:bg-neutral-medium-selected button-profile",t&&"bg-neutral-medium-selected"),whileHover:{opacity:1,scale:[1,1.02,1]},whileTap:{scale:.98},transition:{duration:.2,ease:"easeInOut"},children:[d.jsx("div",{className:"profile-image-wrapper flex-shrink-0 h-10 w-10 flex items-center justify-center relative z-10",children:d.jsx(Tn,{profileImage:a?.profileImage||"",size:36})}),d.jsxs("div",{className:"flex flex-col justify-center overflow-hidden flex-1 relative z-10 profile-user-info mr-2",children:[d.jsx("p",{className:L("profile-name font-semibold leading-tight mb-0 text-left",t?"text-primary-default-default":"text-neutral-default-default"),children:a?.name?.length&&a?.name?.length>20?a?.name?.slice(0,10)+"..":a?.name}),d.jsx("div",{className:"flex items-center gap-1 mt-1",children:a&&a.company_id?d.jsxs(d.Fragment,{children:[d.jsx("p",{className:L("profile-options truncate text-xs mt-0",t?"text-primary-default-default":"text-neutral-default-default"),children:a?.company_id?.name?.length&&a?.company_id?.name?.length>20?a?.company_id?.name?.slice(0,10)+"..":a?.company_id?.name}),d.jsx("p",{className:L("profile-options truncate font-bold mt-0",t?"text-primary-default-default":"text-neutral-default-default"),children:"·"}),d.jsx("p",{className:L("profile-options truncate text-xs mt-0",t?"text-primary-default-default":"text-neutral-default-default"),children:a?.area?.name||a?.company_id?.name||"Sin asignar"})]}):d.jsx("span",{className:"font-semibold leading-tight ml-3 text-xs text-blue-300 text-center",children:"Sin asignar"})})]})]}),i&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"w-px bg-gray-500/30 my-1 border-separator-profile"}),d.jsx(R.motion.button,{onClick:e,className:`flex items-center justify-center p-3 rounded-r-md cursor-pointer relative overflow-hidden focus:outline-none min-w-[50px] \r
|
|
23
|
-
hover:bg-neutral-medium-selected button-content-chevron`,whileHover:{scale:1.05},whileTap:{scale:.95},transition:{duration:.2,ease:"easeOut"},title:t?"Ocultar opciones":"Mostrar opciones","aria-label":t?"Ocultar opciones":"Mostrar opciones",children:d.jsx(R.motion.div,{animate:{rotate:t?180:0},transition:{duration:.3,ease:"easeOut"},className:"relative button-select-crevron",children:d.jsx(R.motion.div,{transition:{duration:.2},children:d.jsx(Lt.ChevronDown,{size:20,className:"text-prometeo-neutral "})})})})]})]}),d.jsx(R.AnimatePresence,{mode:"wait",children:t&&d.jsxs(R.motion.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1,transition:{height:{duration:.6,ease:"easeOut"},opacity:{duration:.4,delay:.2}}},exit:{height:0,opacity:0,transition:{height:{duration:.8,delay:.2,ease:"easeIn"},opacity:{duration:.3,delay:.1}}},className:"overflow-hidden",children:[d.jsx(R.motion.div,{className:"flex justify-center items-center w-full mt-4",exit:{opacity:0,scaleX:0,height:0,transition:{duration:.4,delay:.5,ease:"easeInOut"}},children:d.jsx("div",{className:"border-b border-neutral-strong-default border-1 w-full"})}),l&&l?.length>0&&d.jsxs(d.Fragment,{children:[d.jsx(R.motion.div,{className:"mt-4",exit:{opacity:0,y:-5,height:0,transition:{duration:.4,delay:.4,ease:"easeInOut"}},children:d.jsx("span",{className:"text-neutral-medium-default font-semibold text-xs",children:"Cambiar cuenta"})}),d.jsx(R.motion.div,{className:"mt-4 overflow-hidden",exit:{height:0,opacity:0,y:-10,scale:.98,transition:{height:{duration:.5,delay:.2},opacity:{duration:.3,delay:.3},y:{duration:.3,delay:.3},scale:{duration:.3,delay:.3},ease:"easeInOut"}},children:d.jsx(Lr,{sessions:l,handleTokenLogin:o})}),d.jsx(R.motion.div,{className:"flex justify-center items-center w-full mt-4",exit:{opacity:0,scaleX:0,height:0,transition:{duration:.4,delay:.15,ease:"easeInOut"}},children:d.jsx("div",{className:"border-b border-neutral-strong-default border-1 w-full"})})]}),d.jsxs(R.motion.button,{onClick:n,className:"flex flex-1 h-12 w-full gap-1 rounded-md cursor-pointer mt-4 mb-4 px-2 items-center overflow-hidden focus:outline-none hover:bg-neutral-medium-selected button-profile",exit:{opacity:0,y:-8,scale:.96,transition:{duration:.5,delay:0,ease:"easeInOut"}},whileHover:{opacity:1,scale:[1,1.02,1],transition:{duration:.2}},whileTap:{scale:.98},children:[d.jsx(Lt.Logout,{size:24,className:"text-neutral-default-default"}),d.jsx("span",{className:"text-neutral-default-default font-semibold text-sm",children:"Cerrar sesión"})]})]})})]})};function Lr({sessions:a,handleTokenLogin:t}){return d.jsx("div",{className:"profile-options-container",children:a?.map(e=>d.jsx("button",{onClick:()=>t?.(e.token),children:d.jsx(Ue,{user:e},e._id)},e._id))})}const Zr=({sessionsShow:a,handleTokenLogin:t,onClickLogout:e,menuRef:r,onProfileClick:i})=>d.jsx("div",{ref:r,className:"flex bg-neutral-default-default gap-4 absolute bottom-10 left-30 border-1 border-neutral-strong-default h-72 w-60 rounded-md px-2",children:d.jsx(R.AnimatePresence,{mode:"wait",children:d.jsxs(R.motion.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1,transition:{height:{duration:.6,ease:"easeOut"},opacity:{duration:.4,delay:.2}}},exit:{height:0,opacity:0,transition:{height:{duration:.8,delay:.2,ease:"easeIn"},opacity:{duration:.3,delay:.1}}},className:"overflow-hidden flex flex-col justify-between items-center w-full",children:[d.jsxs(R.motion.button,{onClick:i,className:"flex h-12 w-full px-2 gap-1 rounded-md cursor-pointer mt-2 items-center overflow-hidden focus:outline-none hover:bg-neutral-medium-selected button-profile",exit:{opacity:0,y:-8,scale:.96,transition:{duration:.5,delay:0,ease:"easeInOut"}},whileHover:{opacity:1,scale:[1,1.02,1],transition:{duration:.2}},whileTap:{scale:.98},children:[d.jsx(Lt.UserPerson,{size:24,className:"text-neutral-default-default"}),d.jsx("span",{className:"text-neutral-default-default font-semibold text-sm",children:"Ver perfil"})]}),d.jsx(R.motion.div,{className:"flex justify-center items-center w-full mt-4",exit:{opacity:0,scaleX:0,height:0,transition:{duration:.4,delay:.5,ease:"easeInOut"}}}),a&&a?.length>0&&d.jsxs(d.Fragment,{children:[d.jsx(R.motion.div,{className:"mt-4",exit:{opacity:0,y:-5,height:0,transition:{duration:.4,delay:.4,ease:"easeInOut"}},children:d.jsx("span",{className:"text-neutral-medium-default font-semibold text-xs",children:"Cambiar cuenta"})}),d.jsx(R.motion.div,{className:"mt-4 overflow-hidden",exit:{height:0,opacity:0,y:-10,scale:.98,transition:{height:{duration:.5,delay:.2},opacity:{duration:.3,delay:.3},y:{duration:.3,delay:.3},scale:{duration:.3,delay:.3},ease:"easeInOut"}},children:d.jsx(Lr,{sessions:a,handleTokenLogin:t})}),d.jsx(R.motion.div,{className:"flex justify-center items-center w-full mt-4",exit:{opacity:0,scaleX:0,height:0,transition:{duration:.4,delay:.15,ease:"easeInOut"}},children:d.jsx("div",{className:"border-b border-neutral-strong-default border-1 w-full"})})]}),d.jsxs(R.motion.button,{onClick:e,className:"flex h-12 w-full gap-1 rounded-md cursor-pointer mt-4 mb-4 px-2 items-center overflow-hidden focus:outline-none hover:bg-neutral-medium-selected button-profile",exit:{opacity:0,y:-8,scale:.96,transition:{duration:.5,delay:0,ease:"easeInOut"}},whileHover:{opacity:1,scale:[1,1.02,1],transition:{duration:.2}},whileTap:{scale:.98},children:[d.jsx(Lt.Logout,{size:24,className:"text-neutral-default-default"}),d.jsx("span",{className:"text-neutral-default-default font-semibold text-sm",children:"Cerrar sesión"})]})]})})}),He=({notificationsCount:a})=>d.jsx(d.Fragment,{children:a>0&&d.jsx("div",{className:"w-5 h-5 bg-primary rounded-full flex items-center justify-center",children:d.jsx("span",{className:"text-xs text-neutral-default-default font-medium",children:a})})}),Br=({isCollapsed:a,onToggle:t})=>d.jsx("div",{className:"p-4 flex justify-end",children:d.jsx("button",{onClick:t,title:a?"Expandir Navbar":"Contraer Navbar","aria-label":a?"Expandir Navbar":"Contraer Navbar",className:"cursor-pointer text-neutral-default-default hover:text-primary-default transition-colors duration-300",children:a?d.jsx(Lt.CloseNavBarDesktop,{size:24,className:"rotate-180 transition-transform duration-300"}):d.jsx(Lt.CloseNavBarDesktop,{size:24,className:"rotate-0 transition-transform duration-300"})})}),zr=({logoUrl:a,companyName:t})=>d.jsx("div",{className:"w-full flex justify-center items-center p-2 h-20",children:d.jsx("img",{src:a,className:"h-2/3 rounded-full",alt:t??""})}),Ve=({links:a,isLinkActive:t,componentBadge:e,onClick:r,activeModal:i,onLinkClick:n})=>d.jsx("nav",{className:"flex flex-col gap-1",children:a?.map((s,o)=>{const l=t(s.path)||(s.relatedPaths?.some(u=>t(u))??!1);return s.isView&&s.
|
|
23
|
+
hover:bg-neutral-medium-selected button-content-chevron`,whileHover:{scale:1.05},whileTap:{scale:.95},transition:{duration:.2,ease:"easeOut"},title:t?"Ocultar opciones":"Mostrar opciones","aria-label":t?"Ocultar opciones":"Mostrar opciones",children:d.jsx(R.motion.div,{animate:{rotate:t?180:0},transition:{duration:.3,ease:"easeOut"},className:"relative button-select-crevron",children:d.jsx(R.motion.div,{transition:{duration:.2},children:d.jsx(Lt.ChevronDown,{size:20,className:"text-prometeo-neutral "})})})})]})]}),d.jsx(R.AnimatePresence,{mode:"wait",children:t&&d.jsxs(R.motion.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1,transition:{height:{duration:.6,ease:"easeOut"},opacity:{duration:.4,delay:.2}}},exit:{height:0,opacity:0,transition:{height:{duration:.8,delay:.2,ease:"easeIn"},opacity:{duration:.3,delay:.1}}},className:"overflow-hidden",children:[d.jsx(R.motion.div,{className:"flex justify-center items-center w-full mt-4",exit:{opacity:0,scaleX:0,height:0,transition:{duration:.4,delay:.5,ease:"easeInOut"}},children:d.jsx("div",{className:"border-b border-neutral-strong-default border-1 w-full"})}),l&&l?.length>0&&d.jsxs(d.Fragment,{children:[d.jsx(R.motion.div,{className:"mt-4",exit:{opacity:0,y:-5,height:0,transition:{duration:.4,delay:.4,ease:"easeInOut"}},children:d.jsx("span",{className:"text-neutral-medium-default font-semibold text-xs",children:"Cambiar cuenta"})}),d.jsx(R.motion.div,{className:"mt-4 overflow-hidden",exit:{height:0,opacity:0,y:-10,scale:.98,transition:{height:{duration:.5,delay:.2},opacity:{duration:.3,delay:.3},y:{duration:.3,delay:.3},scale:{duration:.3,delay:.3},ease:"easeInOut"}},children:d.jsx(Lr,{sessions:l,handleTokenLogin:o})}),d.jsx(R.motion.div,{className:"flex justify-center items-center w-full mt-4",exit:{opacity:0,scaleX:0,height:0,transition:{duration:.4,delay:.15,ease:"easeInOut"}},children:d.jsx("div",{className:"border-b border-neutral-strong-default border-1 w-full"})})]}),d.jsxs(R.motion.button,{onClick:n,className:"flex flex-1 h-12 w-full gap-1 rounded-md cursor-pointer mt-4 mb-4 px-2 items-center overflow-hidden focus:outline-none hover:bg-neutral-medium-selected button-profile",exit:{opacity:0,y:-8,scale:.96,transition:{duration:.5,delay:0,ease:"easeInOut"}},whileHover:{opacity:1,scale:[1,1.02,1],transition:{duration:.2}},whileTap:{scale:.98},children:[d.jsx(Lt.Logout,{size:24,className:"text-neutral-default-default"}),d.jsx("span",{className:"text-neutral-default-default font-semibold text-sm",children:"Cerrar sesión"})]})]})})]})};function Lr({sessions:a,handleTokenLogin:t}){return d.jsx("div",{className:"profile-options-container",children:a?.map(e=>d.jsx("button",{onClick:()=>t?.(e.token),children:d.jsx(Ue,{user:e},e._id)},e._id))})}const Zr=({sessionsShow:a,handleTokenLogin:t,onClickLogout:e,menuRef:r,onProfileClick:i})=>d.jsx("div",{ref:r,className:"flex bg-neutral-default-default gap-4 absolute bottom-10 left-30 border-1 border-neutral-strong-default h-72 w-60 rounded-md px-2",children:d.jsx(R.AnimatePresence,{mode:"wait",children:d.jsxs(R.motion.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1,transition:{height:{duration:.6,ease:"easeOut"},opacity:{duration:.4,delay:.2}}},exit:{height:0,opacity:0,transition:{height:{duration:.8,delay:.2,ease:"easeIn"},opacity:{duration:.3,delay:.1}}},className:"overflow-hidden flex flex-col justify-between items-center w-full",children:[d.jsxs(R.motion.button,{onClick:i,className:"flex h-12 w-full px-2 gap-1 rounded-md cursor-pointer mt-2 items-center overflow-hidden focus:outline-none hover:bg-neutral-medium-selected button-profile",exit:{opacity:0,y:-8,scale:.96,transition:{duration:.5,delay:0,ease:"easeInOut"}},whileHover:{opacity:1,scale:[1,1.02,1],transition:{duration:.2}},whileTap:{scale:.98},children:[d.jsx(Lt.UserPerson,{size:24,className:"text-neutral-default-default"}),d.jsx("span",{className:"text-neutral-default-default font-semibold text-sm",children:"Ver perfil"})]}),d.jsx(R.motion.div,{className:"flex justify-center items-center w-full mt-4",exit:{opacity:0,scaleX:0,height:0,transition:{duration:.4,delay:.5,ease:"easeInOut"}}}),a&&a?.length>0&&d.jsxs(d.Fragment,{children:[d.jsx(R.motion.div,{className:"mt-4",exit:{opacity:0,y:-5,height:0,transition:{duration:.4,delay:.4,ease:"easeInOut"}},children:d.jsx("span",{className:"text-neutral-medium-default font-semibold text-xs",children:"Cambiar cuenta"})}),d.jsx(R.motion.div,{className:"mt-4 overflow-hidden",exit:{height:0,opacity:0,y:-10,scale:.98,transition:{height:{duration:.5,delay:.2},opacity:{duration:.3,delay:.3},y:{duration:.3,delay:.3},scale:{duration:.3,delay:.3},ease:"easeInOut"}},children:d.jsx(Lr,{sessions:a,handleTokenLogin:t})}),d.jsx(R.motion.div,{className:"flex justify-center items-center w-full mt-4",exit:{opacity:0,scaleX:0,height:0,transition:{duration:.4,delay:.15,ease:"easeInOut"}},children:d.jsx("div",{className:"border-b border-neutral-strong-default border-1 w-full"})})]}),d.jsxs(R.motion.button,{onClick:e,className:"flex h-12 w-full gap-1 rounded-md cursor-pointer mt-4 mb-4 px-2 items-center overflow-hidden focus:outline-none hover:bg-neutral-medium-selected button-profile",exit:{opacity:0,y:-8,scale:.96,transition:{duration:.5,delay:0,ease:"easeInOut"}},whileHover:{opacity:1,scale:[1,1.02,1],transition:{duration:.2}},whileTap:{scale:.98},children:[d.jsx(Lt.Logout,{size:24,className:"text-neutral-default-default"}),d.jsx("span",{className:"text-neutral-default-default font-semibold text-sm",children:"Cerrar sesión"})]})]})})}),He=({notificationsCount:a})=>d.jsx(d.Fragment,{children:a>0&&d.jsx("div",{className:"w-5 h-5 bg-primary rounded-full flex items-center justify-center",children:d.jsx("span",{className:"text-xs text-neutral-default-default font-medium",children:a})})}),Br=({isCollapsed:a,onToggle:t})=>d.jsx("div",{className:"p-4 flex justify-end",children:d.jsx("button",{onClick:t,title:a?"Expandir Navbar":"Contraer Navbar","aria-label":a?"Expandir Navbar":"Contraer Navbar",className:"cursor-pointer text-neutral-default-default hover:text-primary-default transition-colors duration-300",children:a?d.jsx(Lt.CloseNavBarDesktop,{size:24,className:"rotate-180 transition-transform duration-300"}):d.jsx(Lt.CloseNavBarDesktop,{size:24,className:"rotate-0 transition-transform duration-300"})})}),zr=({logoUrl:a,companyName:t})=>d.jsx("div",{className:"w-full flex justify-center items-center p-2 h-20",children:d.jsx("img",{src:a,className:"h-2/3 rounded-full",alt:t??""})}),Ve=({links:a,isLinkActive:t,componentBadge:e,onClick:r,activeModal:i,onLinkClick:n})=>d.jsx("nav",{className:"flex flex-col gap-1",children:a?.map((s,o)=>{const l=t(s.path)||(s.relatedPaths?.some(u=>t(u))??!1);return s.isView&&s.viewAccess()&&d.jsxs(R.motion.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.4,delay:o*.03,ease:"easeOut"},className:"relative flex justify-center w-full items-center px-3",children:[s.path==="/notifications"&&d.jsx("button",{onClick:r,className:L("nav-link-item flex rounded-lg cursor-pointer relative overflow-hidden h-10 ","transition-all duration-300 ease-out w-full","group hover:bg-neutral-medium-selected",i?"text-primary-default-default":"text-neutral-default-default"),children:d.jsxs(R.motion.div,{className:"nav-content-wrapper flex items-center gap-3 px-3 relative z-10 w-full",animate:{x:0},transition:{duration:.25,ease:"easeOut"},children:[d.jsx(R.motion.div,{className:"nav-icon-wrapper flex items-center justify-center flex-shrink-0",animate:{scale:i?1.05:1},transition:{duration:.25,ease:"easeOut"},children:typeof s.icon=="function"?s.icon({size:24,className:L("nav-icon transition-colors duration-250 ease-out",i?"text-primary-default-default":"text-neutral-default-default group-hover:text-white-prometeo")}):"text"}),d.jsx("span",{className:"nav-label whitespace-nowrap text-sm font-semibold ",children:s.title}),e&&s.count&&s.count>0&&e(s.count)]})}),s.path!=="/notifications"&&d.jsxs("button",{onClick:()=>{r?.(),n?.(s.path)},className:L("nav-link-item flex rounded-lg cursor-pointer relative overflow-hidden h-10 ","transition-all duration-300 ease-out w-full","group hover:bg-neutral-medium-selected",l?"text-primary-default-default bg-neutral-medium-selected":"text-neutral-default-default"),children:[d.jsx(R.AnimatePresence,{mode:"wait",children:l&&d.jsx(R.motion.div,{layoutId:"nav-active-bg",className:"absolute inset-0 bg-neutral-medium-selected rounded-lg",initial:!1,animate:{opacity:1},exit:{opacity:0},transition:{type:"tween",duration:.25,ease:"easeInOut"}})}),d.jsxs(R.motion.div,{className:"nav-content-wrapper flex items-center gap-3 px-3 relative z-10 w-full",animate:{x:0},transition:{duration:.25,ease:"easeOut"},children:[d.jsx(R.motion.div,{className:"nav-icon-wrapper flex items-center justify-center flex-shrink-0",animate:{scale:l?1.05:1},transition:{duration:.25,ease:"easeOut"},children:typeof s.icon=="function"?s.icon({size:24,className:L("nav-icon transition-colors duration-250 ease-out",l?"text-primary-default-default":"text-neutral-default-default group-hover:text-white-prometeo")}):null}),d.jsx("span",{className:"nav-label whitespace-nowrap text-sm font-semibold ",children:s.title}),e&&s.count&&s.count>0&&e(s.count)]})]})]},o)})}),Ur=a=>{const t=V.useRef(null);return{isCollapsed:a,navbarRef:t}};function Ot(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function Hr(a,t){a.prototype=Object.create(t.prototype),a.prototype.constructor=a,a.__proto__=t}/*!
|
|
24
24
|
* GSAP 3.13.0
|
|
25
25
|
* https://gsap.com
|
|
26
26
|
*
|