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

25 lines
3.1 KiB
JSON

{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "lightbulb-icon",
"type": "registry:ui",
"title": "Lightbulb Icon",
"description": "Lightbulb icon component.",
"dependencies": [
"motion"
],
"files": [
{
"path": "registry/icons/lightbulb/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 LightbulbProps = IconProps<keyof typeof animations>;\n\nconst animations = {\n default: {\n path1: {\n initial: {\n rotate: 0,\n fill: 'transparent',\n },\n animate: {\n transformOrigin: 'bottom center',\n fill: 'currentColor',\n rotate: [0, -20, 15, -7, 0],\n fillOpacity: [0, 1, 0, 1, 0],\n transition: {\n duration: 0.8,\n ease: 'easeInOut',\n rotate: {\n duration: 0.8,\n ease: 'easeInOut',\n times: [0, 0.4, 0.6, 0.8, 1],\n },\n fillOpacity: {\n duration: 0.3,\n ease: 'easeInOut',\n times: [0, 0.4, 0.6, 0.8, 1],\n delay: 0.4,\n },\n },\n },\n },\n path2: {\n initial: {\n rotate: 0,\n },\n animate: {\n transformOrigin: 'bottom center',\n rotate: [0, 0, 10, -5, 0],\n transition: {\n duration: 0.8,\n ease: 'easeInOut',\n times: [0, 0.4, 0.6, 0.8, 1],\n },\n },\n },\n path3: {},\n } satisfies Record<string, Variants>,\n} as const;\n\nfunction IconComponent({ size, ...props }: LightbulbProps) {\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 {...props}\n >\n <motion.path\n d=\"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5\"\n variants={variants.path1}\n initial=\"initial\"\n animate={controls}\n />\n <motion.path\n d=\"M9 18h6\"\n variants={variants.path2}\n initial=\"initial\"\n animate={controls}\n />\n <motion.path\n d=\"M10 22h4\"\n variants={variants.path3}\n initial=\"initial\"\n animate={controls}\n />\n </motion.svg>\n );\n}\n\nfunction Lightbulb(props: LightbulbProps) {\n return <IconWrapper icon={IconComponent} {...props} />;\n}\n\nexport {\n animations,\n Lightbulb,\n Lightbulb as LightbulbIcon,\n type LightbulbProps,\n type LightbulbProps as LightbulbIconProps,\n};\n",
"type": "registry:ui",
"target": "components/animate-ui/icons/lightbulb.tsx"
}
],
"meta": {
"keywords": [
"idea",
"bright",
"lights"
]
}
}