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

28 lines
2.8 KiB
JSON

{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "send-icon",
"type": "registry:ui",
"title": "Send Icon",
"description": "Send icon component.",
"dependencies": [
"motion"
],
"files": [
{
"path": "registry/icons/send/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 SendProps = IconProps<keyof typeof animations>;\n\nconst animations = {\n default: {\n group: {\n initial: {\n scale: 1,\n x: 0,\n y: 0,\n },\n animate: {\n scale: [1, 0.8, 1, 1, 1],\n x: [0, '-10%', '100%', '-125%', 0],\n y: [0, '10%', '-100%', '125%', 0],\n transition: {\n default: { ease: 'easeInOut', duration: 1.2 },\n x: {\n ease: 'easeInOut',\n duration: 1.2,\n times: [0, 0.25, 0.5, 0.5, 1],\n },\n y: {\n ease: 'easeInOut',\n duration: 1.2,\n times: [0, 0.25, 0.5, 0.5, 1],\n },\n },\n },\n },\n path1: {},\n path2: {},\n } satisfies Record<string, Variants>,\n} as const;\n\nfunction IconComponent({ size, ...props }: SendProps) {\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.g variants={variants.group} initial=\"initial\" animate={controls}>\n <motion.path\n d=\"M14.5,21.7c.1.3.4.4.7.3.1,0,.2-.2.3-.3L22,2.7c0-.3,0-.5-.3-.6-.1,0-.2,0-.3,0L2.3,8.5c-.3,0-.4.4-.3.6,0,.1.2.2.3.3l7.9,3.2c.5.2.9.6,1.1,1.1l3.2,7.9Z\"\n variants={variants.path1}\n initial=\"initial\"\n animate={controls}\n />\n <motion.path\n d=\"M21.9,2.1l-10.9,10.9\"\n variants={variants.path2}\n initial=\"initial\"\n animate={controls}\n />\n </motion.g>\n </motion.svg>\n );\n}\n\nfunction Send(props: SendProps) {\n return <IconWrapper icon={IconComponent} {...props} />;\n}\n\nexport {\n animations,\n Send,\n Send as SendIcon,\n type SendProps,\n type SendProps as SendIconProps,\n};\n",
"type": "registry:ui",
"target": "components/animate-ui/icons/send.tsx"
}
],
"meta": {
"keywords": [
"send",
"email",
"message",
"mail",
"paper aeroplane",
"submit"
]
}
}