{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "cardtitle", "type": "registry:component", "title": "CardTitle", "description": "Componente Concorde CardTitle — un solo archivo, CardTitle.tsx.", "dependencies": [ "react" ], "registryDependencies": [], "files": [ { "path": "components/CardTitle.tsx", "type": "registry:file", "target": "components/CardTitle.tsx", "content": "\"use client\";\n\n/**\n * CardTitle — Generado por Concorde\n * Fuente: Figma VOYAGER · \"Title\" (nodo 2877:280)\n * Sincronizado: 2026-06-12\n *\n * Título de sección con subtítulo y brackets naranjas en esquina\n * superior-izquierda (┌) e inferior-derecha (┘). Estático.\n */\n\nimport { useId } from \"react\";\nimport type { JSX, ReactNode } from \"react\";\n\n// ─── Types ────────────────────────────────────────────────────────────────────\n\nexport interface CardTitleProps {\n /** Título (default: \"SANTANDER CONSUMER\"). Acepta texto o nodos (p.ej. un dot + texto). */\n title?: ReactNode;\n /** Subtítulo (default: \"10 Ofertas\") */\n subtitle?: string;\n /** Tamaño del título en px (default 12 · line-height = size + 4) */\n titleSize?: number;\n /** Tamaño del subtítulo en px (default 14) */\n subtitleSize?: number;\n className?: string;\n}\n\n// ─── Self-contained CSS ───────────────────────────────────────────────────────\n\nconst STYLE_ID = \"concorde-cardtitle-styles\";\n\nconst CARDTITLE_STYLES = `\n.cardtitle {\n position: relative;\n box-sizing: border-box;\n display: inline-flex;\n flex-direction: column;\n padding: 8px 12px;\n font-family: var(--vmc-font-display, \"Plus Jakarta Sans\", -apple-system, sans-serif);\n}\n.cardtitle__title {\n margin: 0;\n font-size: 12px;\n font-weight: 600;\n line-height: 16px;\n letter-spacing: 0;\n color: #3b1782;\n white-space: nowrap;\n}\n.cardtitle__subtitle {\n margin: 2px 0 0;\n font-size: 13px;\n font-weight: 400;\n line-height: 1.2;\n color: #191c1c;\n}\n.cardtitle__bracket {\n position: absolute;\n pointer-events: none;\n}\n.cardtitle__bracket--tl { top: 0; left: 0; }\n.cardtitle__bracket--br { bottom: 0; right: 0; transform: rotate(180deg); }\n`;\n\nlet _stylesInjected = false;\n\n// ─── Bracket (┌) — gradiente naranja #FF9639 → #EF852E 40% → #BE3D00 ────────────\n\nfunction Bracket({ uid, corner }: { uid: string; corner: \"tl\" | \"br\" }): JSX.Element {\n return (\n \n \n \n \n \n \n \n \n );\n}\n\n// ─── Component ────────────────────────────────────────────────────────────────\n\nexport default function CardTitle({\n title = \"SANTANDER CONSUMER\",\n subtitle = \"10 Ofertas\",\n titleSize = 12,\n subtitleSize = 14,\n className = \"\",\n}: CardTitleProps): JSX.Element {\n const uid = useId().replace(/:/g, \"-\");\n\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 = CARDTITLE_STYLES;\n document.head.appendChild(el);\n }\n _stylesInjected = true;\n }\n\n return (\n <>\n