Fortura/apps/www/public/r/loader-circle-icon.json
2025-08-20 04:12:49 -06:00

30 lines
2.2 KiB
JSON

{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "loader-circle-icon",
"type": "registry:ui",
"title": "Loader Circle Icon",
"description": "Loader circle icon component.",
"dependencies": [
"motion"
],
"files": [
{
"path": "registry/icons/loader-circle/index.tsx",
"content": "'use client';\n\nimport * as React from 'react';\nimport { motion, type Variants } from 'motion/react';\n\nimport {\n getVariants,\n useAnimateIconContext,\n IconWrapper,\n type IconProps,\n} from '@/components/animate-ui/icons/icon';\n\ntype LoaderCircleProps = IconProps<keyof typeof animations>;\n\nconst animations = {\n default: {\n group: {\n initial: { rotate: 0 },\n animate: {\n rotate: 360,\n transition: {\n duration: 1,\n ease: 'linear',\n repeat: Infinity,\n repeatType: 'loop',\n },\n },\n },\n path: {},\n } satisfies Record<string, Variants>,\n} as const;\n\nfunction IconComponent({ size, ...props }: LoaderCircleProps) {\n const { controls } = useAnimateIconContext();\n const variants = getVariants(animations);\n\n return (\n <motion.svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n variants={variants.group}\n initial=\"initial\"\n animate={controls}\n {...props}\n >\n <motion.path\n d=\"M21 12a9 9 0 1 1-6.219-8.56\"\n variants={variants.path}\n initial=\"initial\"\n animate={controls}\n />\n </motion.svg>\n );\n}\n\nfunction LoaderCircle(props: LoaderCircleProps) {\n return <IconWrapper icon={IconComponent} {...props} />;\n}\n\nexport {\n animations,\n LoaderCircle,\n LoaderCircle as LoaderCircleIcon,\n type LoaderCircleProps,\n type LoaderCircleProps as LoaderCircleIconProps,\n};\n",
"type": "registry:ui",
"target": "components/animate-ui/icons/loader-circle.tsx"
}
],
"meta": {
"keywords": [
"loading",
"wait",
"busy",
"progress",
"throbber",
"spinner",
"spinning",
"circle"
]
}
}