{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "userprofilecard", "type": "registry:component", "title": "UserProfileCard", "description": "Componente Concorde UserProfileCard — un solo archivo, UserProfileCard.tsx.", "dependencies": [ "react" ], "registryDependencies": [], "files": [ { "path": "components/UserProfileCard.tsx", "type": "registry:file", "target": "components/UserProfileCard.tsx", "content": "\"use client\";\n\n/**\n * UserProfileCard — Generado por Concorde\n * Fuente: Figma VOYAGER · \"UserProfileCard\" (nodo 2035:16581)\n *\n * Tarjeta de zona de usuario 766×140 (blanca, radius 16, drop shadow suave).\n * Dos filas internas de 734 de ancho separadas por un divisor #E1E3E2:\n * 1ª (52px): avatar (AvatarZone) + «¡Hola, {usuario}!» ······· «Tu perfil ›» (ProfileButton)\n * 2ª (40px): RIESGO DEL PERFIL / valor + PUNTOS VMC / ⭐ pts ⓘ ··· «Historial ›» (ProfileButton)\n *\n * Figma manda en lo visual; Concorde compone los componentes existentes\n * (AvatarZone, ProfileButton, StarIcon) y aporta el layout + accesibilidad.\n */\n\nimport type { JSX, MouseEventHandler } from \"react\";\nimport AvatarZone from \"@/concorde/components/AvatarZone\";\nimport ProfileButton from \"@/concorde/components/ProfileButton\";\nimport StarIcon from \"@/concorde/components/StarIcon\";\nimport InfoIcon from \"@/concorde/components/InfoIcon\";\n\n// ─── Types ────────────────────────────────────────────────────────────────────\n\nexport interface UserProfileCardProps {\n /** Usuario mostrado en «¡Hola, {usuario}!» (default \"ZAEX5G\"). */\n username?: string;\n /** Etiqueta de la 1ª estadística (default \"RIESGO DEL PERFIL\"). */\n riskLabel?: string;\n /** Valor de riesgo (default \"Muy bajo\"). */\n riskValue?: string;\n /** Etiqueta de la 2ª estadística (default \"PUNTOS VMC\"). */\n pointsLabel?: string;\n /** Puntos VMC (default \"500 pts\"). */\n points?: string;\n /** Acción / enlace del acceso «Tu perfil». */\n onProfile?: MouseEventHandler;\n profileHref?: string;\n /** Acción / enlace del acceso «Historial». */\n onHistory?: MouseEventHandler;\n historyHref?: string;\n className?: string;\n}\n\n// ─── Self-contained CSS ───────────────────────────────────────────────────────\n\nconst STYLE_ID = \"concorde-userprofilecard-styles\";\n\nconst STYLES = `\n.upc {\n box-sizing: border-box;\n width: 766px;\n height: 140px;\n padding: 16px;\n border-radius: 16px;\n background: #ffffff;\n /* Drop shadow del filtro Figma (dilate 4 · blur 8 · negro 10%) */\n box-shadow: 0 0 8px 4px rgba(0,0,0,0.08);\n font-family: var(--vmc-font-display, \"Plus Jakarta Sans\", -apple-system, sans-serif);\n}\n.upc__inner {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n height: 100%;\n}\n/* ── Fila 1 (734×52) ── */\n.upc__row1 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 52px;\n}\n.upc__greet {\n display: flex;\n align-items: center;\n gap: 10px;\n min-width: 0;\n}\n.upc__hello {\n font-size: 18px;\n font-weight: 700;\n letter-spacing: -0.01em;\n line-height: 24px;\n white-space: nowrap;\n /* Texto con gradiente vault del Figma (paint1: #5F3ED8 → #340091 → #140046) */\n background: linear-gradient(168deg, #5F3ED8 0%, #340091 50%, #140046 100%);\n -webkit-background-clip: text;\n background-clip: text;\n color: transparent;\n}\n/* ── Divisor ── */\n.upc__divider {\n height: 1px;\n background: #E1E3E2;\n}\n/* ── Fila 2 (734×40) ── */\n.upc__row2 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 40px;\n}\n.upc__stats {\n display: flex;\n align-items: center;\n gap: 56px;\n}\n.upc__stat {\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n.upc__stat-label {\n font-size: 10px;\n font-weight: 600;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n color: #99A1AF;\n white-space: nowrap;\n}\n.upc__stat-value {\n font-size: 14px;\n font-weight: 700;\n line-height: 18px;\n white-space: nowrap;\n}\n.upc__stat-value--risk { color: #ED8936; }\n.upc__points {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n.upc__points-text { color: #3B1782; }\n.upc__info { display: block; flex-shrink: 0; }\n`;\n\nlet _stylesInjected = false;\n\n// ─── Component ────────────────────────────────────────────────────────────────\n\nexport default function UserProfileCard({\n username = \"ZAEX5G\",\n riskLabel = \"RIESGO DEL PERFIL\",\n riskValue = \"Muy bajo\",\n pointsLabel = \"PUNTOS VMC\",\n points = \"500 pts\",\n onProfile,\n profileHref,\n onHistory,\n historyHref,\n className = \"\",\n}: UserProfileCardProps): JSX.Element {\n if (typeof document !== \"undefined\" && !_stylesInjected) {\n if (!document.getElementById(STYLE_ID)) {\n const el = document.createElement(\"style\");\n el.id = STYLE_ID;\n el.textContent = STYLES;\n document.head.appendChild(el);\n }\n _stylesInjected = true;\n }\n\n return (\n <>\n