{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "project-banner",
  "title": "ProjectBanner",
  "description": "A project-wide notice with one action.",
  "registryDependencies": [
    "https://creance.pages.dev/r/creance-base.json",
    "https://creance.pages.dev/r/progress-bar.json"
  ],
  "files": [
    {
      "path": "project-banner/ProjectBanner.css",
      "content": ".cr-project-banner {\n  display: flex;\n  flex-wrap: wrap;\n  align-items: center;\n  gap: var(--cr-space-4);\n  padding: 18px var(--cr-space-5);\n  border-radius: var(--cr-radius-xl);\n  color: var(--cr-color-text-default);\n  font-family: var(--cr-font-family-sans);\n  font-size: var(--cr-font-size-md);\n}\n\n.cr-project-banner__badge {\n  display: grid;\n  flex: none;\n  place-items: center;\n  width: 44px;\n  height: 44px;\n  border-radius: 13px;\n  background: var(--cr-color-bg-raised);\n  box-shadow: inset 0 0 0 1px var(--cr-color-border-default);\n  font-weight: var(--cr-font-weight-bold);\n}\n\n.cr-project-banner__text {\n  display: grid;\n  flex: 1 1 240px;\n  gap: 2px;\n}\n\n.cr-project-banner__message {\n  color: var(--cr-color-text-muted);\n  font-size: var(--cr-font-size-sm);\n}\n\n.cr-project-banner__progress {\n  width: 160px;\n}\n",
      "type": "registry:file",
      "target": "@components/creance/project-banner/ProjectBanner.css"
    },
    {
      "path": "project-banner/ProjectBanner.tsx",
      "content": "import type { ReactNode } from 'react';\nimport { ProgressBar } from '@/components/creance/progress-bar/ProgressBar';\nimport { cx } from '@/lib/creance/cx';\nimport './ProjectBanner.css';\n\nexport interface ProjectBannerProps {\n  /** The project. Its first letter becomes the badge. */\n  name: string;\n  /** One sentence: what needs attention. */\n  message: ReactNode;\n  /** Optional progress toward a limit, with an accessible label. */\n  progress?: { value: number; max: number; label: string };\n  /** The one action, such as \"Raise budget\". */\n  action?: ReactNode;\n  className?: string;\n}\n\n/** A project-wide notice at the top of a project's pages, with one action. */\nexport function ProjectBanner({ name, message, progress, action, className }: ProjectBannerProps) {\n  return (\n    <section aria-label={`${name} notice`} className={cx('cr-project-banner cr-surface', className)}>\n      <span className=\"cr-project-banner__badge\" aria-hidden=\"true\">\n        {name.charAt(0).toUpperCase()}\n      </span>\n      <div className=\"cr-project-banner__text\">\n        <strong>{name}</strong>\n        <span className=\"cr-project-banner__message\">{message}</span>\n      </div>\n      {progress && (\n        <div className=\"cr-project-banner__progress\">\n          <ProgressBar value={progress.value} max={progress.max} label={progress.label} />\n        </div>\n      )}\n      {action}\n    </section>\n  );\n}\n",
      "type": "registry:ui",
      "target": "@components/creance/project-banner/ProjectBanner.tsx"
    }
  ],
  "categories": [
    "molecule",
    "feedback"
  ],
  "type": "registry:ui"
}