27 lines
5.3 KiB
JSON
27 lines
5.3 KiB
JSON
{
|
|
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
"name": "fingerprint-icon",
|
|
"type": "registry:ui",
|
|
"title": "Fingerprint Icon",
|
|
"description": "Fingerprint icon component.",
|
|
"dependencies": [
|
|
"motion"
|
|
],
|
|
"files": [
|
|
{
|
|
"path": "registry/icons/fingerprint/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 pathClassName,\n} from '@/components/animate-ui/icons/icon';\nimport { cn } from '@/lib/utils';\n\ntype FingerprintProps = IconProps<keyof typeof animations>;\n\nconst animations = {\n default: (() => {\n const variants: Record<string, Variants> = {\n group: {\n initial: {\n scale: 1,\n },\n animate: {\n scale: [1, 1.1, 1],\n transition: {\n ease: 'easeInOut',\n duration: 1.5,\n },\n },\n },\n path: {\n initial: {\n strokeOpacity: 0.2,\n },\n },\n };\n new Array(9).fill(0).forEach((_, i) => {\n variants[`path${i + 1}`] = {\n initial: {\n pathLength: 1,\n },\n animate: {\n pathLength: [1, 0.05, 1],\n transition: {\n pathLength: { duration: 1.5, ease: 'easeInOut' },\n },\n },\n };\n });\n return variants;\n })() satisfies Record<string, Variants>,\n 'default-2': (() => {\n const variants: Record<string, Variants> = {\n group: {\n initial: {\n scale: 1,\n },\n animate: {\n scale: [1, 1.1, 1],\n transition: {\n ease: 'easeInOut',\n duration: 1.5,\n },\n },\n },\n path: {\n initial: {\n strokeOpacity: 0,\n },\n },\n };\n new Array(9).fill(0).forEach((_, i) => {\n variants[`path${i + 1}`] = {\n initial: {\n pathLength: 1,\n },\n animate: {\n pathLength: [1, 0.05, 1],\n transition: {\n pathLength: { duration: 1.5, ease: 'easeInOut' },\n },\n },\n };\n });\n return variants;\n })() satisfies Record<string, Variants>,\n} as const;\n\nfunction IconComponent({ size, className, ...props }: FingerprintProps) {\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 className={cn(pathClassName, className)}\n variants={variants.group}\n initial=\"initial\"\n animate={controls}\n {...props}\n >\n <motion.path\n stroke=\"currentColor\"\n variants={variants.path}\n initial=\"initial\"\n animate={controls}\n d=\"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4 M14 13.12c0 2.38 0 6.38-1 8.88 M17.29 21.02c.12-.6.43-2.3.5-3.02 M2 12a10 10 0 0 1 18-6 M2 16h.01 M21.8 16c.2-2 .131-5.354 0-6 M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2 M8.65 22c.21-.66.45-1.32.57-2 M9 6.8a6 6 0 0 1 9 5.2v2\"\n />\n <motion.path\n d=\"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4\"\n variants={variants.path1}\n initial=\"initial\"\n animate={controls}\n />\n <motion.path\n d=\"M14 13.12c0 2.38 0 6.38-1 8.88\"\n variants={variants.path2}\n initial=\"initial\"\n animate={controls}\n />\n <motion.path\n d=\"M17.29 21.02c.12-.6.43-2.3.5-3.02\"\n variants={variants.path3}\n initial=\"initial\"\n animate={controls}\n />\n <motion.path\n d=\"M2 12a10 10 0 0 1 18-6\"\n variants={variants.path4}\n initial=\"initial\"\n animate={controls}\n />\n <motion.path\n d=\"M2 16h.01\"\n variants={variants.path5}\n initial=\"initial\"\n animate={controls}\n />\n <motion.path\n d=\"M21.8 16c.2-2 .131-5.354 0-6\"\n variants={variants.path6}\n initial=\"initial\"\n animate={controls}\n />\n <motion.path\n d=\"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2\"\n variants={variants.path7}\n initial=\"initial\"\n animate={controls}\n />\n <motion.path\n d=\"M8.65 22c.21-.66.45-1.32.57-2\"\n variants={variants.path8}\n initial=\"initial\"\n animate={controls}\n />\n <motion.path\n d=\"M9 6.8a6 6 0 0 1 9 5.2v2\"\n variants={variants.path9}\n initial=\"initial\"\n animate={controls}\n />\n </motion.svg>\n );\n}\n\nfunction Fingerprint(props: FingerprintProps) {\n return <IconWrapper icon={IconComponent} {...props} />;\n}\n\nexport {\n animations,\n Fingerprint,\n Fingerprint as FingerprintIcon,\n type FingerprintProps,\n type FingerprintProps as FingerprintIconProps,\n};\n",
|
|
"type": "registry:ui",
|
|
"target": "components/animate-ui/icons/fingerprint.tsx"
|
|
}
|
|
],
|
|
"meta": {
|
|
"keywords": [
|
|
"2fa",
|
|
"authentication",
|
|
"biometric",
|
|
"identity",
|
|
"security"
|
|
]
|
|
}
|
|
} |