import { useState } from "react"; import { Alert, AlertDescription, AlertTitle } from "@godxjp/ui/feedback"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@godxjp/ui/data-display"; import { FormField, Input, InputOTP, InputOTPGroup, InputOTPSlot } from "@godxjp/ui/data-entry"; import { Button, Logo, Text } from "@godxjp/ui/general"; import { AuthFooter, AuthShell, AuthStack, Flex } from "@godxjp/ui/layout"; import { AppSettingPicker } from "@godxjp/ui/navigation"; /** * SIGN-IN MFA CHALLENGE — the three canonical SCR-008 states plus the error / loading paths, * stacked at the real 432px measure. * * This is the SIGN-IN challenge, not enrollment. `TwoFactorSetup` is the enrollment Dialog (QR / * manual key / recovery output) and must never be reused here: a challenge has no secret to reveal * and no dialog to dismiss — it IS the page. * * FOCUS ORDER is DOM order, and DOM order is the task order: * 1. the code field (OTP row / recovery-code Input) 2. the primary action * 3. fallback A 4. fallback B * The OTP row is ONE field — `InputOTP` owns paste, arrow keys and the caret; six separate * `Input`s would put six stops in the tab ring and break paste. * * State coverage: otp (idle) · otp ERROR (wrong code) · otp LOADING (verifying) · recovery-code · * passkey-failure. The first panel owns the standalone frame's single `level={1}` heading; the * remaining state sections use `level={2}`. A real route renders ONE panel at `level={1}`. */ export default function Demo() { const [code, setCode] = useState(""); const [wrongCode, setWrongCode] = useState("140228"); const [pendingCode, setPendingCode] = useState("482915"); const [recoveryCode, setRecoveryCode] = useState(""); return ( GoDX ID } footer={ } /> } > 1 / 5 · otp · 認証アプリの 6 桁コード(1 行 6 スロット) 二段階認証 認証アプリに表示されている 6 桁のコードを入力してください。 2 / 5 · otp(error)— コード不一致 · aria-invalid + role=alert 二段階認証 認証アプリに表示されている 6 桁のコードを入力してください。 3 / 5 · otp(loading)— 検証中 · 入力をロックし、ボタンの箱は動かさない 二段階認証 コードを検証しています。しばらくお待ちください。 4 / 5 · recovery-code · 一度きりのリカバリコード(1 つのテキスト入力) リカバリコードを入力 二段階認証の設定時に保存した、一度だけ使えるコードを入力してください。 setRecoveryCode(event.target.value)} /> 5 / 5 · passkey-failure · パスキー認証に失敗(destructive 通知 + 代替手段) パスキーで確認できませんでした このデバイスのパスキーを読み取れませんでした。別の方法で本人確認を続けられます。 パスキーの認証がキャンセルされました デバイスのロック解除が完了しなかったか、対応するパスキーが見つかりませんでした。 ); }