2 lines
3.4 KiB
JavaScript
2 lines
3.4 KiB
JavaScript
import{x as j,y as C,b as w,z as y,E as R,_ as g,j as e,F as S,H as _,J as z,r as f,i as v,B as c,S as x,T as d}from"./index-DpAn5wLF.js";import{C as M}from"./Link-Bme8npFv.js";function $(r){return j("MuiCardContent",r)}C("MuiCardContent",["root"]);const k=["className","component"],D=r=>{const{classes:o}=r;return _({root:["root"]},$,o)},I=z("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(r,o)=>o.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),U=w.forwardRef(function(o,s){const a=y({props:o,name:"MuiCardContent"}),{className:i,component:n="div"}=a,h=R(a,k),t=g({},a,{component:n}),l=D(t);return e.jsx(I,g({as:n,className:S(l.root,i),ownerState:t,ref:s},h))});var p={},E=v;Object.defineProperty(p,"__esModule",{value:!0});var b=p.default=void 0,W=E(f()),q=e;b=p.default=(0,W.default)((0,q.jsx)("path",{d:"M13 19V7.83l4.88 4.88c.39.39 1.03.39 1.42 0 .39-.39.39-1.02 0-1.41l-6.59-6.59a.9959.9959 0 0 0-1.41 0l-6.6 6.58c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L11 7.83V19c0 .55.45 1 1 1s1-.45 1-1"}),"ArrowUpwardRounded");var u={},A=v;Object.defineProperty(u,"__esModule",{value:!0});var m=u.default=void 0,P=A(f()),B=e;m=u.default=(0,P.default)((0,B.jsx)("path",{d:"M11 5v11.17l-4.88-4.88c-.39-.39-1.03-.39-1.42 0-.39.39-.39 1.02 0 1.41l6.59 6.59c.39.39 1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41a.9959.9959 0 0 0-1.41 0L13 16.17V5c0-.55-.45-1-1-1s-1 .45-1 1"}),"ArrowDownwardRounded");function T({title:r,value:o,icon:s,color:a="primary",trend:i,caption:n,accent:h=!1}){const t=typeof i=="number"?i>=0:null;return e.jsxs(M,{sx:{height:"100%",position:"relative",overflow:"hidden",borderRadius:3,boxShadow:"0 8px 24px rgba(0,0,0,0.03)",border:"1px solid rgba(0,0,0,0.04)",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)","&:hover":{transform:"translateY(-4px)",boxShadow:"0 16px 32px rgba(0,0,0,0.06)"},background:l=>`linear-gradient(145deg, ${l.palette.background.paper} 0%, ${l.palette[a].lighter}15 100%)`},children:[s&&e.jsx(c,{sx:{position:"absolute",right:-15,bottom:-15,opacity:.04,transform:"rotate(-15deg)",pointerEvents:"none"},children:e.jsx(s,{sx:{fontSize:110}})}),e.jsxs(U,{sx:{p:2.5,"&:last-child":{pb:2.5},height:"100%",display:"flex",flexDirection:"column"},children:[e.jsxs(x,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",sx:{mb:1.5,position:"relative",zIndex:2},children:[e.jsx(d,{variant:"body2",sx:{fontWeight:600,color:"text.secondary"},children:r}),s&&e.jsx(c,{sx:{width:38,height:38,borderRadius:2,display:"flex",alignItems:"center",justifyContent:"center",bgcolor:`${a}.lighter`,color:`${a}.main`,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.05)"},children:e.jsx(s,{fontSize:"small"})})]}),e.jsx(c,{sx:{flexGrow:1,position:"relative",zIndex:2},children:e.jsx(d,{variant:"h4",sx:{fontWeight:800,color:"grey.900",letterSpacing:"-0.5px",lineHeight:1},children:o})}),(t!==null||n)&&e.jsxs(x,{direction:"row",spacing:1,alignItems:"center",sx:{mt:2,pt:1.5,borderTop:"1px dashed rgba(0,0,0,0.06)",position:"relative",zIndex:2},children:[t!==null&&e.jsxs(x,{direction:"row",spacing:.25,alignItems:"center",sx:{bgcolor:t?"success.lighter":"error.lighter",px:.75,py:.25,borderRadius:1},children:[t?e.jsx(b,{sx:{fontSize:14,color:"success.dark"}}):e.jsx(m,{sx:{fontSize:14,color:"error.dark"}}),e.jsxs(d,{variant:"caption",sx:{fontWeight:700,color:t?"success.dark":"error.dark"},children:[Math.abs(i),"%"]})]}),n&&e.jsx(d,{variant:"caption",sx:{color:"text.secondary",fontWeight:600},children:n})]})]})]})}export{T as S};
|