{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "info-box", "title": "Info Box", "description": "Information display widget with colored icon area, text label, number value, and optional progress bar.", "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-progress.json" ], "files": [ { "path": "registry/new-york/info-box/components/info-box.tsx", "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@/registry/new-york/adminlte-theme/lib/cn\"\nimport {\n type AdminLTEColor,\n bgColorMap,\n} from \"@/registry/new-york/adminlte-theme/lib/colors\"\n\ninterface InfoBoxProps extends React.HTMLAttributes {\n color?: AdminLTEColor\n icon?: React.ReactNode\n text?: string\n number?: string | number\n progress?: number\n progressDescription?: string\n}\n\nconst InfoBox = React.forwardRef(\n (\n {\n className,\n color = \"aqua\",\n icon,\n text,\n number: numberValue,\n progress,\n progressDescription,\n ...props\n },\n ref\n ) => {\n const clampedProgress =\n progress !== undefined ? Math.max(0, Math.min(100, progress)) : undefined\n\n return (\n \n {/* Icon area */}\n \n {icon}\n \n\n {/* Content area */}\n
\n \n {text}\n \n \n {numberValue}\n \n\n {/* Optional progress bar */}\n {clampedProgress !== undefined && (\n
\n
\n \n
\n {progressDescription && (\n \n {progressDescription}\n \n )}\n
\n )}\n
\n \n )\n }\n)\nInfoBox.displayName = \"InfoBox\"\n\nexport { InfoBox }\nexport type { InfoBoxProps }\n", "type": "registry:component" } ], "type": "registry:component" }