{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "led",
  "type": "registry:ui",
  "title": "LED",
  "description": "A 4–5 pt lamp lit from the top left that says one state by colour: green live, amber waiting, red failed, blue link, off. Five gestures say how it behaves over time: steady, flicker, breathe, blink2, rise. Never alone; it sits beside words.",
  "dependencies": [],
  "registryDependencies": [
    "https://metalui.dev/r/tokens.json"
  ],
  "files": [
    {
      "path": "packages/metalui/src/components/led/led.tsx",
      "type": "registry:ui",
      "target": "components/metalui/led/led.tsx",
      "content": "'use client';\n\nimport * as React from 'react';\n\n/* LED (the reference design's .led-*): a tiny lamp lit from the top left that says one state by colour.\n * A part: it never stands alone, it sits beside words (a status badge, a readout, an engraving).\n * Styled with the theme's utilities (the status recipe). */\n\nexport type LedKind = 'live' | 'waiting' | 'failed' | 'link' | 'off';\n/** How the lamp behaves over time (tokens status.gestures). */\nexport type LedGesture = 'steady' | 'flicker' | 'breathe' | 'blink2' | 'rise';\n\nexport interface LedProps extends React.HTMLAttributes<HTMLSpanElement> {\n  kind: LedKind;\n  /** 5 (default) or 4 (small). */\n  size?: 'default' | 'small';\n  /**\n   * How it behaves over time: steady (default); flicker, a burst of activity that settles on;\n   * breathe, a loop while something is in progress; blink2, two flashes for a failure; rise, coming\n   * on slowly. Changing the gesture plays it again. Reduced motion holds the lamp steady.\n   */\n  gesture?: LedGesture;\n}\n\nconst LED = 'mu-led inline-block flex-none rounded-round';\nconst LED_SIZES = {\n  default: 'size-status-led-size',\n  small: 'size-status-led-size-small',\n};\nconst LED_KINDS: Record<LedKind, string> = {\n  live: 'recipe-status-led-live',\n  waiting: 'recipe-status-led recipe-status-led-waiting',\n  failed: 'recipe-status-led recipe-status-led-failed',\n  link: 'recipe-status-led recipe-status-led-link',\n  off: 'recipe-status-led-off',\n};\n\nconst LED_GESTURES: Record<LedGesture, string> = {\n  steady: '',\n  flicker: 'animate-led-flicker',\n  breathe: 'animate-led-breathe',\n  blink2: 'animate-led-blink2',\n  rise: 'animate-led-rise',\n};\n\n/** A tiny lamp, lit from the top left. Decorative: pair it with words. */\nexport function Led({ kind, size = 'default', gesture = 'steady', className, ...props }: LedProps) {\n  const own = `${LED} ${LED_SIZES[size]} ${LED_KINDS[kind]} ${LED_GESTURES[gesture]} reduced-motion:animate-none`;\n  // A new gesture (or a new state with the same gesture) remounts the lamp so the gesture plays again.\n  return <span key={`${kind}-${gesture}`} aria-hidden data-kind={kind} data-size={size} data-gesture={gesture} className={className ? `${own} ${className}` : own} {...props} />;\n}\n"
    }
  ],
  "docs": "Agent guide: https://metalui.dev/r/led.md. SwiftUI: MetalLED in the MetalUI Swift package."
}
