@zydon/common 2.6.5 → 2.6.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.
|
@@ -5,13 +5,13 @@ import { a as a$2 } from '../../chunk-NF42ENKE.js';
|
|
|
5
5
|
import { a as a$1 } from '../../chunk-ORYAES3Q.js';
|
|
6
6
|
import _ from '@mui/material/Avatar';
|
|
7
7
|
import d from '@mui/material/Divider';
|
|
8
|
-
import
|
|
8
|
+
import c from '@mui/material/Stack';
|
|
9
|
+
import { styled, alpha } from '@mui/material/styles';
|
|
9
10
|
import i from '@mui/material/Typography';
|
|
10
11
|
import P from '@mui/lab/LoadingButton';
|
|
11
12
|
import L from '@mui/material/Button';
|
|
12
|
-
import { styled, alpha } from '@mui/material/styles';
|
|
13
13
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var x=styled(c)({width:40,height:40,alignItems:"center",justifyContent:"center",borderRadius:"50%",border:"2px solid #1C1C1C",cursor:"pointer"}),S=styled(a)(({theme:o})=>({width:322,marginTop:20,"& .MuiPopover-paper":{width:540,padding:0,backgroundColor:o.palette.background.paper,borderRadius:o.spacing(1),backgroundImage:"none"}})),k=styled(c)(({theme:o})=>({alignItems:"center",justifyContent:"center",gap:o.spacing(1.5),padding:o.spacing(3),backgroundColor:alpha(o.palette.primary.main,.04)})),p=styled(c)(({theme:o})=>({marginLeft:o.spacing(1.75),marginRight:o.spacing(1.75),marginTop:o.spacing(2),marginBottom:o.spacing(2),gap:o.spacing(1)})),I=styled(L)(({theme:o})=>({width:"100%",alignItems:"flex-start",justifyContent:"flex-start",color:o.palette.text.primary})),h=styled(c)(({theme:o})=>({display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:o.spacing(2),cursor:"pointer"})),s=styled(c)(({theme:o})=>({alignItems:"center",gap:o.spacing(.5),color:o.palette.text.secondary,textAlign:"center","&:hover":{color:o.palette.primary.main}})),R=styled(P)(({theme:o})=>({width:"100%",alignItems:"flex-start",justifyContent:"flex-start",color:o.palette.error.main}));var j=({name:o="",email:T="",src:z,content:u,menuItems:g,subContent:y,logout:A,loadingLogout:f})=>{let m=a$1();return jsxs(Fragment,{children:[jsx(x,{"data-testid":"avatar-trigger-button",children:jsx(a$2,{alt:o,name:o,src:z,onClick:m.onOpen,"data-testid":"avatar-trigger",sx:{maxWidth:34,maxHeight:34}})}),jsxs(S,{open:m.open,onClose:m.onClose,arrow:"top-right",disableRestoreFocus:!0,"data-testid":"avatar-menu",children:[jsxs(k,{"data-testid":"avatar-account",children:[jsx(_,{sx:{bgcolor:r=>r.palette.mode==="dark"?alpha(r.palette.primary.main,.04):"success.lighter",border:r=>r.palette.mode==="dark"?"1px solid rgb(255, 252, 252)":"none",color:r=>r.palette.mode==="dark"?"primary.contrastText":"success.main",width:60,height:60},"data-testid":"avatar-initials",children:o.slice(0,2).toUpperCase()}),jsxs(c,{alignItems:"center",textAlign:"center",children:[jsx(i,{variant:"subtitle2",fontSize:"subtitle2.fontSize",color:"text.primary",children:o}),jsx(i,{variant:"body2",fontSize:"body2.fontSize",color:"text.secondary",children:T})]})]}),jsx(d,{}),u&&jsxs(Fragment,{children:[jsx(p,{"data-testid":"avatar-content",children:u}),jsx(d,{})]}),g&&jsxs(Fragment,{children:[jsx(p,{"data-testid":"avatar-menu-items",children:g.map(r=>jsx(I,{"data-testid":`avatar-menu-item-${r.label.toLowerCase().replace(/\s+/g,"-")}`,startIcon:jsx(a$3,{icon:r.icon,color:B=>B.palette.mode==="dark"?"text.secondary":"primary.main"}),...r.component&&{component:r.component,to:r.to},...r.onClick&&{onClick:r.onClick},children:jsxs(c,{direction:"row",alignItems:"center",justifyContent:"space-between",flex:1,gap:1,children:[jsx(i,{variant:"caption",fontSize:13,color:"text.secondary",children:r.label}),jsx(a$3,{icon:"ARROW_RIGHT_SIMPLE",color:"text.primary"})]})},r.label))}),jsx(d,{})]}),y&&jsxs(Fragment,{children:[jsx(p,{"data-testid":"avatar-subcontent",children:y}),jsx(d,{})]}),jsx(p,{"data-testid":"avatar-resources",children:jsxs(h,{children:[jsxs(s,{"data-testid":"resource-discord",onClick:()=>window.open("https://discord.gg/HMpBbABGVW","_blank"),children:[jsx(a$3,{icon:"DISCORD",color:"primary.main"}),jsx(i,{variant:"caption",fontSize:"caption.fontSize",children:"Comunidade"})]}),jsxs(s,{"data-testid":"resource-youtube",onClick:()=>window.open("https://youtube.com/playlist?list=PLqv8txNiT9o_LReCh5wKPiQaeBTg2Q1i3&si=3nGSAU3AdcPwoa-R","_blank","noopener noreferrer"),children:[jsx(a$3,{icon:"YOUTUBE",color:"primary.main"}),jsx(i,{variant:"caption",fontSize:"caption.fontSize",children:"Videos"})]}),jsxs(s,{"data-testid":"resource-ajuda",onClick:()=>window.open("https://ajuda.zydon.com.br","_blank","noopener noreferrer"),children:[jsx(a$3,{icon:"HELP_CIRCLE",color:"primary.main"}),jsx(i,{variant:"caption",fontSize:"caption.fontSize",children:"Ajuda"})]}),jsxs(s,{"data-testid":"resource-docs",onClick:()=>window.open("https://docs.zydon.com.br","_blank","noopener noreferrer"),children:[jsx(a$3,{icon:"CODE_FOLDER",color:"primary.main"}),jsx(i,{variant:"caption",fontSize:"caption.fontSize",children:"Docs"})]})]})}),jsx(d,{}),jsx(p,{children:jsx(R,{"data-testid":"logout-button",startIcon:jsx(a$3,{icon:"LOGOUT_02"}),size:"small",onClick:A,loading:f,children:f?"Saindo...":"Sair"})})]})]})},X=j;
|
|
16
16
|
|
|
17
|
-
export {
|
|
17
|
+
export { X as default };
|