{
"name": "apple-activity-card",
"type": "registry:component",
"dependencies": [
"motion"
],
"files": [
{
"type": "registry:component",
"content": "\"use client\";\n\n/**\n * @author: @kokonutui\n * @description: Apple Activity Card\n * @version: 1.0.0\n * @date: 2025-06-26\n * @license: MIT\n * @website: https://kokonutui.com\n * @github: https://github.com/kokonut-labs/kokonutui\n */\n\nimport { motion } from \"motion/react\";\nimport { cn } from \"@/lib/utils\";\n\ninterface ActivityData {\n label: string;\n value: number;\n color: string;\n size: number;\n current: number;\n target: number;\n unit: string;\n}\n\ninterface CircleProgressProps {\n data: ActivityData;\n index: number;\n}\n\nconst activities: ActivityData[] = [\n {\n label: \"MOVE\",\n value: 85,\n color: \"#FF2D55\",\n size: 200,\n current: 479,\n target: 800,\n unit: \"CAL\",\n },\n {\n label: \"EXERCISE\",\n value: 60,\n color: \"#A3F900\",\n size: 160,\n current: 24,\n target: 30,\n unit: \"MIN\",\n },\n {\n label: \"STAND\",\n value: 30,\n color: \"#04C7DD\",\n size: 120,\n current: 6,\n target: 12,\n unit: \"HR\",\n },\n];\n\nconst CircleProgress = ({ data, index }: CircleProgressProps) => {\n const strokeWidth = 16;\n const radius = (data.size - strokeWidth) / 2;\n const circumference = radius * 2 * Math.PI;\n const progress = ((100 - data.value) / 100) * circumference;\n\n const gradientId = `gradient-${data.label.toLowerCase()}`;\n const gradientUrl = `url(#${gradientId})`;\n\n return (\n