收口认证表单输入组件

迁移登录、重置密码、绑定手机号、邀请码和账号安全表单到 PlatformTextField 与 PlatformFieldLabel

补充认证表单公共输入断言和绑定手机号独立测试

更新 PlatformUiKit 文档和 Hermes 决策记录
This commit is contained in:
2026-06-10 11:37:26 +08:00
parent b601b3b57e
commit 9389f9401f
10 changed files with 193 additions and 75 deletions

View File

@@ -3,7 +3,9 @@ import { useEffect, useState } from 'react';
import type { PlatformTheme } from '../../../packages/shared/src/contracts/runtime';
import type { AuthCaptchaChallenge, AuthUser } from '../../services/authService';
import { PlatformActionButton } from '../common/PlatformActionButton';
import { PlatformFieldLabel } from '../common/PlatformFieldLabel';
import { PlatformStatusMessage } from '../common/PlatformStatusMessage';
import { PlatformTextField } from '../common/PlatformTextField';
import { CaptchaChallengeField } from './CaptchaChallengeField';
type BindPhoneScreenProps = {
@@ -88,10 +90,11 @@ export function BindPhoneScreen({
void onSubmit(phone, code);
}}
>
<label className="grid gap-2 text-sm text-[var(--platform-text-base)]">
<span></span>
<input
className="platform-input"
<label className="grid gap-2">
<PlatformFieldLabel variant="form" className="mb-0">
</PlatformFieldLabel>
<PlatformTextField
autoComplete="tel"
inputMode="numeric"
value={phone}
@@ -100,11 +103,13 @@ export function BindPhoneScreen({
/>
</label>
<label className="grid gap-2 text-sm text-[var(--platform-text-base)]">
<span></span>
<label className="grid gap-2">
<PlatformFieldLabel variant="form" className="mb-0">
</PlatformFieldLabel>
<div className="flex gap-3">
<input
className="platform-input min-w-0 flex-1"
<PlatformTextField
className="min-w-0 flex-1"
inputMode="numeric"
value={code}
onChange={(event) => setCode(event.target.value)}