{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "profile-card", "title": "Profile Card", "description": "User profile card with cover image, avatar, name, role, and stats row in two layout styles.", "registryDependencies": [ "https://raw.githubusercontent.com/dnachavez/adminlte-next/master/public/r/adminlte-theme.json", "https://raw.githubusercontent.com/dnachavez/adminlte-next/master/public/r/adminlte-description-block.json" ], "files": [ { "path": "registry/new-york/profile-card/components/profile-card.tsx", "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@/registry/new-york/adminlte-theme/lib/cn\"\n\n/* ---------------------------------------------------------------------------\n * Types\n * -------------------------------------------------------------------------- */\n\ninterface ProfileStat {\n label: string\n value: string | number\n}\n\n/* ---------------------------------------------------------------------------\n * ProfileCard\n * -------------------------------------------------------------------------- */\n\ninterface ProfileCardProps extends React.HTMLAttributes {\n name: string\n avatarUrl: string\n description?: string\n backgroundUrl?: string\n backgroundColor?: string\n stats?: ProfileStat[]\n variant?: \"style1\" | \"style2\"\n}\n\nconst ProfileCard = React.forwardRef(\n (\n {\n className,\n name,\n avatarUrl,\n description,\n backgroundUrl,\n backgroundColor = \"#3c8dbc\",\n stats = [],\n variant = \"style1\",\n children,\n ...props\n },\n ref\n ) => {\n if (variant === \"style2\") {\n return (\n \n {/* Side-by-side layout */}\n
\n {/* Avatar */}\n \n\n {/* Info */}\n
\n

\n {name}\n

\n {description && (\n

\n {description}\n

\n )}\n {/* Inline actions */}\n {children && (\n
\n {children}\n
\n )}\n
\n
\n\n {/* Stats row */}\n {stats.length > 0 && (\n
\n {stats.map((stat, index) => (\n \n \n {stat.value}\n \n \n {stat.label}\n \n
\n ))}\n \n )}\n \n )\n }\n\n /* Style 1 - widget-user (default) */\n return (\n \n {/* Header area with background */}\n \n {/* Overlay for readability when background image is used */}\n {backgroundUrl && (\n
\n )}\n
\n\n {/* Avatar - overlapping the header */}\n
\n \n
\n\n {/* Name and description */}\n
\n

\n {name}\n

\n {description && (\n

{description}

\n )}\n
\n\n {/* Stats row */}\n {stats.length > 0 && (\n
\n {stats.map((stat, index) => (\n \n \n {stat.value}\n \n \n {stat.label}\n \n
\n ))}\n \n )}\n\n {/* Footer / actions */}\n {children && (\n
\n {children}\n
\n )}\n \n )\n }\n)\nProfileCard.displayName = \"ProfileCard\"\n\nexport { ProfileCard }\nexport type { ProfileCardProps, ProfileStat }\n", "type": "registry:component" } ], "type": "registry:component" }