{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "calendar-days",
  "title": "calendar-days",
  "description": "Animated calendar-days icon for React",
  "type": "registry:ui",
  "registryDependencies": [],
  "dependencies": ["motion"],
  "files": [
    {
      "path": "calendar-days.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 CalendarDaysIconHandle {\n  startAnimation: () => void;\n  stopAnimation: () => void;\n}\n\ninterface CalendarDaysIconProps extends HTMLAttributes<HTMLDivElement> {\n  size?: number;\n}\n\nconst DOT_VARIANTS: Variants = {\n  normal: {\n    opacity: 1,\n    transition: {\n      duration: 0.2,\n    },\n  },\n  animate: (custom: number) => ({\n    opacity: [1, 0.3, 1],\n    transition: {\n      delay: custom * 0.1,\n      duration: 0.4,\n      times: [0, 0.5, 1],\n    },\n  }),\n};\n\nconst DOTS = [\n  { d: \"M12 12.75h.008v.008H12v-.008Z\", index: 0 },\n  { d: \"M14.25 12.75h.008v.008h-.008v-.008Z\", index: 1 },\n  { d: \"M16.5 12.75h.008v.008H16.5v-.008Z\", index: 2 },\n  { d: \"M7.5 15h.008v.008H7.5V15Z\", index: 3 },\n  { d: \"M9.75 15h.008v.008H9.75V15Z\", index: 4 },\n  { d: \"M12 15h.008v.008H12V15Z\", index: 5 },\n  { d: \"M14.25 15h.008v.008h-.008V15Z\", index: 6 },\n  { d: \"M16.5 15h.008v.008H16.5V15Z\", index: 7 },\n  { d: \"M7.5 17.25h.008v.008H7.5v-.008Z\", index: 8 },\n  { d: \"M9.75 17.25h.008v.008H9.75v-.008Z\", index: 9 },\n  { d: \"M12 17.25h.008v.008H12v-.008Z\", index: 10 },\n  { d: \"M14.25 17.25h.008v.008h-.008v-.008Z\", index: 11 },\n] as const;\n\nconst CalendarDaysIcon = forwardRef<\n  CalendarDaysIconHandle,\n  CalendarDaysIconProps\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        <path d=\"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5\" />\n        {DOTS.map((dot) => (\n          <motion.path\n            animate={controls}\n            custom={dot.index}\n            d={dot.d}\n            initial=\"normal\"\n            key={dot.index}\n            variants={DOT_VARIANTS}\n          />\n        ))}\n      </svg>\n    </div>\n  );\n});\n\nCalendarDaysIcon.displayName = \"CalendarDaysIcon\";\n\nexport { CalendarDaysIcon };\n",
      "type": "registry:ui"
    }
  ]
}
