{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "status-indicator", "title": "Status Indicator", "description": "Text-backed status indicator with domain-neutral tones and presentations.", "registryDependencies": ["askyourpolicy/ss-registry/stitch-base"], "files": [ { "path": "src/components/ui/status-indicator.tsx", "content": "import type { ComponentProps, ReactNode } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\ntype StatusIndicatorTone = \"neutral\" | \"info\" | \"success\" | \"warning\" | \"destructive\";\ntype StatusIndicatorPresentation = \"dot\" | \"badge\";\n\ntype StatusIndicatorProps = Omit, \"children\"> & {\n label: ReactNode;\n presentation?: StatusIndicatorPresentation;\n tone?: StatusIndicatorTone;\n};\n\nconst toneClasses: Record<\n StatusIndicatorTone,\n {\n badge: string;\n dot: string;\n }\n> = {\n neutral: {\n badge: \"border-border-subtle bg-muted text-muted-foreground\",\n dot: \"bg-muted-foreground/60 dark:bg-muted-foreground/80\",\n },\n info: {\n badge: \"border-status-info/25 bg-status-info-muted text-status-info-muted-foreground\",\n dot: \"bg-status-info/60 dark:bg-status-info/80\",\n },\n success: {\n badge: \"border-status-success/25 bg-status-success-muted text-status-success-muted-foreground\",\n dot: \"bg-status-success/60 dark:bg-status-success/80\",\n },\n warning: {\n badge: \"border-status-warning/25 bg-status-warning-muted text-status-warning-muted-foreground\",\n dot: \"bg-status-warning/60 dark:bg-status-warning/80\",\n },\n destructive: {\n badge: \"border-destructive/20 bg-destructive/10 text-destructive\",\n dot: \"bg-destructive/60 dark:bg-destructive/80\",\n },\n};\n\nfunction StatusIndicator({\n className,\n label,\n presentation = \"dot\",\n tone = \"neutral\",\n ...props\n}: StatusIndicatorProps) {\n const styles = toneClasses[tone];\n\n return (\n \n \n {label}\n \n );\n}\n\nexport {\n StatusIndicator,\n type StatusIndicatorPresentation,\n type StatusIndicatorProps,\n type StatusIndicatorTone,\n};\n", "type": "registry:ui" } ], "type": "registry:ui" }