Skip to content

The open-source AI receptionist for businesses. Answers every call, books the appointment and hands over to a person when needed. You own the code and the data.

lg Button and Input on the sign-in cards and onboarding, Button busy (PR 1930)

Janik564a38b3dbc1
diff --git a/apps/web/src/AddPasskey.tsx b/apps/web/src/AddPasskey.tsx
index b50aa26d..7bd80730 100644
--- a/apps/web/src/AddPasskey.tsx
+++ b/apps/web/src/AddPasskey.tsx
@@ -10,7 +10,7 @@ import { lastSignInProvider } from './sign-in-methods.ts'
import { addPasskeyForThisDevice, SignInAgain } from './settings/account/account-api.ts'
import { AuthError } from './ui/AuthError.tsx'
import { HelpTip } from './ui/form.tsx'
-import { Button, cx, Note, Spinner } from './ui/kit.tsx'
+import { Button, Note } from './ui/kit.tsx'
import { SignedInAuthPage } from './shell/SignedInAuthPage.tsx'
/**
@@ -69,16 +69,16 @@ export function AddPasskeyPage({ account, onAdded, onDone }: PageProps) {
<div className="auth-card">
<h1>{t('auth.addPasskey.added')}</h1>
<p>{t('auth.addPasskey.addedNext')}</p>
- <button
- type="button"
- className="k-btn k-btn-primary"
+ <Button
+ variant="primary"
+ size="lg"
onClick={() => {
void onAdded()
onDone()
}}
>
{t('auth.addPasskey.continue')}
- </button>
+ </Button>
</div>
</SignedInAuthPage>
)
@@ -93,20 +93,13 @@ export function AddPasskeyPage({ account, onAdded, onDone }: PageProps) {
</p>
{request.error && <AuthError message={request.error} />}
{request.needsSignIn ? (
- <button type="button" className="k-btn k-btn-primary" onClick={() => void signInAgain()}>
+ <Button variant="primary" size="lg" onClick={() => void signInAgain()}>
{t('auth.addPasskey.signInAgain')}
- </button>
+ </Button>
) : (
- <button
- type="button"
- className={cx('k-btn k-btn-primary', adding && 'is-busy')}
- disabled={adding}
- aria-busy={adding || undefined}
- onClick={() => void request.add()}
- >
- {adding && <Spinner />}
+ <Button variant="primary" size="lg" busy={adding} onClick={() => void request.add()}>
{adding ? t('auth.addPasskey.waitingDevice') : t('auth.addPasskey.add')}
- </button>
+ </Button>
)}
<button
type="button"
diff --git a/apps/web/src/CheckoutReturn.tsx b/apps/web/src/CheckoutReturn.tsx
index 992187e0..c50444b6 100644
--- a/apps/web/src/CheckoutReturn.tsx
+++ b/apps/web/src/CheckoutReturn.tsx
@@ -23,7 +23,7 @@ import './onboarding/onboarding.css'
import { useSetupKeys } from './onboarding/setup-keys.ts'
import { SignedInAuthPage } from './shell/SignedInAuthPage.tsx'
import { AuthError } from './ui/AuthError.tsx'
-import { cx, Note, Spinner } from './ui/kit.tsx'
+import { Button, Note } from './ui/kit.tsx'
import { Loading, SkeletonFields } from './ui/LoadStates.tsx'
/**
@@ -115,16 +115,9 @@ export function CheckoutReturn({
<h1>{copy.title}</h1>
<p>{copy.text}</p>
{copy.extra && <p>{copy.extra}</p>}
- <button
- type="button"
- className={cx('k-btn k-btn-primary', busy && 'is-busy')}
- disabled={busy}
- aria-busy={busy || undefined}
- onClick={() => void leave()}
- >
- {busy && <Spinner />}
+ <Button variant="primary" size="lg" busy={busy} onClick={() => void leave()}>
{copy.button}
- </button>
+ </Button>
</div>
</SignedInAuthPage>
)
@@ -135,16 +128,9 @@ export function CheckoutReturn({
<h1>{t('auth.checkout.refusedTitle')}</h1>
<p>{refusedText(outcome.reason, t)}</p>
<p>{t('auth.checkout.refusedNothingChargedSetup')}</p>
- <button
- type="button"
- className={cx('k-btn k-btn-primary', busy && 'is-busy')}
- disabled={busy}
- aria-busy={busy || undefined}
- onClick={() => void leave()}
- >
- {busy && <Spinner />}
+ <Button variant="primary" size="lg" busy={busy} onClick={() => void leave()}>
{t('auth.checkout.toActivate')}
- </button>
+ </Button>
</div>
</SignedInAuthPage>
)
diff --git a/apps/web/src/ConfirmEmail.tsx b/apps/web/src/ConfirmEmail.tsx
index f9857acf..f09d1518 100644
--- a/apps/web/src/ConfirmEmail.tsx
+++ b/apps/web/src/ConfirmEmail.tsx
@@ -6,6 +6,7 @@ import { type FormEvent, useEffect, useState } from 'react'
import { auth } from './auth.ts'
import { authErrorMessage, CODE_LENGTH, normalizeCode, RESEND_AFTER_S } from './sign-in-code.ts'
import { AuthError } from './ui/AuthError.tsx'
+import { Input } from './ui/form.tsx'
import { Button } from './ui/kit.tsx'
import { useT } from '@linedesk/i18n/react'
@@ -85,24 +86,24 @@ export function ConfirmEmail({
</div>
{sent ? (
<div className="confirm-email-row">
- <span className="k-input">
- <input
- aria-label={t('auth.confirm.code')}
- name="code"
- value={code}
- onChange={e => setCode(normalizeCode(e.target.value))}
- disabled={busy}
- inputMode="numeric"
- autoComplete="one-time-code"
- pattern="[0-9]*"
- maxLength={CODE_LENGTH + 6}
- autoFocus
- // Enter confirms the code; the page's own Enter (onboarding: next step) must not run too.
- onKeyDown={e => {
- if (e.key === 'Enter') e.stopPropagation()
- }}
- />
- </span>
+ {/* sm like the buttons beside it: controls in one row share one size. */}
+ <Input
+ size="sm"
+ aria-label={t('auth.confirm.code')}
+ name="code"
+ value={code}
+ onChange={e => setCode(normalizeCode(e.target.value))}
+ disabled={busy}
+ inputMode="numeric"
+ autoComplete="one-time-code"
+ pattern="[0-9]*"
+ maxLength={CODE_LENGTH + 6}
+ autoFocus
+ // Enter confirms the code; the page's own Enter (onboarding: next step) must not run too.
+ onKeyDown={e => {
+ if (e.key === 'Enter') e.stopPropagation()
+ }}
+ />
<Button
type="submit"
variant="primary"
diff --git a/apps/web/src/CreateWorkspace.tsx b/apps/web/src/CreateWorkspace.tsx
index 1a96a072..81474365 100644
--- a/apps/web/src/CreateWorkspace.tsx
+++ b/apps/web/src/CreateWorkspace.tsx
@@ -7,7 +7,8 @@ import { type CreatingPhase, CreatingStatus } from './CreatingStatus.tsx'
import { CountrySelect } from './settings/CountrySelect.tsx'
import { signOutAndForget } from './localData.ts'
import { deletedOnPurpose, leftOnPurpose } from './session.ts'
-import { Note, Spinner } from './ui/kit.tsx'
+import { Input } from './ui/form.tsx'
+import { Button, Note } from './ui/kit.tsx'
import { SignedInAuthPage } from './shell/SignedInAuthPage.tsx'
/** How long "Opening…" may last before the page says to reload. */
@@ -108,9 +109,11 @@ export function CreateWorkspace({
<p>{t('auth.create.text')}</p>
</>
)}
- <label>
+ <label htmlFor="create-ws-name">
{t('shell.newWorkspace.name')}
- <input
+ <Input
+ id="create-ws-name"
+ size="lg"
required
value={name}
onChange={e => setName(e.target.value)}
@@ -124,16 +127,10 @@ export function CreateWorkspace({
<CountrySelect id="create-ws-country" value={country} onChange={setPicked} disabled={busy} />
</div>
{error && <Note tone="danger">{error}</Note>}
- <button
- type="submit"
- className={`k-btn k-btn-primary${busy ? ' is-busy' : ''}`}
- disabled={busy}
- aria-busy={busy || undefined}
- >
- {/* Busy, the label stays and the spinner shows it works; the line under it says what happens. */}
- {busy && <Spinner />}
+ {/* Busy, the label stays and the spinner shows it works; the line under it says what happens. */}
+ <Button type="submit" variant="primary" size="lg" busy={busy}>
{created && !busy ? t('shell.tabNotice.reload') : t('shell.tabNotice.continue')}
- </button>
+ </Button>
<CreatingStatus phase={phase} name={name.trim()} />
{children}
{!embedded && (
diff --git a/apps/web/src/Login.tsx b/apps/web/src/Login.tsx
index 429e29d0..b77dc7fc 100644
--- a/apps/web/src/Login.tsx
+++ b/apps/web/src/Login.tsx
@@ -14,7 +14,8 @@ import { LastUsed, ProviderButton, SignInMark } from './ui/brand-logos.tsx'
import { AuthError } from './ui/AuthError.tsx'
import { WaitLine } from './shell/SignedInAuthPage.tsx'
import { HelpTip, type HelpTipContent } from './ui/HelpTip.tsx'
-import { AuthPage, cx, Icon, Spinner } from './ui/kit.tsx'
+import { Input } from './ui/form.tsx'
+import { AuthPage, Button, cx, Icon, Spinner } from './ui/kit.tsx'
import { NO_PASSWORD_MANAGER } from './ui/passwordManager.ts'
import { brandName, useBrandKnown } from './brand.ts'
import { leftAndDeleted, readDeleted, signedOutOfWorkspace } from './session.ts'
@@ -259,14 +260,14 @@ export function Login({ onDone, reauth }: { onDone: () => Promise<void>; reauth?
const nothing = !methods.emailCode && !methods.password && methods.sso.length === 0
const emailForm = methods.emailCode && (
<form className="auth-form" onSubmit={sendCode} noValidate>
- <input type="email" id="signin-email" name="email" aria-label={t('auth.email')} placeholder={t('auth.emailPlaceholder')} value={form.email}
+ <Input size="lg" type="email" id="signin-email" name="email" aria-label={t('auth.email')} placeholder={t('auth.emailPlaceholder')} value={form.email}
onChange={set('email')} autoCapitalize="none" spellCheck={false}
// The account's name for password managers ("username", not "email"); with the passkey first, the browser may
// offer a passkey right in this field (autofill).
autoComplete={start.passkeyFirst ? 'username webauthn' : 'username'} autoFocus={!start.passkeyFirst || emailOpen}
aria-describedby={error ? 'auth-error' : undefined} />
{/* "Send code", black, as on the sign-up and password reset pages. */}
- <button type="submit" className={cx('k-btn k-btn-primary auth-provider', busy === 'email' && 'is-busy')}
+ <button type="submit" className={cx('k-btn k-btn-primary k-btn-lg auth-provider', busy === 'email' && 'is-busy')}
disabled={busy !== null} aria-busy={busy === 'email' || undefined}>
{busy === 'email' && <Spinner />}
<span className="auth-provider-label">{t('auth.signup.sendCode')}</span>
@@ -289,7 +290,7 @@ export function Login({ onDone, reauth }: { onDone: () => Promise<void>; reauth?
)}
{/* One black button: the passkey, until the email form opens and its "Send code" is the step's action. Not
focused on load: a focus ring around the first thing on the page reads as an error (U4). */}
- <button type="button" className={cx('k-btn auth-provider', emailOpen ? 'k-btn-secondary' : 'k-btn-primary', passkeyBusy && 'is-busy')}
+ <button type="button" className={cx('k-btn k-btn-lg auth-provider', emailOpen ? 'k-btn-secondary' : 'k-btn-primary', passkeyBusy && 'is-busy')}
disabled={busy !== null} aria-busy={passkeyBusy || undefined} onClick={continueWithPasskey}>
{passkeyBusy ? <Spinner /> : <SignInMark method="passkey" />}
<span className="auth-provider-label">{t('auth.withPasskey')}</span>
@@ -375,14 +376,13 @@ function PasswordForm({ form, set, busy, disabled, error, autoFocus, onSubmit }:
const t = useT()
return (
<form className="auth-form" onSubmit={onSubmit} noValidate>
- <input type="email" id="signin-username" name="username" aria-label={t('auth.email')} placeholder={t('auth.emailPlaceholder')} value={form.email}
+ <Input size="lg" type="email" id="signin-username" name="username" aria-label={t('auth.email')} placeholder={t('auth.emailPlaceholder')} value={form.email}
onChange={set('email')} autoComplete="username" autoCapitalize="none" spellCheck={false} autoFocus={autoFocus} />
- <input type="password" id="signin-password" name="password" aria-label={t('auth.method.password')} placeholder={t('auth.method.password')}
+ <Input size="lg" type="password" id="signin-password" name="password" aria-label={t('auth.method.password')} placeholder={t('auth.method.password')}
value={form.password} onChange={set('password')} autoComplete="current-password" />
- <button type="submit" className={cx('k-btn k-btn-primary', busy && 'is-busy')} disabled={disabled} aria-busy={busy || undefined}>
- {busy && <Spinner />}
+ <Button type="submit" variant="primary" size="lg" busy={busy} disabled={disabled}>
{t('auth.signIn')}
- </button>
+ </Button>
{error}
</form>
)
@@ -572,11 +572,9 @@ export function CodeStep({ email, links, supportEmail, invited = false, selfServ
inputMode="numeric" autoComplete="one-time-code" pattern="[0-9]*" maxLength={CODE_LENGTH + 6} autoFocus
aria-describedby={error ? 'code-error' : undefined} />
{error && <AuthError message={error} id="code-error" link={signupLinkFor(error, selfServeSignup)} />}
- <button type="submit" className={cx('k-btn k-btn-primary', (busy || signedIn) && 'is-busy')}
- disabled={busy || code.length < CODE_LENGTH} aria-busy={busy || signedIn || undefined}>
- {(busy || signedIn) && <Spinner />}
+ <Button type="submit" variant="primary" size="lg" busy={busy || signedIn} disabled={code.length < CODE_LENGTH}>
{t('auth.signup.continue')}
- </button>
+ </Button>
{limited && waitS > 0 && <CodeWait waitS={waitS} />}
<div className="auth-links">
<button type="button" className="auth-switch" disabled={waitS > 0} onClick={() => void resend()}>
@@ -700,14 +698,12 @@ function ResetStep({ initialEmail, links, onDone, onBack }: ResetStepProps) {
<h1>{t('auth.reset.title')}</h1>
<p>{t('auth.reset.text')}</p>
<div className="auth-form">
- <input type="email" id="reset-username" name="username" aria-label={t('auth.email')} placeholder={t('auth.emailPlaceholder')} value={email}
+ <Input size="lg" type="email" id="reset-username" name="username" aria-label={t('auth.email')} placeholder={t('auth.emailPlaceholder')} value={email}
onChange={e => setEmail(e.target.value)} autoComplete="username" autoCapitalize="none" spellCheck={false} autoFocus
aria-describedby={error ? 'reset-error' : undefined} />
- <button type="submit" className={cx('k-btn k-btn-primary', busy === 'send' && 'is-busy')} disabled={busy !== null}
- aria-busy={busy === 'send' || undefined}>
- {busy === 'send' && <Spinner />}
+ <Button type="submit" variant="primary" size="lg" busy={busy === 'send'} disabled={busy !== null}>
{t('auth.reset.send')}
- </button>
+ </Button>
{error && <AuthError message={error} id="reset-error" />}
</div>
<button type="button" className="auth-switch" onClick={onBack}>{t('auth.reset.back')}</button>
@@ -731,14 +727,12 @@ function ResetStep({ initialEmail, links, onDone, onBack }: ResetStepProps) {
onChange={e => setCode(normalizeCode(e.target.value))}
disabled={working} inputMode="numeric" autoComplete="one-time-code" pattern="[0-9]*" maxLength={CODE_LENGTH + 6} autoFocus
aria-describedby={error ? 'reset-error' : undefined} />
- <input type="password" id="reset-new-password" name="new-password" aria-label={t('auth.reset.newPassword')}
+ <Input size="lg" type="password" id="reset-new-password" name="new-password" aria-label={t('auth.reset.newPassword')}
placeholder={t('auth.reset.newPasswordPlaceholder', { min: 8 })} value={password} onChange={e => setPassword(e.target.value)}
disabled={working} autoComplete="new-password" minLength={8} />
- <button type="submit" className={cx('k-btn k-btn-primary', working && 'is-busy')} disabled={busy !== null}
- aria-busy={working || undefined}>
- {working && <Spinner />}
+ <Button type="submit" variant="primary" size="lg" busy={working} disabled={busy !== null}>
{t('auth.reset.set')}
- </button>
+ </Button>
{error && <AuthError message={error} id="reset-error" />}
</div>
<p className="auth-note">{t('auth.reset.signsOut')}</p>
@@ -795,23 +789,20 @@ function SetupStep({ onDone }: { onDone: () => Promise<void> }) {
<h1>{t('auth.setup.title', { brand: brandName() })}</h1>
<p>{t('auth.setup.text')}</p>
<div className="auth-form">
- <span className="k-has-help">
- {/* From the server log, not a code by SMS or email: no one-time-code suggestions. */}
- <input id="setup-code" name="setup-code" aria-label={t('auth.setup.code')} placeholder={t('auth.setup.code')} value={form.code}
- onChange={set('code')} {...NO_PASSWORD_MANAGER} autoCapitalize="characters" spellCheck={false} autoFocus />
- <HelpTip inField label={t('auth.setup.codeWhere')} {...setupCodeHelp()} />
- </span>
- <input id="setup-name" name="name" aria-label={t('auth.setup.name')} placeholder={t('auth.setup.name')} value={form.name} onChange={set('name')}
+ {/* From the server log, not a code by SMS or email: no one-time-code suggestions. */}
+ <Input size="lg" id="setup-code" name="setup-code" aria-label={t('auth.setup.code')} placeholder={t('auth.setup.code')} value={form.code}
+ onChange={set('code')} {...NO_PASSWORD_MANAGER} autoCapitalize="characters" spellCheck={false} autoFocus
+ end={<HelpTip inField label={t('auth.setup.codeWhere')} {...setupCodeHelp()} />} />
+ <Input size="lg" id="setup-name" name="name" aria-label={t('auth.setup.name')} placeholder={t('auth.setup.name')} value={form.name} onChange={set('name')}
autoComplete="name" />
- <input type="email" id="setup-username" name="username" aria-label={t('auth.email')} placeholder={t('auth.emailPlaceholder')} value={form.email}
+ <Input size="lg" type="email" id="setup-username" name="username" aria-label={t('auth.email')} placeholder={t('auth.emailPlaceholder')} value={form.email}
onChange={set('email')} autoComplete="username" autoCapitalize="none" spellCheck={false} />
- <input type="password" id="setup-new-password" name="new-password" aria-label={t('auth.method.password')}
+ <Input size="lg" type="password" id="setup-new-password" name="new-password" aria-label={t('auth.method.password')}
placeholder={t('auth.setup.passwordPlaceholder', { min: 12 })} value={form.password} onChange={set('password')} autoComplete="new-password"
minLength={12} />
- <button type="submit" className={cx('k-btn k-btn-primary', busy && 'is-busy')} disabled={busy} aria-busy={busy || undefined}>
- {busy && <Spinner />}
+ <Button type="submit" variant="primary" size="lg" busy={busy}>
{t('auth.setup.submit')}
- </button>
+ </Button>
{error && <AuthError message={error} />}
</div>
<p className="auth-note">{t('auth.setup.next')}</p>
diff --git a/apps/web/src/NoWorkspace.tsx b/apps/web/src/NoWorkspace.tsx
index 70d7ee56..0cdfa3ad 100644
--- a/apps/web/src/NoWorkspace.tsx
+++ b/apps/web/src/NoWorkspace.tsx
@@ -31,6 +31,7 @@ import { callAction } from './settings/settings-api.ts'
import { roleLabel } from './shell/invitations.ts'
import { SignedInAuthPage } from './shell/SignedInAuthPage.tsx'
import { AuthError } from './ui/AuthError.tsx'
+import { Button } from './ui/kit.tsx'
export type PendingInvitation = { id: string; workspaceName: string; role: string }
type InvitationRow = { id: string; organizationName?: string; role: string; status: string; expiresAt: string | Date }
@@ -200,14 +201,9 @@ export function NoWorkspace({ me, lostWorkspace = null, onDone, onOpenInvite }:
/>
)}
{admin && (
- <button
- type="button"
- className="k-btn k-btn-secondary"
- onClick={() => (window.location.hash = '#admin')}
- title={t('auth.noWorkspace.adminTip')}
- >
+ <Button size="lg" onClick={() => (window.location.hash = '#admin')} title={t('auth.noWorkspace.adminTip')}>
{t('auth.noWorkspace.openAdmin')}
- </button>
+ </Button>
)}
<button
type="button"
@@ -265,9 +261,9 @@ function AccountPage({ onBack }: { onBack: () => void }) {
return (
<div className="page">
<div className="pagebar">
- <button type="button" className="k-btn k-btn-ghost k-btn-sm" onClick={onBack} title={t('auth.back')}>
+ <Button variant="ghost" size="sm" onClick={onBack} title={t('auth.back')}>
{t('auth.back')}
- </button>
+ </Button>
<b>{t('auth.noWorkspace.account')}</b>
</div>
<AccountSettings hasWorkspace={false} />
@@ -287,14 +283,15 @@ function InvitationList({ invitations, onOpen }: { invitations: PendingInvitatio
values={{ workspace: i.workspaceName, role: roleLabel(i.role), b: chunks => <b>{chunks}</b> }}
/>
</span>
- <button
- type="button"
- className="k-btn k-btn-primary k-btn-sm"
+ {/* lg like every control on the card (it was drawn lg by the card's CSS before Button had the size). */}
+ <Button
+ variant="primary"
+ size="lg"
onClick={() => onOpen(i.id)}
title={t('auth.noWorkspace.openTip', { workspace: i.workspaceName })}
>
{t('auth.noWorkspace.open')}
- </button>
+ </Button>
</div>
))}
</div>
@@ -342,16 +339,16 @@ export function PartnerInvitationList({
}}
/>
</span>
- <button
- type="button"
- className="k-btn k-btn-primary k-btn-sm"
+ <Button
+ variant="primary"
+ size="lg"
+ busy={busy === i.id}
disabled={busy !== null}
- aria-busy={busy === i.id || undefined}
onClick={() => void join(i.id)}
title={t('auth.noWorkspace.joinPartnerTip', { partner: i.partnerName })}
>
{t('team.partner.invite.join')}
- </button>
+ </Button>
</div>
))}
{problem && <AuthError message={problem} />}
diff --git a/apps/web/src/SignInLink.tsx b/apps/web/src/SignInLink.tsx
index bbc6fb52..d025c2e3 100644
--- a/apps/web/src/SignInLink.tsx
+++ b/apps/web/src/SignInLink.tsx
@@ -9,7 +9,7 @@ import { brandName } from './brand.ts'
import { authErrorMessage } from './sign-in-code.ts'
import { rememberSignInMethod } from './sign-in-methods.ts'
import { AuthError } from './ui/AuthError.tsx'
-import { AuthPage, cx, Spinner } from './ui/kit.tsx'
+import { AuthPage, Button } from './ui/kit.tsx'
import { Loading, Skeleton } from './ui/LoadStates.tsx'
const PREFIX = '#sign-in='
@@ -107,16 +107,9 @@ export function SignInLink({
<>
<h1>{t('auth.link.title', { brand })}</h1>
<p>{t('auth.link.as', { email: link.email })}</p>
- <button
- type="button"
- className={cx('k-btn k-btn-primary', busy && 'is-busy')}
- disabled={busy}
- aria-busy={busy || undefined}
- onClick={() => void continueSignIn()}
- >
- {busy && <Spinner />}
+ <Button variant="primary" size="lg" busy={busy} onClick={() => void continueSignIn()}>
{busy ? t('auth.signingIn') : t('auth.link.continue')}
- </button>
+ </Button>
{error && <AuthError message={error} />}
<button type="button" className="auth-switch" onClick={onLeave}>
{t('auth.link.notYou')}
@@ -128,9 +121,9 @@ export function SignInLink({
<h1>{t('auth.link.spentTitle')}</h1>
<p>{t('auth.link.spentText')}</p>
{error && <AuthError message={error} />}
- <button type="button" className="k-btn k-btn-primary" onClick={onLeave}>
+ <Button variant="primary" size="lg" onClick={onLeave}>
{t('auth.link.toSignIn')}
- </button>
+ </Button>
</>
)}
</div>
diff --git a/apps/web/src/Signup.tsx b/apps/web/src/Signup.tsx
index ea5bda55..407ef8e5 100644
--- a/apps/web/src/Signup.tsx
+++ b/apps/web/src/Signup.tsx
@@ -34,7 +34,8 @@ import {
} from './signup.ts'
import { ExternalLink } from './ui/AppLink.tsx'
import { AuthError } from './ui/AuthError.tsx'
-import { cx, Spinner } from './ui/kit.tsx'
+import { Input } from './ui/form.tsx'
+import { Button, cx } from './ui/kit.tsx'
import { SignedInAuthPage, WaitLine } from './shell/SignedInAuthPage.tsx'
import { loadTurnstile } from './turnstile.ts'
@@ -352,7 +353,8 @@ export function EmailStep({
</h1>
<p>{partner ? t('auth.signup.partnerLead') : t('auth.signup.intro')}</p>
<div className="auth-form">
- <input
+ <Input
+ size="lg"
type="email"
aria-label={t('auth.email')}
placeholder={t('auth.emailPlaceholder')}
@@ -368,15 +370,9 @@ export function EmailStep({
/>
{config.turnstileSiteKey && <TurnstileBox bot={bot} />}
{bot.failed && <AuthError message={t('auth.signup.botCheckFailed')} />}
- <button
- type="submit"
- className={cx('k-btn k-btn-primary', busy && 'is-busy')}
- disabled={busy || opening !== null}
- aria-busy={busy || undefined}
- >
- {busy && <Spinner />}
+ <Button type="submit" variant="primary" size="lg" busy={busy} disabled={opening !== null}>
{t('auth.signup.sendCode')}
- </button>
+ </Button>
{(error ?? returned) && <AuthError message={(error ?? returned)!} />}
{waitS > 0 && <CodeWait waitS={waitS} providerNote={t('auth.signup.waitHaveAccount')} />}
{providers.length > 0 && waitS <= 0 && (
@@ -487,15 +483,9 @@ function CodeStep({
autoFocus
/>
{error && <AuthError message={error} />}
- <button
- type="submit"
- className={cx('k-btn k-btn-primary', busy && 'is-busy')}
- disabled={busy || code.length < CODE_LENGTH}
- aria-busy={busy || undefined}
- >
- {busy && <Spinner />}
+ <Button type="submit" variant="primary" size="lg" busy={busy} disabled={code.length < CODE_LENGTH}>
{t('auth.signup.continue')}
- </button>
+ </Button>
{waitS <= 0 && config.turnstileSiteKey && <TurnstileBox bot={bot} />}
{limited && waitS > 0 && <CodeWait waitS={waitS} providerNote={t('auth.signup.waitHaveAccount')} />}
<div className="auth-links">
@@ -596,9 +586,11 @@ export function DetailsStep({
: t('auth.signup.nameTitle')}
</h1>
<p>{partner ? t('auth.signup.partnerDetailsText') : t('auth.signup.nameText')}</p>
- <label>
+ <label htmlFor="signup-name">
{t('auth.signup.yourName')}
- <input
+ <Input
+ id="signup-name"
+ size="lg"
value={name}
onChange={e => setName(e.target.value)}
autoComplete="name"
@@ -607,9 +599,11 @@ export function DetailsStep({
/>
</label>
{partner && (
- <label>
+ <label htmlFor="signup-company">
{t('auth.signup.partnerName')}
- <input
+ <Input
+ id="signup-company"
+ size="lg"
value={company}
onChange={e => setCompany(e.target.value)}
autoComplete="organization"
@@ -636,20 +630,14 @@ export function DetailsStep({
}}
/>
</p>
- <button
- type="submit"
- className={cx('k-btn k-btn-primary', busy && 'is-busy')}
- disabled={busy}
- aria-busy={busy || undefined}
- >
- {busy && <Spinner />}
+ <Button type="submit" variant="primary" size="lg" busy={busy}>
{/* Signed in already, a partner gets its partner account and no workspace (docs/white-label.md). */}
{fromApp
? partner
? t('auth.signup.createPartnerAccount')
: t('auth.signup.createWorkspace')
: t('auth.signup.createAccount')}
- </button>
+ </Button>
{fromApp ? (
<button type="button" className="auth-switch" disabled={busy} onClick={fromApp.onBack}>
{t('auth.back')}
diff --git a/apps/web/src/admin/SecondFactorPrompt.tsx b/apps/web/src/admin/SecondFactorPrompt.tsx
index fc973cf6..c53a679c 100644
--- a/apps/web/src/admin/SecondFactorPrompt.tsx
+++ b/apps/web/src/admin/SecondFactorPrompt.tsx
@@ -28,7 +28,8 @@ import { passkeyAddCancelled } from '../settings/account/add-passkey.ts'
import { AUTHENTICATOR_HOURS, authenticatorErrorText } from '../settings/account/authenticator.tsx'
import { passkeyNotVerifiedText } from '../sign-in-code.ts'
import { AuthError } from '../ui/AuthError.tsx'
-import { cx, Spinner } from '../ui/kit.tsx'
+import { Input } from '../ui/form.tsx'
+import { Button } from '../ui/kit.tsx'
import { SignedInAuthPage } from '../shell/SignedInAuthPage.tsx'
import { NO_PASSWORD_MANAGER } from '../ui/passwordManager.ts'
import { loadAgentLinkActive, runAdminOnce } from './api.ts'
@@ -218,7 +219,8 @@ function PasskeyGate({ state, onExit, hasAuthenticator }: GateProps) {
<p className="auth-hint">
{t('admin.secondFactor.enrolmentWhere')} <code className="auth-command">{enrolmentCommand()}</code>
</p>
- <input
+ <Input
+ size="lg"
aria-label={t('admin.secondFactor.codeLabel')}
placeholder={t('admin.secondFactor.codeLabel')}
value={code}
@@ -230,38 +232,36 @@ function PasskeyGate({ state, onExit, hasAuthenticator }: GateProps) {
/>
{error && <AuthError message={error} />}
{needsSignIn ? (
- <button type="button" className="k-btn k-btn-primary" onClick={() => void signInAgain()}>
+ <Button variant="primary" size="lg" onClick={() => void signInAgain()}>
{t('admin.secondFactor.signInAgain')}
- </button>
+ </Button>
) : (
- <button
+ <Button
type="submit"
- className={cx('k-btn k-btn-primary', busy && 'is-busy')}
- disabled={busy !== null || !code.trim()}
- aria-busy={busy !== null || undefined}
+ variant="primary"
+ size="lg"
+ busy={busy !== null}
+ disabled={!code.trim()}
title={t('admin.secondFactor.addTip')}
>
- {busy && <Spinner />}
{busy ? t('admin.stepUp.waiting') : t('admin.secondFactor.add')}
- </button>
+ </Button>
)}
</form>
)}
{!enrol && supported && (
<>
{error && <AuthError message={error} />}
- <button
- type="button"
- className={cx('k-btn k-btn-primary', busy && 'is-busy')}
- disabled={busy !== null}
- aria-busy={busy !== null || undefined}
+ <Button
+ variant="primary"
+ size="lg"
+ busy={busy !== null}
autoFocus
title={t('admin.stepUp.confirm.tip')}
onClick={() => void confirm()}
>
- {busy && <Spinner />}
{busy ? t('admin.stepUp.waiting') : t('admin.stepUp.confirm.button')}
- </button>
+ </Button>
</>
)}
{!enrol && hasAuthenticator && (
@@ -316,7 +316,8 @@ function AuthenticatorCode({
void submit()
}}
>
- <input
+ <Input
+ size="lg"
aria-label={t('account.authenticator.code')}
placeholder={t('account.authenticator.codePlaceholder')}
value={value}
@@ -329,16 +330,16 @@ function AuthenticatorCode({
disabled={busy}
/>
{error && <AuthError message={error} />}
- <button
+ <Button
type="submit"
- className={cx('k-btn k-btn-primary', busy && 'is-busy')}
- disabled={busy || value.trim().length < 6}
- aria-busy={busy || undefined}
+ variant="primary"
+ size="lg"
+ busy={busy}
+ disabled={value.trim().length < 6}
title={submitTitle}
>
- {busy && <Spinner />}
{submitLabel}
- </button>
+ </Button>
</form>
)
}
@@ -368,18 +369,16 @@ function AddPasskeyHere() {
<h1>{t('account.authenticator.addHereTitle')}</h1>
<p className="auth-why">{t('account.authenticator.addHereWhy')}</p>
{error && <AuthError message={error} />}
- <button
- type="button"
- className={cx('k-btn k-btn-primary', busy && 'is-busy')}
- disabled={busy}
- aria-busy={busy || undefined}
+ <Button
+ variant="primary"
+ size="lg"
+ busy={busy}
autoFocus
title={t('account.authenticator.addHereButtonTitle')}
onClick={() => void add()}
>
- {busy && <Spinner />}
{busy ? t('account.passkeys.waiting') : t('account.passkeys.add')}
- </button>
+ </Button>
<button
type="button"
className="auth-switch"
diff --git a/apps/web/src/app.css b/apps/web/src/app.css
index 9f19894b..373fca39 100644
--- a/apps/web/src/app.css
+++ b/apps/web/src/app.css
@@ -84,28 +84,6 @@ body,
font-size: 12.5px;
color: var(--ink-muted);
}
-/* Sign-in controls take the large control height, like onboarding (docs/design-principles.md, control heights). */
-.auth-card input {
- box-sizing: border-box;
- width: 100%;
- height: var(--control-h-lg);
- padding: 0 12px;
- font: inherit;
- font-size: 14px;
- color: var(--ink);
- background: var(--surface);
- border: 1px solid var(--line-control);
- border-radius: var(--radius-sm);
-}
-.auth-card input::placeholder {
- color: var(--ink-muted);
- opacity: 1;
-}
-.auth-card input:focus {
- outline: none;
- border-color: var(--focus);
- box-shadow: 0 0 0 1px var(--focus);
-}
.auth-card .auth-field {
display: flex;
flex-direction: column;
@@ -119,21 +97,10 @@ body,
height: var(--control-h-lg);
font-size: 14px;
}
-.auth-card input.k-ssel-search {
- width: auto;
- height: auto;
- margin: 4px;
- padding: 6px 8px;
- font-size: 13px;
- border-radius: var(--radius-xs);
-}
-.auth-card input.k-ssel-search:focus {
- box-shadow: none;
-}
+/* Sign-in controls are lg (Button and Input size="lg", docs/design-principles.md, control heights); full-width
+ buttons centre their label. */
.auth-card .k-btn {
justify-content: center;
- height: var(--control-h-lg);
- font-size: 14px;
}
/* "Continue with ...": the mark at the left edge, the label centred, "Last used" at the right edge.
Three columns: the label stays centred while the outer two can be equal; when "Last used" needs
@@ -915,6 +882,14 @@ a.auth-switch {
/* Sign-in code: one field for six digits, large and spaced so it reads like the code in the email. The indent of one
letter space balances the space after the last digit, so the digits sit in the middle. */
.auth-card input.auth-code {
+ box-sizing: border-box;
+ width: 100%;
+ font: inherit;
+ padding: 0 12px;
+ color: var(--ink);
+ background: var(--surface);
+ border: 1px solid var(--line-control);
+ border-radius: var(--radius-sm);
height: 48px;
font-family: var(--font-mono);
font-size: 24px;
@@ -925,6 +900,15 @@ a.auth-switch {
/* "Code from the email" in the empty field: the card's own text, not the code's large spaced digits. Set on the empty
field itself, not only on ::placeholder: browsers put a smaller placeholder on the large text's baseline, so it sat
off the middle. */
+.auth-card input.auth-code::placeholder {
+ color: var(--ink-muted);
+ opacity: 1;
+}
+.auth-card input.auth-code:focus {
+ outline: none;
+ border-color: var(--focus);
+ box-shadow: 0 0 0 1px var(--focus);
+}
.auth-card input.auth-code:placeholder-shown {
font-family: var(--font-sans);
font-size: 14px;
diff --git a/apps/web/src/integrations/ConnectAgent.tsx b/apps/web/src/integrations/ConnectAgent.tsx
index 618d61e2..cb1b00bf 100644
--- a/apps/web/src/integrations/ConnectAgent.tsx
+++ b/apps/web/src/integrations/ConnectAgent.tsx
@@ -112,6 +112,7 @@ function Refused({ text, errorTo, onLeave }: { text: string; errorTo: string | n
<AuthError message={text} />
{errorTo && (
<Button
+ size="lg"
variant="secondary"
title={t('account.connectAgent.returnToAgentTip')}
onClick={() => window.location.assign(errorTo)}
@@ -119,7 +120,12 @@ function Refused({ text, errorTo, onLeave }: { text: string; errorTo: string | n
{t('account.connectAgent.returnToAgent')}
</Button>
)}
- <Button variant="secondary" title={t('account.connectAgent.backTip', { brand: brandName() })} onClick={onLeave}>
+ <Button
+ size="lg"
+ variant="secondary"
+ title={t('account.connectAgent.backTip', { brand: brandName() })}
+ onClick={onLeave}
+ >
{t('account.connectAgent.back', { brand: brandName() })}
</Button>
</Card>
@@ -245,6 +251,7 @@ function Consent({ request, about }: { request: OAuthRequest; about: Extract<OAu
disabled={leaving || !armed}
/>
<Button
+ size="lg"
variant="secondary"
shortcut={['esc']}
disabled={leaving}
diff --git a/apps/web/src/integrations/ShopifyLink.tsx b/apps/web/src/integrations/ShopifyLink.tsx
index 4158f9be..46e88fea 100644
--- a/apps/web/src/integrations/ShopifyLink.tsx
+++ b/apps/web/src/integrations/ShopifyLink.tsx
@@ -161,6 +161,7 @@ export function ShopifyLink({ me, onLeave }: Props) {
<Card title={t('settings.integrations.shopifyLink.noWorkspaceTitle')}>
<p>{t('settings.integrations.shopifyLink.noWorkspace')}</p>
<Button
+ size="lg"
variant="primary"
shortcut={['esc']}
title={t('common.withKey', { label: t('settings.integrations.shopifyLink.createWorkspaceTip'), key: 'esc' })}
@@ -175,6 +176,7 @@ export function ShopifyLink({ me, onLeave }: Props) {
<Card title={t('settings.integrations.shopifyLink.problemTitle')}>
<AuthError message={t(problem)} />
<Button
+ size="lg"
shortcut={['esc']}
title={t('common.withKey', { label: t('settings.integrations.shopifyLink.backTip'), key: 'esc' })}
onClick={leave}
@@ -221,6 +223,7 @@ export function ShopifyLink({ me, onLeave }: Props) {
{error && <AuthError message={t(error)} />}
<div className="auth-form">
<Button
+ size="lg"
variant="primary"
busy={linking}
disabled={!ready}
@@ -230,6 +233,7 @@ export function ShopifyLink({ me, onLeave }: Props) {
{t('settings.integrations.shopifyLink.confirm', { workspace: workspace.name })}
</Button>
<Button
+ size="lg"
shortcut={['esc']}
disabled={linking}
title={t('common.withKey', { label: t('settings.integrations.shopifyLink.cancelTip'), key: 'esc' })}
diff --git a/apps/web/src/onboarding/AdminStart.tsx b/apps/web/src/onboarding/AdminStart.tsx
index 65b86b37..52d69882 100644
--- a/apps/web/src/onboarding/AdminStart.tsx
+++ b/apps/web/src/onboarding/AdminStart.tsx
@@ -96,7 +96,7 @@ export function AdminStart({
<b>{t('onboarding.adminStart.agent')}</b>
<span className="as-small">{t('onboarding.adminStart.agentHelp')}</span>
<AiButton
- size="md"
+ size="lg"
label={t('onboarding.adminStart.agentButton')}
title={t('onboarding.adminStart.agentTip')}
onClick={backToInstallAgent}
@@ -122,7 +122,12 @@ export function AdminStart({
/>
</div>
) : (
- <Button variant="ghost" onClick={() => setByHand(true)} title={t('onboarding.adminStart.byHandTip')}>
+ <Button
+ size="lg"
+ variant="ghost"
+ onClick={() => setByHand(true)}
+ title={t('onboarding.adminStart.byHandTip')}
+ >
{t('onboarding.adminStart.byHand')}
</Button>
)}
@@ -168,6 +173,7 @@ export function ByHand({
{checkDue === 'email' ? t('onboarding.adminStart.checkFirstEmail') : t('onboarding.adminStart.checkFirst')}
</p>
<Button
+ size="lg"
onClick={onConfirm}
title={checkDue === 'email' ? t('onboarding.adminStart.checkTipEmail') : t('onboarding.adminStart.checkTip')}
>
@@ -194,7 +200,7 @@ export function ByHand({
{state && installPartsMissing(state.progress.steps, install) ? (
<>
<p>{t('onboarding.adminStart.partsFirst')}</p>
- <Button onClick={onInstallByHand} title={t('onboarding.adminStart.partsFirstTip')}>
+ <Button size="lg" onClick={onInstallByHand} title={t('onboarding.adminStart.partsFirstTip')}>
{t('onboarding.adminStart.partsFirstButton')}
</Button>
</>
diff --git a/apps/web/src/onboarding/AgentSetup.tsx b/apps/web/src/onboarding/AgentSetup.tsx
index add09e48..193167e6 100644
--- a/apps/web/src/onboarding/AgentSetup.tsx
+++ b/apps/web/src/onboarding/AgentSetup.tsx
@@ -689,13 +689,14 @@ export function AgentSetup({
{...foot}
primary={
openApp ? (
- <Button variant={finishedHere && !hasLink ? 'primary' : 'secondary'} onClick={onDone}>
+ <Button size="lg" variant={finishedHere && !hasLink ? 'primary' : 'secondary'} onClick={onDone}>
{allDone
? t('onboarding.agentSetup.open', { brand: brandName() })
: t('onboarding.agentSetup.openNow', { brand: brandName() })}
</Button>
) : partnerId && allDone ? (
<Button
+ size="lg"
variant={finishedHere && !hasLink ? 'primary' : 'secondary'}
onClick={onDone}
title={t('onboarding.agentSetup.partner.areaTitle')}
diff --git a/apps/web/src/onboarding/BusinessStep.tsx b/apps/web/src/onboarding/BusinessStep.tsx
index d2cd26c8..e52271c3 100644
--- a/apps/web/src/onboarding/BusinessStep.tsx
+++ b/apps/web/src/onboarding/BusinessStep.tsx
@@ -344,7 +344,7 @@ function FindBusiness({
)}
{canSearch && (
<p className="ob2-row ob-tight">
- <Button size="sm" variant="ghost" onClick={() => setPhase({ kind: 'find' })}>
+ <Button size="lg" variant="ghost" onClick={() => setPhase({ kind: 'find' })}>
{t('onboarding.business.manual.searchGoogle')}
</Button>
</p>
diff --git a/apps/web/src/onboarding/ForwardingCheck.tsx b/apps/web/src/onboarding/ForwardingCheck.tsx
index f7ab9731..b28fc028 100644
--- a/apps/web/src/onboarding/ForwardingCheck.tsx
+++ b/apps/web/src/onboarding/ForwardingCheck.tsx
@@ -269,6 +269,7 @@ export function ForwardingCheck({
{canCheck && available && (
<div className="ob2-row">
<Button
+ size="lg"
busy={starting || dialing}
variant="secondary"
onClick={() => void start()}
@@ -303,12 +304,12 @@ export function ForwardingCheck({
{result.fixes && canCheck && (
<span className="ob2-row fc-fixes">
{result.fixes.includes('forward_all') && (
- <Button size="sm" variant="secondary" onClick={() => switchTo('forward_all')}>
+ <Button size="lg" variant="secondary" onClick={() => switchTo('forward_all')}>
{t('onboarding.forwardingCheck.forwardAllInstead')}
</Button>
)}
{result.fixes.includes('new') && (
- <Button size="sm" variant="ghost" onClick={() => switchTo('new')}>
+ <Button size="lg" variant="ghost" onClick={() => switchTo('new')}>
{t('onboarding.forwardingCheck.giveOutInstead', { number: formatNumber(number.e164) })}
</Button>
)}
diff --git a/apps/web/src/onboarding/PhoneStep.tsx b/apps/web/src/onboarding/PhoneStep.tsx
index 4720f594..b7a35cfb 100644
--- a/apps/web/src/onboarding/PhoneStep.tsx
+++ b/apps/web/src/onboarding/PhoneStep.tsx
@@ -433,7 +433,7 @@ function Connected({
{t(word('onboarding.phone.connected.onlyNew'), { name, number: formatNumber(number.e164) })}
</p>
<div className="ob2-row">
- <Button variant="secondary" onClick={forwardToo}>
+ <Button size="lg" variant="secondary" onClick={forwardToo}>
{offer === 'forward_all'
? t(word('onboarding.phone.connected.forwardAllToo'))
: t(word('onboarding.phone.connected.forwardMissedToo'))}
diff --git a/apps/web/src/onboarding/SetupFoot.tsx b/apps/web/src/onboarding/SetupFoot.tsx
index 05f76d99..f50d4dad 100644
--- a/apps/web/src/onboarding/SetupFoot.tsx
+++ b/apps/web/src/onboarding/SetupFoot.tsx
@@ -79,6 +79,7 @@ export function SetupFoot({
<div className="ob-foot">
{onBack ? (
<Button
+ size="lg"
variant="ghost"
icon={backIcon ? 'left' : undefined}
onClick={onBack}
@@ -87,7 +88,7 @@ export function SetupFoot({
{backLabel ?? t('onboarding.action.back')}
</Button>
) : agentBack ? (
- <Button variant="ghost" icon="spark" onClick={agentBack} title={t('onboarding.frame.agentTitle')}>
+ <Button size="lg" variant="ghost" icon="spark" onClick={agentBack} title={t('onboarding.frame.agentTitle')}>
{t('onboarding.frame.agentBack')}
</Button>
) : (
@@ -97,6 +98,7 @@ export function SetupFoot({
{hint && <span className="ob2-hint">{hint}</span>}
{skipStep && (
<Button
+ size="lg"
variant="ghost"
onClick={skipStep}
disabled={busy}
@@ -108,6 +110,7 @@ export function SetupFoot({
{primary}
{onContinue && (
<Button
+ size="lg"
variant={variant}
shortcut={canContinue && !busy ? ['⏎'] : undefined}
disabled={!canContinue}
diff --git a/apps/web/src/onboarding/agent-setup.css b/apps/web/src/onboarding/agent-setup.css
index 3e7cc174..3424d3ca 100644
--- a/apps/web/src/onboarding/agent-setup.css
+++ b/apps/web/src/onboarding/agent-setup.css
@@ -189,14 +189,6 @@
font-weight: 600;
text-align: center;
}
-/* On the start page (inside .auth-card), the kit's input keeps its own frame, not the sign-in page's input style. */
-.auth-card .as-card .k-input input {
- height: auto;
- padding: 0;
- border: 0;
- background: transparent;
- box-shadow: none;
-}
/* The title and lede while the setup state is read (AgentSetup, rule 15): a bar in the h1's line, the lede's lines. */
.as-sk-h1 {
height: 22px;
diff --git a/apps/web/src/partner/PartnerInvite.tsx b/apps/web/src/partner/PartnerInvite.tsx
index 5e124d06..f267efa6 100644
--- a/apps/web/src/partner/PartnerInvite.tsx
+++ b/apps/web/src/partner/PartnerInvite.tsx
@@ -78,7 +78,7 @@ function Gone({ signedIn, onDone }: { signedIn: boolean; onDone: (joined: boolea
return (
<Card title={t('team.invite.invalid')} signedIn={signedIn}>
<p>{t('team.invite.askAgain')}</p>
- <Button variant="secondary" onClick={() => onDone(false)}>
+ <Button size="lg" variant="secondary" onClick={() => onDone(false)}>
{t('team.invite.continueTo', { brand: brandName() })}
</Button>
</Card>
@@ -203,7 +203,13 @@ function SignedInInvite({ token, onDone }: Props) {
{problemLine}
{view.state === 'open' && (
<>
- <Button variant="primary" busy={busy === 'join'} disabled={busy !== null} onClick={() => void join()}>
+ <Button
+ size="lg"
+ variant="primary"
+ busy={busy === 'join'}
+ disabled={busy !== null}
+ onClick={() => void join()}
+ >
{t('team.partner.invite.join')}
</Button>
{notNow}
@@ -211,7 +217,7 @@ function SignedInInvite({ token, onDone }: Props) {
)}
{view.state === 'member' && (
<>
- <Button variant="primary" onClick={() => onDone(true)}>
+ <Button size="lg" variant="primary" onClick={() => onDone(true)}>
{t('team.partner.invite.open')}
</Button>
{notNow}
@@ -220,6 +226,7 @@ function SignedInInvite({ token, onDone }: Props) {
{view.state === 'other_email' && (
<>
<Button
+ size="lg"
variant="primary"
busy={busy === 'signOut'}
disabled={busy !== null}
diff --git a/apps/web/src/settings/AgentChange.tsx b/apps/web/src/settings/AgentChange.tsx
index 51f5e27e..6e3f14b8 100644
--- a/apps/web/src/settings/AgentChange.tsx
+++ b/apps/web/src/settings/AgentChange.tsx
@@ -47,10 +47,12 @@ export function AiButton({
spark?: boolean
title: string
onClick: () => void
- size?: 'sm' | 'md'
+ size?: 'sm' | 'md' | 'lg'
className?: string
}) {
- const cls = ['k-btn', 'k-btn-secondary', size === 'sm' && 'k-btn-sm', 'ai-edit', className].filter(Boolean).join(' ')
+ const cls = ['k-btn', 'k-btn-secondary', size !== 'md' && `k-btn-${size}`, 'ai-edit', className]
+ .filter(Boolean)
+ .join(' ')
return (
<button type="button" className={cls} onClick={onClick} title={title} aria-label={label}>
<AgentMarks />
diff --git a/apps/web/src/styles.css b/apps/web/src/styles.css
index 7012941d..4242acf7 100644
--- a/apps/web/src/styles.css
+++ b/apps/web/src/styles.css
@@ -65,6 +65,7 @@ body { margin: 0; font-family: var(--font-sans); background: var(--bg); color: v
.k-btn-danger-outline { background: var(--surface); color: var(--danger); border-color: var(--danger); }
.k-btn-danger-outline:hover { background: var(--danger-soft); }
.k-btn-sm { height: var(--control-h-sm); padding: 0 10px; font-size: 12.5px; gap: 6px; }
+.k-btn-lg { height: var(--control-h-lg); padding: 0 16px; font-size: 14px; }
.k-btn-sm .k-kbd { height: 18px; min-width: 18px; }
.k-btn-icon { width: var(--control-h); padding: 0; justify-content: center; }
.k-btn-sm.k-btn-icon { width: var(--control-h-sm); }
@@ -76,6 +77,8 @@ body { margin: 0; font-family: var(--font-sans); background: var(--bg); color: v
.k-input input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: 13.5px; color: var(--ink); padding: 0; }
.k-input-sm { height: var(--control-h-sm); }
.k-input-sm input { font-size: 12.5px; }
+.k-input-lg { height: var(--control-h-lg); padding: 0 12px; }
+.k-input.k-input-lg input { font-size: 14px; }
.k-input input::placeholder, .k-composer-input::placeholder, .k-cmd-search input::placeholder { color: var(--ink-muted); opacity: 1; }
/* Badge */
@@ -862,7 +865,6 @@ body { font-size: 13px; }
step scrolls under it; the ⏎ hint only with a keyboard's fine pointer, never on a touch phone. */
.ob-foot { position: sticky; bottom: 0; z-index: 1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; margin: -12px 0; background: var(--bg); box-shadow: 0 -10px 10px -2px var(--bg); }
@media not ((hover: hover) and (pointer: fine)) { .ob-foot .k-kbds { display: none; } }
-.ob-foot .k-btn { height: var(--control-h-lg); padding: 0 16px; font-size: 13.5px; }
/* On a phone the long step count is out of sight only: screen readers still read it (the short one is aria-hidden). */
@media (max-width: 719px) { .ob h1 { font-size: 23px; line-height: 29px; } .ob-row { grid-template-columns: minmax(0, 1fr) auto; } .ob-s { display: none; } .ob-count { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } .ob-top > b { display: none; } .ob-top .ws-mark { margin-right: auto; } .ob-count-short { display: inline; } .ob-top .ob-agent .ai-marks { display: none; } .ob-top .ob-agent .ai-spark { display: inline-block; } .ob-agent { min-width: 0; } .ob-agent .ai-label { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ob-top .ob-exit-full { display: none; } .ob-top .ob-exit-short { display: inline-flex; } .ob-count.ob-count-label { position: static; width: auto; height: auto; overflow: visible; clip-path: none; display: inline; margin-left: 0; } }
@@ -1400,8 +1402,6 @@ mark { background: rgb(250 204 21 / 0.38); color: inherit; border-radius: 2px; p
/* ===== Onboarding v2 (adds to the existing .ob-* rules) ===== */
.ob2-grow { flex: 1; min-width: 0; }
.ob2-row { display: flex; gap: 8px; align-items: center; }
-.ob2-row .k-input { height: var(--control-h-lg); }
-.ob2-row .k-btn { height: var(--control-h-lg); padding: 0 14px; }
.ob2-note { margin: 0; font-size: 12px; line-height: 18px; color: var(--ink-muted); }
.ob2-hint { font-size: 12px; color: var(--ink-muted); }
.ob2-foot-r { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 12px; margin-left: auto; min-width: 0; }
@@ -1478,7 +1478,6 @@ mark { background: rgb(250 204 21 / 0.38); color: inherit; border-radius: 2px; p
@media (max-width: 719px) {
.ob2-row { flex-wrap: wrap; }
- .ob2-row .k-input { flex-basis: 100%; }
.ob2-cal-row { grid-template-columns: minmax(0, 1fr) 56px 44px; }
.ob2-cal-head { font-size: 10px; letter-spacing: 0; text-transform: none; }
.ob2-hint { display: none; }
diff --git a/apps/web/src/team/AcceptInvite.tsx b/apps/web/src/team/AcceptInvite.tsx
index e34678d9..2c22e265 100644
--- a/apps/web/src/team/AcceptInvite.tsx
+++ b/apps/web/src/team/AcceptInvite.tsx
@@ -22,7 +22,8 @@ import { previewInvitation } from './team-api.ts'
import { AuthError } from '../ui/AuthError.tsx'
import { ProviderButton } from '../ui/brand-logos.tsx'
import { SignedInAuthPage, WaitLine } from '../shell/SignedInAuthPage.tsx'
-import { cx, Spinner } from '../ui/kit.tsx'
+import { Input } from '../ui/form.tsx'
+import { Button } from '../ui/kit.tsx'
import { brandName } from '../brand.ts'
import { useT } from '@linedesk/i18n/react'
@@ -142,9 +143,9 @@ export function AcceptInvite({ invitationId, onDone }: { invitationId: string; o
links={methods.links}
>
<p>{t('team.invite.askAgain')}</p>
- <button type="button" className="k-btn k-btn-secondary" onClick={onDone}>
+ <Button size="lg" onClick={onDone}>
{t('team.invite.continueTo', { brand: brandName() })}
- </button>
+ </Button>
</Card>
)
}
@@ -191,11 +192,11 @@ export function AcceptInvite({ invitationId, onDone }: { invitationId: string; o
{lead}
<p>{t('team.invite.otherAccount', { current: account.email, invited: invite.email })}</p>
{errorLine}
- <button
- type="button"
- className={cx('k-btn k-btn-primary', busy === 'signOut' && 'is-busy')}
+ <Button
+ variant="primary"
+ size="lg"
+ busy={busy === 'signOut'}
disabled={busy !== null}
- aria-busy={busy === 'signOut' || undefined}
onClick={() =>
attempt('signOut', async () => {
await signOutAndForget()
@@ -203,9 +204,8 @@ export function AcceptInvite({ invitationId, onDone }: { invitationId: string; o
})
}
>
- {busy === 'signOut' && <Spinner />}
{t('team.invite.signOutContinue')}
- </button>
+ </Button>
<button type="button" className="auth-switch" onClick={onDone}>
{t('team.invite.notNow')}
</button>
@@ -230,11 +230,11 @@ export function AcceptInvite({ invitationId, onDone }: { invitationId: string; o
<Card title={title} links={methods.links}>
{lead}
{errorLine}
- <button
- type="button"
- className={cx('k-btn k-btn-primary', busy === 'join' && 'is-busy')}
+ <Button
+ variant="primary"
+ size="lg"
+ busy={busy === 'join'}
disabled={busy !== null}
- aria-busy={busy === 'join' || undefined}
onClick={() =>
attempt('join', async () => {
fail(await auth.organization.acceptInvitation({ invitationId }))
@@ -242,9 +242,8 @@ export function AcceptInvite({ invitationId, onDone }: { invitationId: string; o
})
}
>
- {busy === 'join' && <Spinner />}
{t('team.invite.join', { workspace: invite.workspaceName })}
- </button>
+ </Button>
<button type="button" className="auth-switch" onClick={onDone}>
{t('team.invite.notNow')}
</button>
@@ -307,18 +306,26 @@ export function InviteSignIn({
<h1>{title}</h1>
{lead}
{/* The account's name for password managers: the password below fills and saves for this address. */}
- <label>
+ <label htmlFor="invite-username">
{t('auth.email')}
- <input type="email" name="username" autoComplete="username" value={email} readOnly />
+ <Input
+ id="invite-username"
+ size="lg"
+ type="email"
+ name="username"
+ autoComplete="username"
+ value={email}
+ readOnly
+ />
</label>
{mode === 'choose' && (
<>
{methods.emailCode && (
- <button
- type="button"
- className={cx('k-btn k-btn-primary', busy === 'code' && 'is-busy')}
+ <Button
+ variant="primary"
+ size="lg"
+ busy={busy === 'code'}
disabled={busy !== null}
- aria-busy={busy === 'code' || undefined}
onClick={() =>
attempt('code', async () => {
fail(await requestSignInCode(email))
@@ -326,9 +333,8 @@ export function InviteSignIn({
})
}
>
- {busy === 'code' && <Spinner />}
{t('auth.signup.sendCode')}
- </button>
+ </Button>
)}
{/* Someone who already has an account with a passkey: in with it (another account's is caught below). */}
{methods.passkey && passkeySupported() && (
@@ -372,9 +378,11 @@ export function InviteSignIn({
)}
{mode !== 'choose' && (
<>
- <label>
+ <label htmlFor="invite-password">
{t('auth.method.password')}
- <input
+ <Input
+ id="invite-password"
+ size="lg"
required
type="password"
name="password"
@@ -385,15 +393,9 @@ export function InviteSignIn({
onChange={e => setForm(f => ({ ...f, password: e.target.value }))}
/>
</label>
- <button
- type="submit"
- className={cx('k-btn k-btn-primary', busy === 'password' && 'is-busy')}
- disabled={busy !== null}
- aria-busy={busy === 'password' || undefined}
- >
- {busy === 'password' && <Spinner />}
+ <Button type="submit" variant="primary" size="lg" busy={busy === 'password'} disabled={busy !== null}>
{t('auth.signIn')}
- </button>
+ </Button>
<button type="button" className="auth-switch" onClick={() => setMode('choose')}>
{t('team.invite.otherWays')}
</button>
diff --git a/apps/web/src/ui/brand-logos.tsx b/apps/web/src/ui/brand-logos.tsx
index 837c1267..3c4c08c3 100644
--- a/apps/web/src/ui/brand-logos.tsx
+++ b/apps/web/src/ui/brand-logos.tsx
@@ -132,7 +132,12 @@ type ProviderButtonProps = {
export function ProviderButton({ method, label, lastUsed, busy, busyText, disabled, onClick }: ProviderButtonProps) {
const t = useT()
return (
- <button type="button" className="k-btn k-btn-secondary auth-provider" disabled={disabled} onClick={onClick}>
+ <button
+ type="button"
+ className="k-btn k-btn-secondary k-btn-lg auth-provider"
+ disabled={disabled}
+ onClick={onClick}
+ >
<SignInMark method={method} />
<span className="auth-provider-label">
{busy
diff --git a/apps/web/src/ui/controlHeight.test.ts b/apps/web/src/ui/controlHeight.test.ts
index 0db38090..af8b27c7 100644
--- a/apps/web/src/ui/controlHeight.test.ts
+++ b/apps/web/src/ui/controlHeight.test.ts
@@ -22,8 +22,10 @@ test('controls take their height from the control tokens', () => {
expect(styles).toMatch(/--control-h-sm: 28px; --control-h: 32px; --control-h-lg: 36px;/)
expect(heightOf(styles, '.k-btn')).toBe('var(--control-h)')
expect(heightOf(styles, '.k-btn-sm')).toBe('var(--control-h-sm)')
+ expect(heightOf(styles, '.k-btn-lg')).toBe('var(--control-h-lg)')
expect(heightOf(styles, '.k-input')).toBe('var(--control-h)')
expect(heightOf(styles, '.k-input-sm')).toBe('var(--control-h-sm)')
+ expect(heightOf(styles, '.k-input-lg')).toBe('var(--control-h-lg)')
expect(heightOf(controls, '.k-select-btn')).toBe('var(--control-h)')
expect(heightOf(controls, '.k-select-sm .k-select-btn')).toBe('var(--control-h-sm)')
})
@@ -50,3 +52,15 @@ test('the More voices filter row is one height: the search is small like its sel
expect(tools).toMatch(/<Select[^>]*?size="sm"/s)
expect(tools).toMatch(/<Button\s+size="sm"/)
})
+
+test('the sign-in cards and onboarding take lg from Button and Input, not from CSS that forces it on every control', () => {
+ const styles = read('styles.css') + read('app.css')
+ for (const forced of [
+ '.auth-card .k-btn {',
+ '.auth-card input {',
+ '.ob-foot .k-btn {',
+ '.ob2-row .k-input {',
+ '.ob2-row .k-btn {',
+ ])
+ expect(heightOf(styles, forced.slice(0, -2)), forced).toBeUndefined()
+})
diff --git a/apps/web/src/ui/form.tsx b/apps/web/src/ui/form.tsx
index 88027e39..b532579d 100644
--- a/apps/web/src/ui/form.tsx
+++ b/apps/web/src/ui/form.tsx
@@ -127,8 +127,11 @@ type InputProps = Omit<ComponentProps<'input'>, 'size'> & {
/** Sits inside the frame at the left (a currency sign). */
start?: ReactNode
end?: ReactNode
- /** The control height (--control-h, --control-h-sm), the same scale as Select and Button: one size per row. */
- size?: 'sm' | 'md'
+ /**
+ * The control height (--control-h-sm, --control-h, --control-h-lg), the same scale as Select and Button: one size
+ * per row; lg only on onboarding and the sign-in cards.
+ */
+ size?: 'sm' | 'md' | 'lg'
}
/**
@@ -137,7 +140,7 @@ type InputProps = Omit<ComponentProps<'input'>, 'size'> & {
*/
export function Input({ invalid, start, end, size = 'md', className, ...rest }: InputProps) {
return (
- <span className={cx('k-input', size === 'sm' && 'k-input-sm', invalid && 'k-input-invalid', className)}>
+ <span className={cx('k-input', size !== 'md' && `k-input-${size}`, invalid && 'k-input-invalid', className)}>
{start}
<input aria-invalid={invalid || undefined} {...rest} />
{end}
diff --git a/apps/web/src/ui/kit.tsx b/apps/web/src/ui/kit.tsx
index 6c8970b1..ea802286 100644
--- a/apps/web/src/ui/kit.tsx
+++ b/apps/web/src/ui/kit.tsx
@@ -91,7 +91,8 @@ export function Kbd({ keys, className }: { keys: string[]; className?: string })
type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
/** `danger-outline`: a weighty step that destroys nothing (red text and border, no red fill). */
variant?: 'primary' | 'secondary' | 'ghost' | 'danger' | 'danger-outline'
- size?: 'sm' | 'md'
+ /** The control height (--control-h-sm, --control-h, --control-h-lg); lg only on onboarding and the sign-in cards. */
+ size?: 'sm' | 'md' | 'lg'
icon?: IconName
shortcut?: string[]
/** Working on it: a small spinner in place of the icon, the button disabled, no shortcut shown. */
diff --git a/apps/web/src/ui/loadingStandard.test.ts b/apps/web/src/ui/loadingStandard.test.ts
index 69de74a0..0453a1b9 100644
--- a/apps/web/src/ui/loadingStandard.test.ts
+++ b/apps/web/src/ui/loadingStandard.test.ts
@@ -36,23 +36,14 @@ const SPINNERS: Record<string, number> = {
// The cards before setup (sign-in, sign-up, invitations) wait for the server's first answer, like the boot screen:
// their one wait line (WaitLine), never a skeleton of data (onboarding harmony audit T1, 2026-11-18).
'shell/SignedInAuthPage.tsx': 1,
- // Send code, passkey, password Sign in, the code's Continue, the reset's two buttons, the first admin's Set up.
- 'Login.tsx': 7,
- // Sign out and continue, Join, Send code, password Sign in.
- 'team/AcceptInvite.tsx': 4,
- 'AddPasskey.tsx': 1,
- 'SignInLink.tsx': 1,
- 'CreateWorkspace.tsx': 1,
- // Send code, Continue, Continue to payment: each the button pressed.
- 'Signup.tsx': 3,
- 'admin/SecondFactorPrompt.tsx': 4,
+ // Send code and the passkey: their own three-column layout (mark, label, Last used), so not the kit's Button. Every
+ // other button on the sign-in and sign-up cards is Button busy (ui/kit.tsx).
+ 'Login.tsx': 2,
// "Waiting for your agent" under the link's steps: the page watching for the agent, a running line like the mail
// review's, not page data (LIN-762).
'onboarding/AgentSetup.tsx': 1,
// The mail review the owner started runs for minutes in the background: its running line, not page data (LIN-643).
'integrations/MailReview.tsx': 1,
- // On the page Checkout returns to: Continue, and Start plan (or Back to the last step).
- 'CheckoutReturn.tsx': 2,
}
test('spinners only in buttons the user pressed, never for page data', () => {
diff --git a/docs/design-principles.md b/docs/design-principles.md
index 5492fba4..0e5f96f1 100644
--- a/docs/design-principles.md
+++ b/docs/design-principles.md
@@ -59,7 +59,7 @@ Every screen is built from one set of pieces in `ui/`: Server admin and the sett
## Control heights
-Text fields, selects and buttons take their height from three tokens (styles.css), never their own: sm (28px): compact rows where every control is small (card headers, list rows, toolbars); default (32px): everything else; lg (36px): onboarding and sign-in. Controls in one row share one size.
+Text fields, selects and buttons take their height from three tokens (styles.css), never their own: sm (28px): compact rows where every control is small (card headers, list rows, toolbars); default (32px): everything else; lg (36px): onboarding and sign-in. Controls in one row share one size. The size is the control's own `size` prop (`Button` and `Input`: `sm`, `md`, `lg`; `Select`: `sm`, `md`), never CSS that forces a height on every control inside a container (the sign-in cards and onboarding's footer used to).
## Messages: one look per kind