{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"indicator","type":"registry:component","description":"Indicator component.","files":[{"path":"registry/components/indicator.tsx","type":"registry:component","content":"import { cn } from \"@/lib/utils\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport type { ComponentProps } from \"react\";\n\nconst statusIndicatorVariants = cva(\n\t[\n\t\t\"relative flex size-2 shrink-0 items-center justify-center rounded-full\",\n\t\t\"*:rounded-full *:bg-current\",\n\t\t\"[&_[data-slot=indicator-dot]]:size-[75%]\",\n\t\t\"[&_[data-slot=indicator-ping]]:absolute [&_[data-slot=indicator-ping]]:size-full\",\n\t],\n\t{\n\t\tvariants: {\n\t\t\tcolor: {\n\t\t\t\temerald: \"text-emerald-500\",\n\t\t\t\trose: \"text-rose-500\",\n\t\t\t\tamber: \"text-amber-500\",\n\t\t\t\tsky: \"text-sky-500\",\n\t\t\t},\n\t\t\tpulse: {\n\t\t\t\ttrue: \"[&_[data-slot=indicator-ping]]:animate-ping\",\n\t\t\t\tfalse: \"[&_[data-slot=indicator-ping]]:hidden\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tcolor: \"emerald\",\n\t\t\tpulse: true,\n\t\t},\n\t}\n);\n\nexport type StatusIndicatorProps = ComponentProps<\"span\"> &\n\tVariantProps<typeof statusIndicatorVariants>;\n\nexport function StatusIndicator({\n\tclassName,\n\tcolor,\n\tpulse,\n\t...props\n}: StatusIndicatorProps) {\n\treturn (\n\t\t<span\n\t\t\tclassName={cn(statusIndicatorVariants({ color, pulse }), className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span aria-hidden data-slot=\"indicator-ping\" />\n\t\t\t<span aria-hidden data-slot=\"indicator-dot\" />\n\t\t</span>\n\t);\n}\n"}]}