@zydon/common 2.6.79 → 2.6.80
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.
|
@@ -29,6 +29,6 @@ import M from '@mui/lab/LoadingButton';
|
|
|
29
29
|
import _ from '@mui/material/Button';
|
|
30
30
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
31
31
|
|
|
32
|
-
var h=styled(p)({width:40,height:40,alignItems:"center",justifyContent:"center",borderRadius:"50%",border:"2px solid #1C1C1C",cursor:"pointer"}),
|
|
32
|
+
var h=styled(p)({width:40,height:40,alignItems:"center",justifyContent:"center",borderRadius:"50%",border:"2px solid #1C1C1C",cursor:"pointer"}),w=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"}})),T=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)})),R=styled(_)(({theme:o})=>({width:"100%",alignItems:"flex-start",justifyContent:"flex-start",color:o.palette.text.primary})),z=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}})),A=styled(M)(({theme:o})=>({width:"100%",alignItems:"flex-start",justifyContent:"flex-start",color:o.palette.error.main}));var D=({name:o="",email:g="",src:B,content:f,menuItems:y,subContent:v,logout:P,loadingLogout:S})=>{let m=a$1();return jsxs(Fragment,{children:[jsx(h,{"data-testid":"avatar-trigger-button",children:jsx(a$2,{alt:o,name:o,src:B,onClick:m.onOpen,"data-testid":"avatar-trigger",sx:{maxWidth:34,maxHeight:34}})}),jsxs(w,{open:m.open,onClose:m.onClose,arrow:"top-right",disableRestoreFocus:!0,"data-testid":"avatar-menu",children:[jsxs(T,{"data-testid":"avatar-account",children:[jsx(j,{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(p,{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:g})]})]}),jsx(d,{}),f&&jsxs(Fragment,{children:[jsx(c,{"data-testid":"avatar-content",children:f}),jsx(d,{})]}),y&&jsxs(Fragment,{children:[jsx(c,{"data-testid":"avatar-menu-items",children:y.map(r=>jsx(R,{"data-testid":`avatar-menu-item-${r.label.toLowerCase().replace(/\s+/g,"-")}`,startIcon:jsx(a$3,{icon:r.icon,color:L=>L.palette.mode==="dark"?"text.secondary":"primary.main"}),...r.component&&{component:r.component,to:r.to},...r.onClick&&{onClick:r.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:r.label}),jsx(a$3,{icon:"ARROW_RIGHT_SIMPLE",color:"text.primary"})]})},r.label))}),jsx(d,{})]}),v&&jsxs(Fragment,{children:[jsx(c,{"data-testid":"avatar-subcontent",children:v}),jsx(d,{})]}),jsx(c,{"data-testid":"avatar-resources",children:jsxs(z,{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,{}),jsxs(c,{direction:"row",children:[jsx(A,{"data-testid":"logout-button",startIcon:jsx(a$3,{icon:"LOGOUT_02"}),size:"small",onClick:P,loading:S,children:S?"Saindo...":"Sair"}),a$4(g)&&jsxs(p,{direction:"row",alignItems:"center",gap:1,children:[jsx(i,{variant:"overline",fontSize:11,color:"text.disabled",children:"Apar\xEAncia:"}),jsx(a$5,{})]})]})]})]})},rt=D;
|
|
33
33
|
|
|
34
34
|
export { rt as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a } from '../../chunk-W3MYAMTH.js';
|
|
2
|
-
import { a as a$
|
|
1
|
+
import { a as a$1 } from '../../chunk-W3MYAMTH.js';
|
|
2
|
+
import { a as a$2 } from '../../chunk-5OJQUX2T.js';
|
|
3
3
|
import '../../chunk-SHNFHORM.js';
|
|
4
|
-
import
|
|
5
|
-
import { styled
|
|
4
|
+
import a from '@mui/material/Stack';
|
|
5
|
+
import { styled } from '@mui/material/styles';
|
|
6
6
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var p=styled(a,{shouldForwardProp:o=>o!=="open"})(({theme:o,open:r})=>({position:"relative",backgroundColor:o.palette.background.paper,borderRight:`1px solid ${o.palette.divider}`,transition:"width 0.125s",...r?{width:304,"> div":{display:"flex"}}:{width:0,padding:0,"> div":{"> *":{display:"none"},"> button":{display:"flex"}}}})),l=styled(a)({position:"sticky",zIndex:1,flex:1}),s=styled("button")(({theme:o})=>({position:"absolute",top:36,right:-18,display:"flex",alignItems:"center",justifyContent:"center",width:18,height:37,backgroundColor:o.palette.background.paper,border:`1px solid ${o.palette.divider}`,borderLeft:0,borderRadius:"0 6px 6px 0",color:o.palette.text.secondary,zIndex:999,svg:{minWidth:16},"&:hover":{color:o.palette.primary.main,backgroundColor:o.palette.primary.lighter,cursor:"pointer"}}));var u=({children:o,expandable:r,...b})=>{let[i,c]=a$1(!0);return jsx(p,{open:i,children:jsxs(l,{maxHeight:"calc(100vh - 60px)",...b,"data-testid":"sidebar-content",children:[r&&jsx(s,{onClick:c,"data-testid":"sidebar-button",children:jsx(a$2,{icon:i?"CHEVRON_LEFT":"CHEVRON_RIGHT"})}),o]})})},y=u;
|
|
9
9
|
|
|
10
|
-
export {
|
|
10
|
+
export { y as default };
|