veza/apps/web/dist_verification/assets/StatCard-5r7CYk9-.js
senke 203cb5d5e5 refactor: Phase 8 — Update docs, ESLint, Storybook config for SUMI
- DESIGN_TOKENS.md: Complete rewrite to document --sumi-* token system
- APP_SHELL.md: Update layout shell docs (glass bg, backdrop-blur, z-index)
- DESIGN_DIRECTION.md: Update aesthetic direction to SUMI philosophy
- .storybook/preview.tsx: Remove deleted CSS imports, update bg colors
- eslint.config.js: Update color rule message from Kodo to SUMI tokens
- tailwind.config.ts: Fix comment referencing deleted design-tokens.css

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 02:15:11 +01:00

1 line
2.3 KiB
JavaScript

import{j as e}from"./vendor-react-Dkpvlwai.js";import{C as k}from"./index-jE2AGx2y.js";import{A as M}from"./AnimatedNumber-Dt_wg-GW.js";import{b2 as C,b3 as A}from"./vendor-icons-CbmLcMl-.js";const W=({label:j,value:c,icon:v,trend:t,color:l="cyan",sparklineData:m})=>{const x={cyan:"text-primary",magenta:"text-secondary",lime:"text-success",gold:"text-warning",red:"text-destructive"},b={cyan:"bg-primary/10",magenta:"bg-secondary/10",lime:"bg-success/10",gold:"bg-warning/10",red:"bg-destructive/10"},y=r=>{if(!r||r.length<2)return null;const h=Math.min(...r),N=Math.max(...r)-h||1,p=100,a=40,$=u=>{const n=u.map((s,i)=>({x:i/(u.length-1)*p,y:a-(s-h)/N*a}));let f=`M ${n[0].x},${n[0].y}`;for(let s=0;s<n.length-1;s++){const i=n[s],o=n[s+1],g=(i.x+o.x)/2;f+=` C ${g},${i.y} ${g},${o.y} ${o.x},${o.y}`}return f};return e.jsx("svg",{width:"100%",height:a,viewBox:`0 0 ${p} ${a}`,className:"opacity-60 overflow-visible",children:e.jsx("path",{d:$(r),fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke",className:"drop-shadow-stat-sparkline"})})},d=typeof t=="string"?!t.startsWith("-"):(t||0)>=0,w=typeof t=="number"?`${Math.abs(t)}%`:t;return e.jsxs(k,{variant:"surface",className:"flex flex-col justify-between h-full p-5 relative overflow-hidden rounded-xl",children:[e.jsxs("div",{className:"flex justify-between items-start gap-4 relative z-10",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-0.5",children:j}),e.jsx("h3",{className:"text-xl font-semibold text-foreground tracking-tight truncate",children:typeof c=="number"?e.jsx(M,{value:c}):c})]}),e.jsx("div",{className:`p-2 rounded-lg shrink-0 ${b[l]} ${x[l]}`,children:v})]}),e.jsx("div",{className:"relative z-10 flex items-center gap-1.5 mt-3",children:t&&e.jsxs("div",{className:`flex items-center gap-1 text-xs font-medium ${d?"text-success":"text-destructive"}`,children:[d?e.jsx(C,{className:"w-3 h-3 shrink-0"}):e.jsx(A,{className:"w-3 h-3 shrink-0"}),e.jsx("span",{children:w}),e.jsx("span",{className:"text-muted-foreground font-normal",children:"vs last period"})]})}),m&&e.jsx("div",{className:`absolute bottom-0 left-0 right-0 h-12 ${x[l]} opacity-20 pointer-events-none`,children:y(m)})]})};export{W as S};