39 lines
3.4 KiB
JSON
39 lines
3.4 KiB
JSON
{
|
|
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
"name": "activity-icon",
|
|
"type": "registry:ui",
|
|
"title": "Activity Icon",
|
|
"description": "Activity icon component.",
|
|
"dependencies": [
|
|
"motion"
|
|
],
|
|
"files": [
|
|
{
|
|
"path": "registry/icons/activity/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 ActivityProps = IconProps<keyof typeof animations>;\n\nconst animations = {\n default: {\n path: {\n initial: {\n opacity: 1,\n pathLength: 1,\n pathOffset: 0,\n },\n animate: {\n opacity: [0, 1],\n pathLength: [0, 1],\n pathOffset: [1, 0],\n transition: {\n duration: 0.8,\n ease: 'easeInOut',\n opacity: { duration: 0.01 },\n },\n },\n },\n } satisfies Record<string, Variants>,\n 'default-return': {\n path: {\n initial: {\n opacity: 1,\n pathLength: 1,\n pathOffset: 0,\n },\n animate: {\n opacity: [0, 1, 1, 1],\n pathLength: [0, 1, 0, 1],\n pathOffset: [1, 0, 0.01, 0],\n transition: {\n duration: 2.5,\n ease: 'easeInOut',\n opacity: { duration: 0.01 },\n },\n },\n },\n } satisfies Record<string, Variants>,\n 'default-loop': {\n path: {\n initial: {\n opacity: 1,\n pathLength: 1,\n pathOffset: 0,\n },\n animate: {\n opacity: [0, 1, 1, 1, 1],\n pathLength: [0, 1, 0, 1, 0],\n pathOffset: [1, 0, 0.01, 0, 0.999],\n transition: {\n duration: 3,\n ease: 'easeInOut',\n repeat: Infinity,\n repeatType: 'loop',\n opacity: { duration: 0.01 },\n },\n },\n },\n } satisfies Record<string, Variants>,\n} as const;\n\nfunction IconComponent({ size, ...props }: ActivityProps) {\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=\"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2\"\n variants={variants.path}\n initial=\"initial\"\n animate={controls}\n />\n </motion.svg>\n );\n}\n\nfunction Activity(props: ActivityProps) {\n return <IconWrapper icon={IconComponent} {...props} />;\n}\n\nexport {\n animations,\n Activity,\n Activity as ActivityIcon,\n type ActivityProps,\n type ActivityProps as ActivityIconProps,\n};\n",
|
|
"type": "registry:ui",
|
|
"target": "components/animate-ui/icons/activity.tsx"
|
|
}
|
|
],
|
|
"meta": {
|
|
"keywords": [
|
|
"activity",
|
|
"pulse",
|
|
"action",
|
|
"motion",
|
|
"healthcare",
|
|
"fitness",
|
|
"medical",
|
|
"health",
|
|
"siesmic",
|
|
"magnitude",
|
|
"intensive care",
|
|
"hospital",
|
|
"emergency",
|
|
"ambulance",
|
|
"vitals",
|
|
"vital signs",
|
|
"heart rate monitor"
|
|
]
|
|
}
|
|
} |