{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "status", "title": "Status", "description": "A standalone semantic status indicator with plain, soft, solid, and outline presentations", "dependencies": ["daisyui"], "files": [ { "path": "registry/default/ui/status.tsx", "content": "import type { ComponentPropsWithRef, ReactNode } from 'react';\nimport { cn } from '@/lib/utils';\n\nexport type StatusTone = 'neutral' | 'info' | 'success' | 'warning' | 'danger' | 'muted';\nexport type StatusVariant = 'plain' | 'soft' | 'solid' | 'outline';\nexport type StatusSize = 'xs' | 'sm' | 'md';\n\nconst statusToneClass: Record> = {\n\tplain: {\n\t\tneutral: 'text-base-content',\n\t\tinfo: 'text-base-content',\n\t\tsuccess: 'text-base-content',\n\t\twarning: 'text-base-content',\n\t\tdanger: 'text-base-content',\n\t\tmuted: 'text-base-content',\n\t},\n\tsoft: {\n\t\tneutral: 'border-base-300 bg-base-200 text-base-content',\n\t\tinfo: 'border-info/25 bg-info/4 text-base-content',\n\t\tsuccess: 'border-success/25 bg-success/4 text-base-content',\n\t\twarning: 'border-warning/30 bg-warning/4 text-base-content',\n\t\tdanger: 'border-error/25 bg-error/4 text-base-content',\n\t\tmuted: 'border-base-300 bg-base-200/70 text-base-content',\n\t},\n\tsolid: {\n\t\tneutral: 'border-base-content bg-base-content text-base-100',\n\t\tinfo: 'border-info bg-base-content text-base-100',\n\t\tsuccess: 'border-success bg-base-content text-base-100',\n\t\twarning: 'border-warning bg-base-content text-base-100',\n\t\tdanger: 'border-error bg-base-content text-base-100',\n\t\tmuted: 'border-base-300 bg-base-content text-base-100',\n\t},\n\toutline: {\n\t\tneutral: 'border-base-300 bg-base-100 text-base-content',\n\t\tinfo: 'border-info/45 bg-base-100 text-base-content',\n\t\tsuccess: 'border-success/45 bg-base-100 text-base-content',\n\t\twarning: 'border-warning/55 bg-base-100 text-base-content',\n\t\tdanger: 'border-error/45 bg-base-100 text-base-content',\n\t\tmuted: 'border-base-300 bg-base-100 text-base-content',\n\t},\n};\n\nconst statusSizeClass: Record = {\n\txs: 'h-5 gap-1 text-[11px]',\n\tsm: 'h-6 gap-1.5 text-xs',\n\tmd: 'h-7 gap-1.5 text-sm',\n};\n\nconst statusPaddingClass: Record = {\n\txs: 'px-1.5',\n\tsm: 'px-2',\n\tmd: 'px-2.5',\n};\n\nconst statusDotClass: Record = {\n\tneutral: 'bg-base-content/65',\n\tinfo: 'bg-info',\n\tsuccess: 'bg-success',\n\twarning: 'bg-warning',\n\tdanger: 'bg-error',\n\tmuted: 'bg-base-content/35',\n};\n\nexport type StatusProps = ComponentPropsWithRef<'span'> & {\n\ttone?: StatusTone;\n\tvariant?: StatusVariant;\n\tsize?: StatusSize;\n\ticon?: ReactNode;\n\tdot?: boolean;\n};\n\nexport function Status({\n\ttone = 'neutral',\n\tvariant = 'plain',\n\tsize = 'sm',\n\ticon,\n\tdot,\n\tchildren,\n\tclassName,\n\t...props\n}: StatusProps) {\n\tconst showDot = dot ?? ((variant === 'plain' || variant === 'solid') && !icon);\n\tconst isPlain = variant === 'plain';\n\n\treturn (\n\t\t\n\t\t\t{showDot ? (\n\t\t\t\t\n\t);\n}\n", "type": "registry:ui", "target": "@ui/status.tsx" } ], "type": "registry:ui" }