{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "list-bullet",
  "title": "list-bullet",
  "description": "Animated list-bullet icon for React",
  "type": "registry:ui",
  "registryDependencies": [],
  "dependencies": ["motion"],
  "files": [
    {
      "path": "list-bullet.tsx",
      "content": "\"use client\";\n\nimport type { Variants } from \"motion/react\";\nimport { motion, useAnimation } from \"motion/react\";\nimport type { HTMLAttributes } from \"react\";\nimport { forwardRef, useCallback, useImperativeHandle, useRef } from \"react\";\nimport { cn } from \"@/lib/utils\";\n\nexport interface ListBulletIconHandle {\n  startAnimation: () => void;\n  stopAnimation: () => void;\n}\n\ninterface ListBulletIconProps extends HTMLAttributes<HTMLDivElement> {\n  size?: number;\n}\n\nconst DOT_DURATION = 0.1;\nconst LINE_DURATION = 0.3;\n\nconst CREATE_BULLET_VARIANTS = (delay: number): Variants => ({\n  normal: {\n    opacity: 1,\n  },\n  animate: {\n    opacity: [0, 1],\n    transition: {\n      duration: DOT_DURATION,\n      ease: \"easeInOut\",\n      delay,\n    },\n  },\n});\n\nconst CREATE_LINE_VARIANTS = (delay: number): Variants => ({\n  normal: {\n    pathLength: 1,\n    opacity: 1,\n  },\n  animate: {\n    pathLength: [0, 1],\n    opacity: [0, 1],\n    transition: {\n      pathLength: { duration: LINE_DURATION, ease: \"easeInOut\", delay },\n      opacity: { duration: LINE_DURATION, ease: \"easeInOut\", delay },\n    },\n  },\n});\n\nconst LIST_ITEMS = [\n  {\n    y: 6.75,\n    bulletPath:\n      \"M3.75 6.75H3.7575V6.7575H3.75V6.75ZM4.125 6.75C4.125 6.95711 3.95711 7.125 3.75 7.125C3.54289 7.125 3.375 6.95711 3.375 6.75C3.375 6.54289 3.54289 6.375 3.75 6.375C3.95711 6.375 4.125 6.54289 4.125 6.75Z\",\n    linePath: \"M8.25 6.75H20.25\",\n  },\n  {\n    y: 12,\n    bulletPath:\n      \"M3.75 12H3.7575V12.0075H3.75V12ZM4.125 12C4.125 12.2071 3.95711 12.375 3.75 12.375C3.54289 12.375 3.375 12.2071 3.375 12C3.375 11.7929 3.54289 11.625 3.75 11.625C3.95711 11.625 4.125 11.7929 4.125 12Z\",\n    linePath: \"M8.25 12H20.25\",\n  },\n  {\n    y: 17.25,\n    bulletPath:\n      \"M3.75 17.25H3.7575V17.2575H3.75V17.25ZM4.125 17.25C4.125 17.4571 3.95711 17.625 3.75 17.625C3.54289 17.625 3.375 17.4571 3.375 17.25C3.375 17.0429 3.54289 16.875 3.75 16.875C3.95711 16.875 4.125 17.0429 4.125 17.25Z\",\n    linePath: \"M8.25 17.25H20.25\",\n  },\n] as const;\n\nconst ListBulletIcon = forwardRef<ListBulletIconHandle, ListBulletIconProps>(\n  ({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {\n    const controls = useAnimation();\n    const isControlledRef = useRef(false);\n\n    useImperativeHandle(ref, () => {\n      isControlledRef.current = true;\n\n      return {\n        startAnimation: () => controls.start(\"animate\"),\n        stopAnimation: () => controls.start(\"normal\"),\n      };\n    });\n\n    const handleMouseEnter = useCallback(\n      (e: React.MouseEvent<HTMLDivElement>) => {\n        if (isControlledRef.current) {\n          onMouseEnter?.(e);\n        } else {\n          controls.start(\"animate\");\n        }\n      },\n      [controls, onMouseEnter]\n    );\n\n    const handleMouseLeave = useCallback(\n      (e: React.MouseEvent<HTMLDivElement>) => {\n        if (isControlledRef.current) {\n          onMouseLeave?.(e);\n        } else {\n          controls.start(\"normal\");\n        }\n      },\n      [controls, onMouseLeave]\n    );\n\n    return (\n      <div\n        className={cn(className)}\n        onMouseEnter={handleMouseEnter}\n        onMouseLeave={handleMouseLeave}\n        {...props}\n      >\n        <svg\n          fill=\"none\"\n          height={size}\n          stroke=\"currentColor\"\n          strokeLinecap=\"round\"\n          strokeLinejoin=\"round\"\n          strokeWidth=\"1.5\"\n          viewBox=\"0 0 24 24\"\n          width={size}\n          xmlns=\"http://www.w3.org/2000/svg\"\n        >\n          {LIST_ITEMS.map((item, index) => {\n            const bulletDelay = index * (DOT_DURATION + LINE_DURATION);\n            const lineDelay = bulletDelay + DOT_DURATION;\n\n            return (\n              <g key={item.y}>\n                <motion.path\n                  animate={controls}\n                  d={item.bulletPath}\n                  initial=\"normal\"\n                  variants={CREATE_BULLET_VARIANTS(bulletDelay)}\n                />\n                <motion.path\n                  animate={controls}\n                  d={item.linePath}\n                  initial=\"normal\"\n                  variants={CREATE_LINE_VARIANTS(lineDelay)}\n                />\n              </g>\n            );\n          })}\n        </svg>\n      </div>\n    );\n  }\n);\n\nListBulletIcon.displayName = \"ListBulletIcon\";\n\nexport { ListBulletIcon };\n",
      "type": "registry:ui"
    }
  ]
}
