{
  "id": "button",
  "name": "Button",
  "kind": "component",
  "status": "ready",
  "description": "دکمهٔ کنش با سه نوع، سه اندازه و وضعیت‌های loading/disabled؛ اجرای ناهمگام خودکار با حلقهٔ پردازش.",
  "source": "packages/tuk/src/controls/button",
  "metadata": {
    "name": "Button",
    "layer": "component",
    "group": "Controls",
    "package": "@tokapps/tuk",
    "import": "import { Button } from '@tokapps/tuk'",
    "description": "دکمهٔ کنش با سه نوع، سه اندازه و وضعیت‌های loading/disabled؛ اجرای ناهمگام خودکار با حلقهٔ پردازش.",
    "keywords": [
      "button",
      "دکمه",
      "action",
      "کنش",
      "submit",
      "cta"
    ],
    "variants": [
      "primary",
      "secondary",
      "ghost"
    ],
    "sizes": [
      "sm",
      "md",
      "lg"
    ],
    "states": [
      "default",
      "hover",
      "active",
      "focus-visible",
      "disabled",
      "loading"
    ],
    "props": {
      "variant": "primary | secondary | ghost",
      "size": "sm | md | lg",
      "tone": "default | danger (جفت رنگ ثبت‌شده؛ هرگز background/color دستی)",
      "icon": "ReactNode",
      "href": "string (رندر <a> برای ناوبری)",
      "as": "ElementType (پیوند سفارشی مثل next/link؛ همراه href)",
      "loading": "boolean",
      "action": "() => Promise<unknown>",
      "sound": "tap | submit | success | warning | error",
      "onSound": "(event) => void",
      "print": "show | hide"
    },
    "support": {
      "rtl": true,
      "darkTheme": true,
      "highContrast": true,
      "mobile": true,
      "print": "hide",
      "screenReader": true,
      "motion": true,
      "sound": "opt-in"
    },
    "tokens": "see Button.tokens.ts",
    "whenToUse": [
      "کنش اصلی یا ثانویهٔ صفحه",
      "ارسال فرم",
      "شروع عملیات ناهمگام"
    ],
    "whenNotToUse": [
      "ناوبری بین صفحه‌ها (از لینک استفاده کنید)",
      "کنش مخرب بدون تأیید (از AlertDialog پیش از آن استفاده کنید)"
    ],
    "alternatives": [
      {
        "component": "Link",
        "when": "ناوبری"
      },
      {
        "component": "IconButton",
        "when": "فقط آیکون (aria-label الزامی)"
      }
    ],
    "usedInPatterns": [
      "IdeaSubmission",
      "CampaignCard",
      "ProductLaunch",
      "AuthFlow"
    ],
    "files": [
      "Button.tsx",
      "Button.styles.ts",
      "Button.types.ts",
      "Button.tokens.ts",
      "Button.a11y.ts",
      "Button.motion.ts",
      "Button.sound.ts",
      "Button.print.ts",
      "Button.docs.mdx",
      "Button.examples.tsx",
      "Button.stories.tsx",
      "Button.test.tsx",
      "Button.metadata.json",
      "index.ts"
    ]
  }
}
