@zydon/common 2.5.85 → 2.5.86

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.
@@ -12,6 +12,6 @@ import P from '@mui/material/Button';
12
12
  import { styled, alpha } from '@mui/material/styles';
13
13
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
14
14
 
15
- var b=styled(p)({width:40,height:40,alignItems:"center",justifyContent:"center",borderRadius:"50%",border:"2px solid #1C1C1C",cursor:"pointer"}),x=styled(a)(({theme:o})=>({width:322,marginTop:20,"& .MuiPopover-paper":{width:540,padding:0,backgroundColor:o.palette.common.white,borderRadius:o.spacing(1),backgroundImage:"none"}})),I=styled(p)(({theme:o})=>({alignItems:"center",justifyContent:"center",gap:o.spacing(1.5),padding:o.spacing(3),backgroundColor:alpha(o.palette.primary.main,.04)})),c=styled(p)(({theme:o})=>({marginLeft:o.spacing(1.75),marginRight:o.spacing(1.75),marginTop:o.spacing(2),marginBottom:o.spacing(2),gap:o.spacing(1)})),h=styled(P)(({theme:o})=>({width:"100%",alignItems:"flex-start",justifyContent:"flex-start",color:o.palette.text.primary})),k=styled(p)(({theme:o})=>({display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:o.spacing(2),cursor:"pointer"})),s=styled(p)(({theme:o})=>({alignItems:"center",gap:o.spacing(.5),color:o.palette.text.secondary,textAlign:"center","&:hover":{color:o.palette.primary.main}})),w=styled(T)(({theme:o})=>({width:"100%",alignItems:"flex-start",justifyContent:"flex-start",color:o.palette.error.main}));var _=({name:o="",email:z="",src:A,content:m,menuItems:g,subContent:f,logout:B,loadingLogout:y})=>{let u=a$1();return jsxs(Fragment,{children:[jsx(b,{"data-testid":"avatar-trigger-button",children:jsx(a$2,{alt:o,name:o,src:A,onClick:u.onOpen,"data-testid":"avatar-trigger",sx:{maxWidth:34,maxHeight:34}})}),jsxs(x,{open:u.open,onClose:u.onClose,arrow:"top-right",disableRestoreFocus:!0,"data-testid":"avatar-menu",children:[jsxs(I,{"data-testid":"avatar-account",children:[jsx(M,{sx:{bgcolor:"success.lighter",color:"success.main",width:60,height:60},"data-testid":"avatar-initials",children:o.slice(0,2).toUpperCase()}),jsxs(p,{alignItems:"center",textAlign:"center",children:[jsx(i,{variant:"subtitle1",fontSize:"subtitle1.fontSize",color:"text.primary",children:o}),jsx(i,{variant:"body2",fontSize:"subtitle1.fontSize",color:"text.secondary",children:z})]})]}),jsx(d,{}),m&&jsxs(Fragment,{children:[jsx(c,{"data-testid":"avatar-content",children:m}),jsx(d,{})]}),g&&jsxs(Fragment,{children:[jsx(c,{"data-testid":"avatar-menu-items",children:g.map(a=>jsx(h,{"data-testid":`avatar-menu-item-${a.label.toLowerCase().replace(/\s+/g,"-")}`,startIcon:jsx(a$3,{icon:a.icon,color:"primary.main"}),...a.component&&{component:a.component,to:a.to},...a.onClick&&{onClick:a.onClick},children:jsxs(p,{direction:"row",alignItems:"center",justifyContent:"space-between",flex:1,gap:1,children:[jsx(i,{variant:"caption",fontSize:13,color:"text.secondary",children:a.label}),jsx(a$3,{icon:"ARROW_RIGHT_SIMPLE",color:"text.primary"})]})},a.label))}),jsx(d,{})]}),f&&jsxs(Fragment,{children:[jsx(c,{"data-testid":"avatar-subcontent",children:f}),jsx(d,{})]}),jsx(c,{"data-testid":"avatar-resources",children:jsxs(k,{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(c,{children:jsx(w,{"data-testid":"logout-button",startIcon:jsx(a$3,{icon:"LOGOUT_02"}),size:"small",onClick:B,loading:y,children:y?"Saindo...":"Sair"})})]})]})},Y=_;
15
+ var b=styled(p)({width:40,height:40,alignItems:"center",justifyContent:"center",borderRadius:"50%",border:"2px solid #1C1C1C",cursor:"pointer"}),x=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"}})),I=styled(p)(({theme:o})=>({alignItems:"center",justifyContent:"center",gap:o.spacing(1.5),padding:o.spacing(3),backgroundColor:alpha(o.palette.primary.main,.04)})),c=styled(p)(({theme:o})=>({marginLeft:o.spacing(1.75),marginRight:o.spacing(1.75),marginTop:o.spacing(2),marginBottom:o.spacing(2),gap:o.spacing(1)})),k=styled(P)(({theme:o})=>({width:"100%",alignItems:"flex-start",justifyContent:"flex-start",color:o.palette.text.primary})),h=styled(p)(({theme:o})=>({display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:o.spacing(2),cursor:"pointer"})),s=styled(p)(({theme:o})=>({alignItems:"center",gap:o.spacing(.5),color:o.palette.text.secondary,textAlign:"center","&:hover":{color:o.palette.primary.main}})),R=styled(T)(({theme:o})=>({width:"100%",alignItems:"flex-start",justifyContent:"flex-start",color:o.palette.error.main}));var _=({name:o="",email:z="",src:A,content:m,menuItems:g,subContent:f,logout:B,loadingLogout:y})=>{let u=a$1();return jsxs(Fragment,{children:[jsx(b,{"data-testid":"avatar-trigger-button",children:jsx(a$2,{alt:o,name:o,src:A,onClick:u.onOpen,"data-testid":"avatar-trigger",sx:{maxWidth:34,maxHeight:34}})}),jsxs(x,{open:u.open,onClose:u.onClose,arrow:"top-right",disableRestoreFocus:!0,"data-testid":"avatar-menu",children:[jsxs(I,{"data-testid":"avatar-account",children:[jsx(M,{sx:{bgcolor:"success.lighter",color:"success.main",width:60,height:60},"data-testid":"avatar-initials",children:o.slice(0,2).toUpperCase()}),jsxs(p,{alignItems:"center",textAlign:"center",children:[jsx(i,{variant:"subtitle1",fontSize:"subtitle1.fontSize",color:"text.primary",children:o}),jsx(i,{variant:"body2",fontSize:"subtitle1.fontSize",color:"text.secondary",children:z})]})]}),jsx(d,{}),m&&jsxs(Fragment,{children:[jsx(c,{"data-testid":"avatar-content",children:m}),jsx(d,{})]}),g&&jsxs(Fragment,{children:[jsx(c,{"data-testid":"avatar-menu-items",children:g.map(a=>jsx(k,{"data-testid":`avatar-menu-item-${a.label.toLowerCase().replace(/\s+/g,"-")}`,startIcon:jsx(a$3,{icon:a.icon,color:"primary.main"}),...a.component&&{component:a.component,to:a.to},...a.onClick&&{onClick:a.onClick},children:jsxs(p,{direction:"row",alignItems:"center",justifyContent:"space-between",flex:1,gap:1,children:[jsx(i,{variant:"caption",fontSize:13,color:"text.secondary",children:a.label}),jsx(a$3,{icon:"ARROW_RIGHT_SIMPLE",color:"text.primary"})]})},a.label))}),jsx(d,{})]}),f&&jsxs(Fragment,{children:[jsx(c,{"data-testid":"avatar-subcontent",children:f}),jsx(d,{})]}),jsx(c,{"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(c,{children:jsx(R,{"data-testid":"logout-button",startIcon:jsx(a$3,{icon:"LOGOUT_02"}),size:"small",onClick:B,loading:y,children:y?"Saindo...":"Sair"})})]})]})},Y=_;
16
16
 
17
17
  export { Y as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zydon/common",
3
- "version": "2.5.85",
3
+ "version": "2.5.86",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",