@cincoders/cinnamon 1.0.0 → 1.0.1
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.
- package/dist/cinnamon.esm.js +1 -1
- package/dist/cinnamon.min.js +1 -1
- package/dist/cinnamon.ssr.js +1 -1
- package/package.json +3 -2
package/dist/cinnamon.esm.js
CHANGED
|
@@ -733,7 +733,7 @@ function is(e,t){const n=os(e,t);return"production"!==process.env.NODE_ENV?(...t
|
|
|
733
733
|
.Toastify__toast-container--top-right {
|
|
734
734
|
top: ${e=>e.topSpacing}px
|
|
735
735
|
}
|
|
736
|
-
`,jy=({topInitialPosition:e,toastProps:t})=>n(Py,{topSpacing:e+=16,children:n(Ty,{...t})}),Zy=s(void 0);function Hy({navbar:e,footer:o,children:r,centralized:i=!1,column:a=!1,haveToast:s=!1,components:l,createNavbarContext:c=!0}){const d=p(null),u=p(null),[f,h]=C({navHeight:0,footHeight:0}),y=p(!0);m((()=>{h({navHeight:d.current?d.current.offsetHeight:0,footHeight:u.current?u.current.offsetHeight:0})}),[d.current?.offsetHeight,u.current?.offsetHeight]);let g=e?f.navHeight:0;g+=o?f.footHeight:0;const[v,x]=C({...e});m((()=>{c&&!y.current?x({...e}):y.current=!1}),[e]);const E=b((()=>{if(c)return new iy({...v},x)}),[c,v,x]);return m((()=>{y.current=!0}),[E]),t(Zy.Provider,{value:E,children:[n("div",{ref:d,style:{display:"inline"},children:l?.navbar?l.navbar:n(zy,{...e})}),t(Gh,{style:{minHeight:`calc(100vh - ${g}px)`,alignItems:i?"center":"normal",justifyContent:i?"center":"normal",flexDirection:a?"column":"row"},children:[s&&(l?.toastContainer?l.toastContainer:n(jy,{toastProps:{position:"top-right"},topInitialPosition:f.navHeight})),r]}),n("div",{ref:u,style:{display:"inline"},children:l?.footer?l.footer:n(ry,{...o})})]})}const zy=({auth:e,logoRedirectUrl:r="/",logoSrc:i,haveSearchBar:a=!1,searchFunction:s=(()=>{}),hiddenUser:l=!1,user:d={name:"-",email:"-"},title:u="",h1:p=!1,sideMenuLinks:f=[],isLandingPage:h=!1,systemsList:y=[],currentSystemIconUrl:g,children:b,IconComponent:v,accountManagementUrl:x})=>{const[E,A]=C(d),w=c(Zy);w&&(u=w.title??u,f=w.sideMenuLinks??f,a=w.haveSearchBar??a,s=w.searchFunction??(()=>{})),m((()=>{!async function(){e&&A({name:e.user?.profile?.given_name??"",email:e.user?.profile?.email??""})}()}),[e]);const[D,T]=C(null),[k,O]=C(null),[M,S]=C(!1),[N,L]=C(""),I=e=>{T(e.currentTarget)},R=()=>{T(null)};function V(e){L(e.target.value),s(e.target.value)}function F(){S(!M)}return t(o,{children:[n(lp,{styles:{body:{paddingRight:"0px !important"}}}),h?n(Nh,{children:n(Lh,{children:t(Ih,{children:[i&&n("a",{href:r,children:n(zh,{src:i,alt:"Logo da Instituição"})}),n(Vh,{children:n("span",p?{style:{fontSize:"2em"},children:u}:{style:{fontSize:"1.5em"},children:u})}),l?n("span",{children:a&&n(Fh,{children:n(Ph,{children:n(jh,{placeholder:"Buscar…",inputProps:{"aria-label":"search"},type:"text",value:N,onChange:V})})})}):t(o,{children:[a&&n(Fh,{children:n(Ph,{children:n(jh,{placeholder:"Buscar…",inputProps:{"aria-label":"search"},type:"text",value:N,onChange:V})})}),n(Ic,{size:"small","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:I,color:"inherit",children:n(Dp,{sx:{bgcolor:"#db1e2f"},alt:E.name[0],children:E.name[0].charAt(0)})})]}),n(Wh,{id:"menu-appbar",anchorEl:D,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(D),onClose:R,children:n(wh,{user:E,auth:e})})]})})}):t(Nh,{children:[n(Lh,{children:t(Ih,{children:[t(Rh,{children:[0!==f.length&&n(uh,{isOpen:M,onClick:F}),n(Mh,{iconUrl:g,IconComponent:v})]}),n(Vh,{children:n("span",p?{style:{fontSize:"2em"},children:u}:{style:{fontSize:"1.5em"},children:u})}),n(Fh,{children:a&&n(Ph,{children:n(jh,{placeholder:"Buscar…",inputProps:{"aria-label":"search"},type:"text",value:N,onChange:V})})}),t(Zh,{children:[y.length>0&&t(o,{children:[n(Ic,{size:"small","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:e=>{O(e.currentTarget)},color:"inherit",children:n(Hh,{children:n("img",{src:"data:image/svg+xml,%3Csvg%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%220%200%2040%2040%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M7.83333%202H3.16667C2.52267%202%202%202.52267%202%203.16667V7.83333C2%208.47733%202.52267%209%203.16667%209H7.83333C8.47733%209%209%208.47733%209%207.83333V3.16667C9%202.52267%208.47733%202%207.83333%202Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M7.83333%2015H3.16667C2.52267%2015%202%2015.5227%202%2016.1667V20.8333C2%2021.4773%202.52267%2022%203.16667%2022H7.83333C8.47733%2022%209%2021.4773%209%2020.8333V16.1667C9%2015.5227%208.47733%2015%207.83333%2015Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M7.83333%2028H3.16667C2.52267%2028%202%2028.5227%202%2029.1667V33.8333C2%2034.4773%202.52267%2035%203.16667%2035H7.83333C8.47733%2035%209%2034.4773%209%2033.8333V29.1667C9%2028.5227%208.47733%2028%207.83333%2028Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M20.8333%202H16.1667C15.5227%202%2015%202.52267%2015%203.16667V7.83333C15%208.47733%2015.5227%209%2016.1667%209H20.8333C21.4773%209%2022%208.47733%2022%207.83333V3.16667C22%202.52267%2021.4773%202%2020.8333%202Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M20.8333%2015H16.1667C15.5227%2015%2015%2015.5227%2015%2016.1667V20.8333C15%2021.4773%2015.5227%2022%2016.1667%2022H20.8333C21.4773%2022%2022%2021.4773%2022%2020.8333V16.1667C22%2015.5227%2021.4773%2015%2020.8333%2015Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M20.8333%2028H16.1667C15.5227%2028%2015%2028.5227%2015%2029.1667V33.8333C15%2034.4773%2015.5227%2035%2016.1667%2035H20.8333C21.4773%2035%2022%2034.4773%2022%2033.8333V29.1667C22%2028.5227%2021.4773%2028%2020.8333%2028Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M33.8333%202H29.1667C28.5227%202%2028%202.52267%2028%203.16667V7.83333C28%208.47733%2028.5227%209%2029.1667%209H33.8333C34.4773%209%2035%208.47733%2035%207.83333V3.16667C35%202.52267%2034.4773%202%2033.8333%202Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M33.8333%2015H29.1667C28.5227%2015%2028%2015.5227%2028%2016.1667V20.8333C28%2021.4773%2028.5227%2022%2029.1667%2022H33.8333C34.4773%2022%2035%2021.4773%2035%2020.8333V16.1667C35%2015.5227%2034.4773%2015%2033.8333%2015Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M33.8333%2028H29.1667C28.5227%2028%2028%2028.5227%2028%2029.1667V33.8333C28%2034.4773%2028.5227%2035%2029.1667%2035H33.8333C34.4773%2035%2035%2034.4773%2035%2033.8333V29.1667C35%2028.5227%2034.4773%2028%2033.8333%2028Z%22%20fill%3D%22black%22%2F%3E%3C%2Fsvg%3E",alt:"Systems Menu"})})}),n(Bh,{id:"menu-appbar",anchorEl:k,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(k),onClose:()=>{O(null)},children:n(Sh,{systemsList:y})})]}),i&&n("a",{href:r,children:n(zh,{src:i,alt:"Logo da Instituição"})}),l?n("span",{}):n(Ic,{size:"small","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:I,color:"inherit",children:n(Dp,{sx:{bgcolor:"#db1e2f"},alt:E.name[0],children:E.name[0].charAt(0)})}),n(Wh,{id:"menu-appbar",anchorEl:D,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(D),onClose:R,children:n(wh,{user:E,auth:e,accountManagementUrl:x})})]})]})}),void 0!==b?b:n(ih,{visibility:M,top:"64px",setVisibility:F,links:f})]})]})},Wy=Kd.img`
|
|
736
|
+
`,jy=({topInitialPosition:e,toastProps:t})=>n(Py,{topSpacing:e+=16,children:n(Ty,{...t})}),Zy=s(void 0);function Hy({navbar:e,footer:o,children:r,centralized:i=!1,column:a=!1,haveToast:s=!1,components:l,createNavbarContext:c=!0}){const d=p(null),u=p(null),[f,h]=C({navHeight:0,footHeight:0}),y=p(!0);m((()=>{h({navHeight:d.current?d.current.offsetHeight:0,footHeight:u.current?u.current.offsetHeight:0})}),[d.current?.offsetHeight,u.current?.offsetHeight]);let g=e?f.navHeight:0;g+=o?f.footHeight:0;const[v,x]=C({...e});m((()=>{c&&!y.current?x({...e}):y.current=!1}),[e]);const E=b((()=>{if(c)return new iy({...v},x)}),[c,v,x]);return m((()=>{y.current=!0}),[E]),t(Zy.Provider,{value:E,children:[n("div",{ref:d,style:{display:"inline"},children:l?.navbar?l.navbar:n(zy,{...e})}),t(Gh,{style:{minHeight:`calc(100vh - ${g}px)`,height:`calc(100vh - ${g}px)`,alignItems:i?"center":"normal",justifyContent:i?"center":"normal",flexDirection:a?"column":"row"},children:[s&&(l?.toastContainer?l.toastContainer:n(jy,{toastProps:{position:"top-right"},topInitialPosition:f.navHeight})),r]}),n("div",{ref:u,style:{display:"inline"},children:l?.footer?l.footer:n(ry,{...o})})]})}const zy=({auth:e,logoRedirectUrl:r="/",logoSrc:i,haveSearchBar:a=!1,searchFunction:s=(()=>{}),hiddenUser:l=!1,user:d={name:"-",email:"-"},title:u="",h1:p=!1,sideMenuLinks:f=[],isLandingPage:h=!1,systemsList:y=[],currentSystemIconUrl:g,children:b,IconComponent:v,accountManagementUrl:x})=>{const[E,A]=C(d),w=c(Zy);w&&(u=w.title??u,f=w.sideMenuLinks??f,a=w.haveSearchBar??a,s=w.searchFunction??(()=>{})),m((()=>{!async function(){e&&A({name:e.user?.profile?.given_name??"",email:e.user?.profile?.email??""})}()}),[e]);const[D,T]=C(null),[k,O]=C(null),[M,S]=C(!1),[N,L]=C(""),I=e=>{T(e.currentTarget)},R=()=>{T(null)};function V(e){L(e.target.value),s(e.target.value)}function F(){S(!M)}return t(o,{children:[n(lp,{styles:{body:{paddingRight:"0px !important"}}}),h?n(Nh,{children:n(Lh,{children:t(Ih,{children:[i&&n("a",{href:r,children:n(zh,{src:i,alt:"Logo da Instituição"})}),n(Vh,{children:n("span",p?{style:{fontSize:"2em"},children:u}:{style:{fontSize:"1.5em"},children:u})}),l?n("span",{children:a&&n(Fh,{children:n(Ph,{children:n(jh,{placeholder:"Buscar…",inputProps:{"aria-label":"search"},type:"text",value:N,onChange:V})})})}):t(o,{children:[a&&n(Fh,{children:n(Ph,{children:n(jh,{placeholder:"Buscar…",inputProps:{"aria-label":"search"},type:"text",value:N,onChange:V})})}),n(Ic,{size:"small","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:I,color:"inherit",children:n(Dp,{sx:{bgcolor:"#db1e2f"},alt:E.name[0],children:E.name[0].charAt(0)})})]}),n(Wh,{id:"menu-appbar",anchorEl:D,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(D),onClose:R,children:n(wh,{user:E,auth:e})})]})})}):t(Nh,{children:[n(Lh,{children:t(Ih,{children:[t(Rh,{children:[0!==f.length&&n(uh,{isOpen:M,onClick:F}),n(Mh,{iconUrl:g,IconComponent:v})]}),n(Vh,{children:n("span",p?{style:{fontSize:"2em"},children:u}:{style:{fontSize:"1.5em"},children:u})}),n(Fh,{children:a&&n(Ph,{children:n(jh,{placeholder:"Buscar…",inputProps:{"aria-label":"search"},type:"text",value:N,onChange:V})})}),t(Zh,{children:[y.length>0&&t(o,{children:[n(Ic,{size:"small","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:e=>{O(e.currentTarget)},color:"inherit",children:n(Hh,{children:n("img",{src:"data:image/svg+xml,%3Csvg%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%220%200%2040%2040%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M7.83333%202H3.16667C2.52267%202%202%202.52267%202%203.16667V7.83333C2%208.47733%202.52267%209%203.16667%209H7.83333C8.47733%209%209%208.47733%209%207.83333V3.16667C9%202.52267%208.47733%202%207.83333%202Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M7.83333%2015H3.16667C2.52267%2015%202%2015.5227%202%2016.1667V20.8333C2%2021.4773%202.52267%2022%203.16667%2022H7.83333C8.47733%2022%209%2021.4773%209%2020.8333V16.1667C9%2015.5227%208.47733%2015%207.83333%2015Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M7.83333%2028H3.16667C2.52267%2028%202%2028.5227%202%2029.1667V33.8333C2%2034.4773%202.52267%2035%203.16667%2035H7.83333C8.47733%2035%209%2034.4773%209%2033.8333V29.1667C9%2028.5227%208.47733%2028%207.83333%2028Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M20.8333%202H16.1667C15.5227%202%2015%202.52267%2015%203.16667V7.83333C15%208.47733%2015.5227%209%2016.1667%209H20.8333C21.4773%209%2022%208.47733%2022%207.83333V3.16667C22%202.52267%2021.4773%202%2020.8333%202Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M20.8333%2015H16.1667C15.5227%2015%2015%2015.5227%2015%2016.1667V20.8333C15%2021.4773%2015.5227%2022%2016.1667%2022H20.8333C21.4773%2022%2022%2021.4773%2022%2020.8333V16.1667C22%2015.5227%2021.4773%2015%2020.8333%2015Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M20.8333%2028H16.1667C15.5227%2028%2015%2028.5227%2015%2029.1667V33.8333C15%2034.4773%2015.5227%2035%2016.1667%2035H20.8333C21.4773%2035%2022%2034.4773%2022%2033.8333V29.1667C22%2028.5227%2021.4773%2028%2020.8333%2028Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M33.8333%202H29.1667C28.5227%202%2028%202.52267%2028%203.16667V7.83333C28%208.47733%2028.5227%209%2029.1667%209H33.8333C34.4773%209%2035%208.47733%2035%207.83333V3.16667C35%202.52267%2034.4773%202%2033.8333%202Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M33.8333%2015H29.1667C28.5227%2015%2028%2015.5227%2028%2016.1667V20.8333C28%2021.4773%2028.5227%2022%2029.1667%2022H33.8333C34.4773%2022%2035%2021.4773%2035%2020.8333V16.1667C35%2015.5227%2034.4773%2015%2033.8333%2015Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M33.8333%2028H29.1667C28.5227%2028%2028%2028.5227%2028%2029.1667V33.8333C28%2034.4773%2028.5227%2035%2029.1667%2035H33.8333C34.4773%2035%2035%2034.4773%2035%2033.8333V29.1667C35%2028.5227%2034.4773%2028%2033.8333%2028Z%22%20fill%3D%22black%22%2F%3E%3C%2Fsvg%3E",alt:"Systems Menu"})})}),n(Bh,{id:"menu-appbar",anchorEl:k,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(k),onClose:()=>{O(null)},children:n(Sh,{systemsList:y})})]}),i&&n("a",{href:r,children:n(zh,{src:i,alt:"Logo da Instituição"})}),l?n("span",{}):n(Ic,{size:"small","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:I,color:"inherit",children:n(Dp,{sx:{bgcolor:"#db1e2f"},alt:E.name[0],children:E.name[0].charAt(0)})}),n(Wh,{id:"menu-appbar",anchorEl:D,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(D),onClose:R,children:n(wh,{user:E,auth:e,accountManagementUrl:x})})]})]})}),void 0!==b?b:n(ih,{visibility:M,top:"64px",setVisibility:F,links:f})]})]})},Wy=Kd.img`
|
|
737
737
|
height: 100%;
|
|
738
738
|
width: 100%;
|
|
739
739
|
border-radius: 15px;
|
package/dist/cinnamon.min.js
CHANGED
|
@@ -733,7 +733,7 @@ function Ga(e,t){const n=Wa(e,t);return"production"!==process.env.NODE_ENV?(...t
|
|
|
733
733
|
.Toastify__toast-container--top-right {
|
|
734
734
|
top: ${e=>e.topSpacing}px
|
|
735
735
|
}
|
|
736
|
-
`,wy=({topInitialPosition:e,toastProps:n})=>(e+=16,t.jsx(Ay,{topSpacing:e,children:t.jsx(py,{...n})})),Dy=n.createContext(void 0);function Ty({navbar:e,footer:o,children:r,centralized:i=!1,column:a=!1,haveToast:s=!1,components:l,createNavbarContext:c=!0}){const d=n.useRef(null),u=n.useRef(null),[p,f]=n.useState({navHeight:0,footHeight:0}),C=n.useRef(!0);n.useEffect((()=>{f({navHeight:d.current?d.current.offsetHeight:0,footHeight:u.current?u.current.offsetHeight:0})}),[d.current?.offsetHeight,u.current?.offsetHeight]);let m=e?p.navHeight:0;m+=o?p.footHeight:0;const[h,y]=n.useState({...e});n.useEffect((()=>{c&&!C.current?y({...e}):C.current=!1}),[e]);const g=n.useMemo((()=>{if(c)return new Uh({...h},y)}),[c,h,y]);return n.useEffect((()=>{C.current=!0}),[g]),t.jsxs(Dy.Provider,{value:g,children:[t.jsx("div",{ref:d,style:{display:"inline"},children:l?.navbar?l.navbar:t.jsx(Oy,{...e})}),t.jsxs(Nh,{style:{minHeight:`calc(100vh - ${m}px)`,alignItems:i?"center":"normal",justifyContent:i?"center":"normal",flexDirection:a?"column":"row"},children:[s&&(l?.toastContainer?l.toastContainer:t.jsx(wy,{toastProps:{position:"top-right"},topInitialPosition:p.navHeight})),r]}),t.jsx("div",{ref:u,style:{display:"inline"},children:l?.footer?l.footer:t.jsx(Yh,{...o})})]})}const Oy=({auth:e,logoRedirectUrl:o="/",logoSrc:r,haveSearchBar:i=!1,searchFunction:a=(()=>{}),hiddenUser:s=!1,user:l={name:"-",email:"-"},title:c="",h1:d=!1,sideMenuLinks:u=[],isLandingPage:p=!1,systemsList:f=[],currentSystemIconUrl:C,children:m,IconComponent:h,accountManagementUrl:y})=>{const[g,b]=n.useState(l),v=n.useContext(Dy);v&&(c=v.title??c,u=v.sideMenuLinks??u,i=v.haveSearchBar??i,a=v.searchFunction??(()=>{})),n.useEffect((()=>{!async function(){e&&b({name:e.user?.profile?.given_name??"",email:e.user?.profile?.email??""})}()}),[e]);const[x,E]=n.useState(null),[A,w]=n.useState(null),[D,T]=n.useState(!1),[O,k]=n.useState(""),M=e=>{E(e.currentTarget)},S=()=>{E(null)};function N(e){k(e.target.value),a(e.target.value)}function j(){T(!D)}return t.jsxs(t.Fragment,{children:[t.jsx(Ju,{styles:{body:{paddingRight:"0px !important"}}}),p?t.jsx(gh,{children:t.jsx(bh,{children:t.jsxs(vh,{children:[r&&t.jsx("a",{href:o,children:t.jsx(kh,{src:r,alt:"Logo da Instituição"})}),t.jsx(Eh,{children:d?t.jsx("span",{style:{fontSize:"2em"},children:c}):t.jsx("span",{style:{fontSize:"1.5em"},children:c})}),s?t.jsx("span",{children:i&&t.jsx(Ah,{children:t.jsx(wh,{children:t.jsx(Dh,{placeholder:"Buscar…",inputProps:{"aria-label":"search"},type:"text",value:O,onChange:N})})})}):t.jsxs(t.Fragment,{children:[i&&t.jsx(Ah,{children:t.jsx(wh,{children:t.jsx(Dh,{placeholder:"Buscar…",inputProps:{"aria-label":"search"},type:"text",value:O,onChange:N})})}),t.jsx(gc,{size:"small","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:M,color:"inherit",children:t.jsx(dp,{sx:{bgcolor:"#db1e2f"},alt:g.name[0],children:g.name[0].charAt(0)})})]}),t.jsx(Mh,{id:"menu-appbar",anchorEl:x,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(x),onClose:S,children:t.jsx(uh,{user:g,auth:e})})]})})}):t.jsxs(gh,{children:[t.jsx(bh,{children:t.jsxs(vh,{children:[t.jsxs(xh,{children:[0!==u.length&&t.jsx(_m,{isOpen:D,onClick:j}),t.jsx(hh,{iconUrl:C,IconComponent:h})]}),t.jsx(Eh,{children:d?t.jsx("span",{style:{fontSize:"2em"},children:c}):t.jsx("span",{style:{fontSize:"1.5em"},children:c})}),t.jsx(Ah,{children:i&&t.jsx(wh,{children:t.jsx(Dh,{placeholder:"Buscar…",inputProps:{"aria-label":"search"},type:"text",value:O,onChange:N})})}),t.jsxs(Th,{children:[f.length>0&&t.jsxs(t.Fragment,{children:[t.jsx(gc,{size:"small","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:e=>{w(e.currentTarget)},color:"inherit",children:t.jsx(Oh,{children:t.jsx("img",{src:"data:image/svg+xml,%3Csvg%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%220%200%2040%2040%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M7.83333%202H3.16667C2.52267%202%202%202.52267%202%203.16667V7.83333C2%208.47733%202.52267%209%203.16667%209H7.83333C8.47733%209%209%208.47733%209%207.83333V3.16667C9%202.52267%208.47733%202%207.83333%202Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M7.83333%2015H3.16667C2.52267%2015%202%2015.5227%202%2016.1667V20.8333C2%2021.4773%202.52267%2022%203.16667%2022H7.83333C8.47733%2022%209%2021.4773%209%2020.8333V16.1667C9%2015.5227%208.47733%2015%207.83333%2015Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M7.83333%2028H3.16667C2.52267%2028%202%2028.5227%202%2029.1667V33.8333C2%2034.4773%202.52267%2035%203.16667%2035H7.83333C8.47733%2035%209%2034.4773%209%2033.8333V29.1667C9%2028.5227%208.47733%2028%207.83333%2028Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M20.8333%202H16.1667C15.5227%202%2015%202.52267%2015%203.16667V7.83333C15%208.47733%2015.5227%209%2016.1667%209H20.8333C21.4773%209%2022%208.47733%2022%207.83333V3.16667C22%202.52267%2021.4773%202%2020.8333%202Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M20.8333%2015H16.1667C15.5227%2015%2015%2015.5227%2015%2016.1667V20.8333C15%2021.4773%2015.5227%2022%2016.1667%2022H20.8333C21.4773%2022%2022%2021.4773%2022%2020.8333V16.1667C22%2015.5227%2021.4773%2015%2020.8333%2015Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M20.8333%2028H16.1667C15.5227%2028%2015%2028.5227%2015%2029.1667V33.8333C15%2034.4773%2015.5227%2035%2016.1667%2035H20.8333C21.4773%2035%2022%2034.4773%2022%2033.8333V29.1667C22%2028.5227%2021.4773%2028%2020.8333%2028Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M33.8333%202H29.1667C28.5227%202%2028%202.52267%2028%203.16667V7.83333C28%208.47733%2028.5227%209%2029.1667%209H33.8333C34.4773%209%2035%208.47733%2035%207.83333V3.16667C35%202.52267%2034.4773%202%2033.8333%202Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M33.8333%2015H29.1667C28.5227%2015%2028%2015.5227%2028%2016.1667V20.8333C28%2021.4773%2028.5227%2022%2029.1667%2022H33.8333C34.4773%2022%2035%2021.4773%2035%2020.8333V16.1667C35%2015.5227%2034.4773%2015%2033.8333%2015Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M33.8333%2028H29.1667C28.5227%2028%2028%2028.5227%2028%2029.1667V33.8333C28%2034.4773%2028.5227%2035%2029.1667%2035H33.8333C34.4773%2035%2035%2034.4773%2035%2033.8333V29.1667C35%2028.5227%2034.4773%2028%2033.8333%2028Z%22%20fill%3D%22black%22%2F%3E%3C%2Fsvg%3E",alt:"Systems Menu"})})}),t.jsx(Sh,{id:"menu-appbar",anchorEl:A,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(A),onClose:()=>{w(null)},children:t.jsx(yh,{systemsList:f})})]}),r&&t.jsx("a",{href:o,children:t.jsx(kh,{src:r,alt:"Logo da Instituição"})}),s?t.jsx("span",{}):t.jsx(gc,{size:"small","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:M,color:"inherit",children:t.jsx(dp,{sx:{bgcolor:"#db1e2f"},alt:g.name[0],children:g.name[0].charAt(0)})}),t.jsx(Mh,{id:"menu-appbar",anchorEl:x,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(x),onClose:S,children:t.jsx(uh,{user:g,auth:e,accountManagementUrl:y})})]})]})}),void 0!==m?m:t.jsx(Um,{visibility:D,top:"64px",setVisibility:j,links:u})]})]})},ky=Vd.img`
|
|
736
|
+
`,wy=({topInitialPosition:e,toastProps:n})=>(e+=16,t.jsx(Ay,{topSpacing:e,children:t.jsx(py,{...n})})),Dy=n.createContext(void 0);function Ty({navbar:e,footer:o,children:r,centralized:i=!1,column:a=!1,haveToast:s=!1,components:l,createNavbarContext:c=!0}){const d=n.useRef(null),u=n.useRef(null),[p,f]=n.useState({navHeight:0,footHeight:0}),C=n.useRef(!0);n.useEffect((()=>{f({navHeight:d.current?d.current.offsetHeight:0,footHeight:u.current?u.current.offsetHeight:0})}),[d.current?.offsetHeight,u.current?.offsetHeight]);let m=e?p.navHeight:0;m+=o?p.footHeight:0;const[h,y]=n.useState({...e});n.useEffect((()=>{c&&!C.current?y({...e}):C.current=!1}),[e]);const g=n.useMemo((()=>{if(c)return new Uh({...h},y)}),[c,h,y]);return n.useEffect((()=>{C.current=!0}),[g]),t.jsxs(Dy.Provider,{value:g,children:[t.jsx("div",{ref:d,style:{display:"inline"},children:l?.navbar?l.navbar:t.jsx(Oy,{...e})}),t.jsxs(Nh,{style:{minHeight:`calc(100vh - ${m}px)`,height:`calc(100vh - ${m}px)`,alignItems:i?"center":"normal",justifyContent:i?"center":"normal",flexDirection:a?"column":"row"},children:[s&&(l?.toastContainer?l.toastContainer:t.jsx(wy,{toastProps:{position:"top-right"},topInitialPosition:p.navHeight})),r]}),t.jsx("div",{ref:u,style:{display:"inline"},children:l?.footer?l.footer:t.jsx(Yh,{...o})})]})}const Oy=({auth:e,logoRedirectUrl:o="/",logoSrc:r,haveSearchBar:i=!1,searchFunction:a=(()=>{}),hiddenUser:s=!1,user:l={name:"-",email:"-"},title:c="",h1:d=!1,sideMenuLinks:u=[],isLandingPage:p=!1,systemsList:f=[],currentSystemIconUrl:C,children:m,IconComponent:h,accountManagementUrl:y})=>{const[g,b]=n.useState(l),v=n.useContext(Dy);v&&(c=v.title??c,u=v.sideMenuLinks??u,i=v.haveSearchBar??i,a=v.searchFunction??(()=>{})),n.useEffect((()=>{!async function(){e&&b({name:e.user?.profile?.given_name??"",email:e.user?.profile?.email??""})}()}),[e]);const[x,E]=n.useState(null),[A,w]=n.useState(null),[D,T]=n.useState(!1),[O,k]=n.useState(""),M=e=>{E(e.currentTarget)},S=()=>{E(null)};function N(e){k(e.target.value),a(e.target.value)}function j(){T(!D)}return t.jsxs(t.Fragment,{children:[t.jsx(Ju,{styles:{body:{paddingRight:"0px !important"}}}),p?t.jsx(gh,{children:t.jsx(bh,{children:t.jsxs(vh,{children:[r&&t.jsx("a",{href:o,children:t.jsx(kh,{src:r,alt:"Logo da Instituição"})}),t.jsx(Eh,{children:d?t.jsx("span",{style:{fontSize:"2em"},children:c}):t.jsx("span",{style:{fontSize:"1.5em"},children:c})}),s?t.jsx("span",{children:i&&t.jsx(Ah,{children:t.jsx(wh,{children:t.jsx(Dh,{placeholder:"Buscar…",inputProps:{"aria-label":"search"},type:"text",value:O,onChange:N})})})}):t.jsxs(t.Fragment,{children:[i&&t.jsx(Ah,{children:t.jsx(wh,{children:t.jsx(Dh,{placeholder:"Buscar…",inputProps:{"aria-label":"search"},type:"text",value:O,onChange:N})})}),t.jsx(gc,{size:"small","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:M,color:"inherit",children:t.jsx(dp,{sx:{bgcolor:"#db1e2f"},alt:g.name[0],children:g.name[0].charAt(0)})})]}),t.jsx(Mh,{id:"menu-appbar",anchorEl:x,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(x),onClose:S,children:t.jsx(uh,{user:g,auth:e})})]})})}):t.jsxs(gh,{children:[t.jsx(bh,{children:t.jsxs(vh,{children:[t.jsxs(xh,{children:[0!==u.length&&t.jsx(_m,{isOpen:D,onClick:j}),t.jsx(hh,{iconUrl:C,IconComponent:h})]}),t.jsx(Eh,{children:d?t.jsx("span",{style:{fontSize:"2em"},children:c}):t.jsx("span",{style:{fontSize:"1.5em"},children:c})}),t.jsx(Ah,{children:i&&t.jsx(wh,{children:t.jsx(Dh,{placeholder:"Buscar…",inputProps:{"aria-label":"search"},type:"text",value:O,onChange:N})})}),t.jsxs(Th,{children:[f.length>0&&t.jsxs(t.Fragment,{children:[t.jsx(gc,{size:"small","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:e=>{w(e.currentTarget)},color:"inherit",children:t.jsx(Oh,{children:t.jsx("img",{src:"data:image/svg+xml,%3Csvg%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%220%200%2040%2040%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M7.83333%202H3.16667C2.52267%202%202%202.52267%202%203.16667V7.83333C2%208.47733%202.52267%209%203.16667%209H7.83333C8.47733%209%209%208.47733%209%207.83333V3.16667C9%202.52267%208.47733%202%207.83333%202Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M7.83333%2015H3.16667C2.52267%2015%202%2015.5227%202%2016.1667V20.8333C2%2021.4773%202.52267%2022%203.16667%2022H7.83333C8.47733%2022%209%2021.4773%209%2020.8333V16.1667C9%2015.5227%208.47733%2015%207.83333%2015Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M7.83333%2028H3.16667C2.52267%2028%202%2028.5227%202%2029.1667V33.8333C2%2034.4773%202.52267%2035%203.16667%2035H7.83333C8.47733%2035%209%2034.4773%209%2033.8333V29.1667C9%2028.5227%208.47733%2028%207.83333%2028Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M20.8333%202H16.1667C15.5227%202%2015%202.52267%2015%203.16667V7.83333C15%208.47733%2015.5227%209%2016.1667%209H20.8333C21.4773%209%2022%208.47733%2022%207.83333V3.16667C22%202.52267%2021.4773%202%2020.8333%202Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M20.8333%2015H16.1667C15.5227%2015%2015%2015.5227%2015%2016.1667V20.8333C15%2021.4773%2015.5227%2022%2016.1667%2022H20.8333C21.4773%2022%2022%2021.4773%2022%2020.8333V16.1667C22%2015.5227%2021.4773%2015%2020.8333%2015Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M20.8333%2028H16.1667C15.5227%2028%2015%2028.5227%2015%2029.1667V33.8333C15%2034.4773%2015.5227%2035%2016.1667%2035H20.8333C21.4773%2035%2022%2034.4773%2022%2033.8333V29.1667C22%2028.5227%2021.4773%2028%2020.8333%2028Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M33.8333%202H29.1667C28.5227%202%2028%202.52267%2028%203.16667V7.83333C28%208.47733%2028.5227%209%2029.1667%209H33.8333C34.4773%209%2035%208.47733%2035%207.83333V3.16667C35%202.52267%2034.4773%202%2033.8333%202Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M33.8333%2015H29.1667C28.5227%2015%2028%2015.5227%2028%2016.1667V20.8333C28%2021.4773%2028.5227%2022%2029.1667%2022H33.8333C34.4773%2022%2035%2021.4773%2035%2020.8333V16.1667C35%2015.5227%2034.4773%2015%2033.8333%2015Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M33.8333%2028H29.1667C28.5227%2028%2028%2028.5227%2028%2029.1667V33.8333C28%2034.4773%2028.5227%2035%2029.1667%2035H33.8333C34.4773%2035%2035%2034.4773%2035%2033.8333V29.1667C35%2028.5227%2034.4773%2028%2033.8333%2028Z%22%20fill%3D%22black%22%2F%3E%3C%2Fsvg%3E",alt:"Systems Menu"})})}),t.jsx(Sh,{id:"menu-appbar",anchorEl:A,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(A),onClose:()=>{w(null)},children:t.jsx(yh,{systemsList:f})})]}),r&&t.jsx("a",{href:o,children:t.jsx(kh,{src:r,alt:"Logo da Instituição"})}),s?t.jsx("span",{}):t.jsx(gc,{size:"small","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:M,color:"inherit",children:t.jsx(dp,{sx:{bgcolor:"#db1e2f"},alt:g.name[0],children:g.name[0].charAt(0)})}),t.jsx(Mh,{id:"menu-appbar",anchorEl:x,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(x),onClose:S,children:t.jsx(uh,{user:g,auth:e,accountManagementUrl:y})})]})]})}),void 0!==m?m:t.jsx(Um,{visibility:D,top:"64px",setVisibility:j,links:u})]})]})},ky=Vd.img`
|
|
737
737
|
height: 100%;
|
|
738
738
|
width: 100%;
|
|
739
739
|
border-radius: 15px;
|
package/dist/cinnamon.ssr.js
CHANGED
|
@@ -733,7 +733,7 @@ function Ba(e,t){const n=za(e,t);return"production"!==process.env.NODE_ENV?(...t
|
|
|
733
733
|
.Toastify__toast-container--top-right {
|
|
734
734
|
top: ${e=>e.topSpacing}px
|
|
735
735
|
}
|
|
736
|
-
`,Ay=({topInitialPosition:t,toastProps:n})=>(t+=16,e.jsx(Ey,{topSpacing:t,children:e.jsx(uy,{...n})})),wy=t.createContext(void 0);function Dy({navbar:n,footer:o,children:r,centralized:i=!1,column:a=!1,haveToast:s=!1,components:l,createNavbarContext:c=!0}){const d=t.useRef(null),u=t.useRef(null),[p,f]=t.useState({navHeight:0,footHeight:0}),C=t.useRef(!0);t.useEffect((()=>{f({navHeight:d.current?d.current.offsetHeight:0,footHeight:u.current?u.current.offsetHeight:0})}),[d.current?.offsetHeight,u.current?.offsetHeight]);let m=n?p.navHeight:0;m+=o?p.footHeight:0;const[h,y]=t.useState({...n});t.useEffect((()=>{c&&!C.current?y({...n}):C.current=!1}),[n]);const g=t.useMemo((()=>{if(c)return new Yh({...h},y)}),[c,h,y]);return t.useEffect((()=>{C.current=!0}),[g]),e.jsxs(wy.Provider,{value:g,children:[e.jsx("div",{ref:d,style:{display:"inline"},children:l?.navbar?l.navbar:e.jsx(Ty,{...n})}),e.jsxs(Sh,{style:{minHeight:`calc(100vh - ${m}px)`,alignItems:i?"center":"normal",justifyContent:i?"center":"normal",flexDirection:a?"column":"row"},children:[s&&(l?.toastContainer?l.toastContainer:e.jsx(Ay,{toastProps:{position:"top-right"},topInitialPosition:p.navHeight})),r]}),e.jsx("div",{ref:u,style:{display:"inline"},children:l?.footer?l.footer:e.jsx(Gh,{...o})})]})}const Ty=({auth:n,logoRedirectUrl:o="/",logoSrc:r,haveSearchBar:i=!1,searchFunction:a=(()=>{}),hiddenUser:s=!1,user:l={name:"-",email:"-"},title:c="",h1:d=!1,sideMenuLinks:u=[],isLandingPage:p=!1,systemsList:f=[],currentSystemIconUrl:C,children:m,IconComponent:h,accountManagementUrl:y})=>{const[g,b]=t.useState(l),v=t.useContext(wy);v&&(c=v.title??c,u=v.sideMenuLinks??u,i=v.haveSearchBar??i,a=v.searchFunction??(()=>{})),t.useEffect((()=>{!async function(){n&&b({name:n.user?.profile?.given_name??"",email:n.user?.profile?.email??""})}()}),[n]);const[x,E]=t.useState(null),[A,w]=t.useState(null),[D,T]=t.useState(!1),[O,k]=t.useState(""),M=e=>{E(e.currentTarget)},S=()=>{E(null)};function j(e){k(e.target.value),a(e.target.value)}function N(){T(!D)}return e.jsxs(e.Fragment,{children:[e.jsx(Uu,{styles:{body:{paddingRight:"0px !important"}}}),p?e.jsx(yh,{children:e.jsx(gh,{children:e.jsxs(bh,{children:[r&&e.jsx("a",{href:o,children:e.jsx(Oh,{src:r,alt:"Logo da Instituição"})}),e.jsx(xh,{children:d?e.jsx("span",{style:{fontSize:"2em"},children:c}):e.jsx("span",{style:{fontSize:"1.5em"},children:c})}),s?e.jsx("span",{children:i&&e.jsx(Eh,{children:e.jsx(Ah,{children:e.jsx(wh,{placeholder:"Buscar…",inputProps:{"aria-label":"search"},type:"text",value:O,onChange:j})})})}):e.jsxs(e.Fragment,{children:[i&&e.jsx(Eh,{children:e.jsx(Ah,{children:e.jsx(wh,{placeholder:"Buscar…",inputProps:{"aria-label":"search"},type:"text",value:O,onChange:j})})}),e.jsx(yc,{size:"small","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:M,color:"inherit",children:e.jsx(cp,{sx:{bgcolor:"#db1e2f"},alt:g.name[0],children:g.name[0].charAt(0)})})]}),e.jsx(kh,{id:"menu-appbar",anchorEl:x,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(x),onClose:S,children:e.jsx(dh,{user:g,auth:n})})]})})}):e.jsxs(yh,{children:[e.jsx(gh,{children:e.jsxs(bh,{children:[e.jsxs(vh,{children:[0!==u.length&&e.jsx(Km,{isOpen:D,onClick:N}),e.jsx(mh,{iconUrl:C,IconComponent:h})]}),e.jsx(xh,{children:d?e.jsx("span",{style:{fontSize:"2em"},children:c}):e.jsx("span",{style:{fontSize:"1.5em"},children:c})}),e.jsx(Eh,{children:i&&e.jsx(Ah,{children:e.jsx(wh,{placeholder:"Buscar…",inputProps:{"aria-label":"search"},type:"text",value:O,onChange:j})})}),e.jsxs(Dh,{children:[f.length>0&&e.jsxs(e.Fragment,{children:[e.jsx(yc,{size:"small","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:e=>{w(e.currentTarget)},color:"inherit",children:e.jsx(Th,{children:e.jsx("img",{src:"data:image/svg+xml,%3Csvg%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%220%200%2040%2040%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M7.83333%202H3.16667C2.52267%202%202%202.52267%202%203.16667V7.83333C2%208.47733%202.52267%209%203.16667%209H7.83333C8.47733%209%209%208.47733%209%207.83333V3.16667C9%202.52267%208.47733%202%207.83333%202Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M7.83333%2015H3.16667C2.52267%2015%202%2015.5227%202%2016.1667V20.8333C2%2021.4773%202.52267%2022%203.16667%2022H7.83333C8.47733%2022%209%2021.4773%209%2020.8333V16.1667C9%2015.5227%208.47733%2015%207.83333%2015Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M7.83333%2028H3.16667C2.52267%2028%202%2028.5227%202%2029.1667V33.8333C2%2034.4773%202.52267%2035%203.16667%2035H7.83333C8.47733%2035%209%2034.4773%209%2033.8333V29.1667C9%2028.5227%208.47733%2028%207.83333%2028Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M20.8333%202H16.1667C15.5227%202%2015%202.52267%2015%203.16667V7.83333C15%208.47733%2015.5227%209%2016.1667%209H20.8333C21.4773%209%2022%208.47733%2022%207.83333V3.16667C22%202.52267%2021.4773%202%2020.8333%202Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M20.8333%2015H16.1667C15.5227%2015%2015%2015.5227%2015%2016.1667V20.8333C15%2021.4773%2015.5227%2022%2016.1667%2022H20.8333C21.4773%2022%2022%2021.4773%2022%2020.8333V16.1667C22%2015.5227%2021.4773%2015%2020.8333%2015Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M20.8333%2028H16.1667C15.5227%2028%2015%2028.5227%2015%2029.1667V33.8333C15%2034.4773%2015.5227%2035%2016.1667%2035H20.8333C21.4773%2035%2022%2034.4773%2022%2033.8333V29.1667C22%2028.5227%2021.4773%2028%2020.8333%2028Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M33.8333%202H29.1667C28.5227%202%2028%202.52267%2028%203.16667V7.83333C28%208.47733%2028.5227%209%2029.1667%209H33.8333C34.4773%209%2035%208.47733%2035%207.83333V3.16667C35%202.52267%2034.4773%202%2033.8333%202Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M33.8333%2015H29.1667C28.5227%2015%2028%2015.5227%2028%2016.1667V20.8333C28%2021.4773%2028.5227%2022%2029.1667%2022H33.8333C34.4773%2022%2035%2021.4773%2035%2020.8333V16.1667C35%2015.5227%2034.4773%2015%2033.8333%2015Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M33.8333%2028H29.1667C28.5227%2028%2028%2028.5227%2028%2029.1667V33.8333C28%2034.4773%2028.5227%2035%2029.1667%2035H33.8333C34.4773%2035%2035%2034.4773%2035%2033.8333V29.1667C35%2028.5227%2034.4773%2028%2033.8333%2028Z%22%20fill%3D%22black%22%2F%3E%3C%2Fsvg%3E",alt:"Systems Menu"})})}),e.jsx(Mh,{id:"menu-appbar",anchorEl:A,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(A),onClose:()=>{w(null)},children:e.jsx(hh,{systemsList:f})})]}),r&&e.jsx("a",{href:o,children:e.jsx(Oh,{src:r,alt:"Logo da Instituição"})}),s?e.jsx("span",{}):e.jsx(yc,{size:"small","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:M,color:"inherit",children:e.jsx(cp,{sx:{bgcolor:"#db1e2f"},alt:g.name[0],children:g.name[0].charAt(0)})}),e.jsx(kh,{id:"menu-appbar",anchorEl:x,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(x),onClose:S,children:e.jsx(dh,{user:g,auth:n,accountManagementUrl:y})})]})]})}),void 0!==m?m:e.jsx(Ym,{visibility:D,top:"64px",setVisibility:N,links:u})]})]})},Oy=Rd.img`
|
|
736
|
+
`,Ay=({topInitialPosition:t,toastProps:n})=>(t+=16,e.jsx(Ey,{topSpacing:t,children:e.jsx(uy,{...n})})),wy=t.createContext(void 0);function Dy({navbar:n,footer:o,children:r,centralized:i=!1,column:a=!1,haveToast:s=!1,components:l,createNavbarContext:c=!0}){const d=t.useRef(null),u=t.useRef(null),[p,f]=t.useState({navHeight:0,footHeight:0}),C=t.useRef(!0);t.useEffect((()=>{f({navHeight:d.current?d.current.offsetHeight:0,footHeight:u.current?u.current.offsetHeight:0})}),[d.current?.offsetHeight,u.current?.offsetHeight]);let m=n?p.navHeight:0;m+=o?p.footHeight:0;const[h,y]=t.useState({...n});t.useEffect((()=>{c&&!C.current?y({...n}):C.current=!1}),[n]);const g=t.useMemo((()=>{if(c)return new Yh({...h},y)}),[c,h,y]);return t.useEffect((()=>{C.current=!0}),[g]),e.jsxs(wy.Provider,{value:g,children:[e.jsx("div",{ref:d,style:{display:"inline"},children:l?.navbar?l.navbar:e.jsx(Ty,{...n})}),e.jsxs(Sh,{style:{minHeight:`calc(100vh - ${m}px)`,height:`calc(100vh - ${m}px)`,alignItems:i?"center":"normal",justifyContent:i?"center":"normal",flexDirection:a?"column":"row"},children:[s&&(l?.toastContainer?l.toastContainer:e.jsx(Ay,{toastProps:{position:"top-right"},topInitialPosition:p.navHeight})),r]}),e.jsx("div",{ref:u,style:{display:"inline"},children:l?.footer?l.footer:e.jsx(Gh,{...o})})]})}const Ty=({auth:n,logoRedirectUrl:o="/",logoSrc:r,haveSearchBar:i=!1,searchFunction:a=(()=>{}),hiddenUser:s=!1,user:l={name:"-",email:"-"},title:c="",h1:d=!1,sideMenuLinks:u=[],isLandingPage:p=!1,systemsList:f=[],currentSystemIconUrl:C,children:m,IconComponent:h,accountManagementUrl:y})=>{const[g,b]=t.useState(l),v=t.useContext(wy);v&&(c=v.title??c,u=v.sideMenuLinks??u,i=v.haveSearchBar??i,a=v.searchFunction??(()=>{})),t.useEffect((()=>{!async function(){n&&b({name:n.user?.profile?.given_name??"",email:n.user?.profile?.email??""})}()}),[n]);const[x,E]=t.useState(null),[A,w]=t.useState(null),[D,T]=t.useState(!1),[O,k]=t.useState(""),M=e=>{E(e.currentTarget)},S=()=>{E(null)};function j(e){k(e.target.value),a(e.target.value)}function N(){T(!D)}return e.jsxs(e.Fragment,{children:[e.jsx(Uu,{styles:{body:{paddingRight:"0px !important"}}}),p?e.jsx(yh,{children:e.jsx(gh,{children:e.jsxs(bh,{children:[r&&e.jsx("a",{href:o,children:e.jsx(Oh,{src:r,alt:"Logo da Instituição"})}),e.jsx(xh,{children:d?e.jsx("span",{style:{fontSize:"2em"},children:c}):e.jsx("span",{style:{fontSize:"1.5em"},children:c})}),s?e.jsx("span",{children:i&&e.jsx(Eh,{children:e.jsx(Ah,{children:e.jsx(wh,{placeholder:"Buscar…",inputProps:{"aria-label":"search"},type:"text",value:O,onChange:j})})})}):e.jsxs(e.Fragment,{children:[i&&e.jsx(Eh,{children:e.jsx(Ah,{children:e.jsx(wh,{placeholder:"Buscar…",inputProps:{"aria-label":"search"},type:"text",value:O,onChange:j})})}),e.jsx(yc,{size:"small","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:M,color:"inherit",children:e.jsx(cp,{sx:{bgcolor:"#db1e2f"},alt:g.name[0],children:g.name[0].charAt(0)})})]}),e.jsx(kh,{id:"menu-appbar",anchorEl:x,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(x),onClose:S,children:e.jsx(dh,{user:g,auth:n})})]})})}):e.jsxs(yh,{children:[e.jsx(gh,{children:e.jsxs(bh,{children:[e.jsxs(vh,{children:[0!==u.length&&e.jsx(Km,{isOpen:D,onClick:N}),e.jsx(mh,{iconUrl:C,IconComponent:h})]}),e.jsx(xh,{children:d?e.jsx("span",{style:{fontSize:"2em"},children:c}):e.jsx("span",{style:{fontSize:"1.5em"},children:c})}),e.jsx(Eh,{children:i&&e.jsx(Ah,{children:e.jsx(wh,{placeholder:"Buscar…",inputProps:{"aria-label":"search"},type:"text",value:O,onChange:j})})}),e.jsxs(Dh,{children:[f.length>0&&e.jsxs(e.Fragment,{children:[e.jsx(yc,{size:"small","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:e=>{w(e.currentTarget)},color:"inherit",children:e.jsx(Th,{children:e.jsx("img",{src:"data:image/svg+xml,%3Csvg%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%220%200%2040%2040%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M7.83333%202H3.16667C2.52267%202%202%202.52267%202%203.16667V7.83333C2%208.47733%202.52267%209%203.16667%209H7.83333C8.47733%209%209%208.47733%209%207.83333V3.16667C9%202.52267%208.47733%202%207.83333%202Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M7.83333%2015H3.16667C2.52267%2015%202%2015.5227%202%2016.1667V20.8333C2%2021.4773%202.52267%2022%203.16667%2022H7.83333C8.47733%2022%209%2021.4773%209%2020.8333V16.1667C9%2015.5227%208.47733%2015%207.83333%2015Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M7.83333%2028H3.16667C2.52267%2028%202%2028.5227%202%2029.1667V33.8333C2%2034.4773%202.52267%2035%203.16667%2035H7.83333C8.47733%2035%209%2034.4773%209%2033.8333V29.1667C9%2028.5227%208.47733%2028%207.83333%2028Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M20.8333%202H16.1667C15.5227%202%2015%202.52267%2015%203.16667V7.83333C15%208.47733%2015.5227%209%2016.1667%209H20.8333C21.4773%209%2022%208.47733%2022%207.83333V3.16667C22%202.52267%2021.4773%202%2020.8333%202Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M20.8333%2015H16.1667C15.5227%2015%2015%2015.5227%2015%2016.1667V20.8333C15%2021.4773%2015.5227%2022%2016.1667%2022H20.8333C21.4773%2022%2022%2021.4773%2022%2020.8333V16.1667C22%2015.5227%2021.4773%2015%2020.8333%2015Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M20.8333%2028H16.1667C15.5227%2028%2015%2028.5227%2015%2029.1667V33.8333C15%2034.4773%2015.5227%2035%2016.1667%2035H20.8333C21.4773%2035%2022%2034.4773%2022%2033.8333V29.1667C22%2028.5227%2021.4773%2028%2020.8333%2028Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M33.8333%202H29.1667C28.5227%202%2028%202.52267%2028%203.16667V7.83333C28%208.47733%2028.5227%209%2029.1667%209H33.8333C34.4773%209%2035%208.47733%2035%207.83333V3.16667C35%202.52267%2034.4773%202%2033.8333%202Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M33.8333%2015H29.1667C28.5227%2015%2028%2015.5227%2028%2016.1667V20.8333C28%2021.4773%2028.5227%2022%2029.1667%2022H33.8333C34.4773%2022%2035%2021.4773%2035%2020.8333V16.1667C35%2015.5227%2034.4773%2015%2033.8333%2015Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M33.8333%2028H29.1667C28.5227%2028%2028%2028.5227%2028%2029.1667V33.8333C28%2034.4773%2028.5227%2035%2029.1667%2035H33.8333C34.4773%2035%2035%2034.4773%2035%2033.8333V29.1667C35%2028.5227%2034.4773%2028%2033.8333%2028Z%22%20fill%3D%22black%22%2F%3E%3C%2Fsvg%3E",alt:"Systems Menu"})})}),e.jsx(Mh,{id:"menu-appbar",anchorEl:A,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(A),onClose:()=>{w(null)},children:e.jsx(hh,{systemsList:f})})]}),r&&e.jsx("a",{href:o,children:e.jsx(Oh,{src:r,alt:"Logo da Instituição"})}),s?e.jsx("span",{}):e.jsx(yc,{size:"small","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:M,color:"inherit",children:e.jsx(cp,{sx:{bgcolor:"#db1e2f"},alt:g.name[0],children:g.name[0].charAt(0)})}),e.jsx(kh,{id:"menu-appbar",anchorEl:x,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(x),onClose:S,children:e.jsx(dh,{user:g,auth:n,accountManagementUrl:y})})]})]})}),void 0!==m?m:e.jsx(Ym,{visibility:D,top:"64px",setVisibility:N,links:u})]})]})},Oy=Rd.img`
|
|
737
737
|
height: 100%;
|
|
738
738
|
width: 100%;
|
|
739
739
|
border-radius: 15px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cincoders/cinnamon",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "A collection components for standardized system appearance and functionality, easing development in web applications.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "CInCoders <cincoders@cin.ufpe.br> (https://cincoders.cin.ufpe.br)",
|
|
@@ -96,7 +96,8 @@
|
|
|
96
96
|
"react-oidc-context": "^2.2.2",
|
|
97
97
|
"react-toastify": "^9.1.1",
|
|
98
98
|
"react-transition-group": "^4.4.2",
|
|
99
|
-
"styled-components": "^5.3.0"
|
|
99
|
+
"styled-components": "^5.3.0",
|
|
100
|
+
"buffer": "^6.0.3"
|
|
100
101
|
},
|
|
101
102
|
"overrides": {
|
|
102
103
|
"chokidar": "3.5.3",
|