From 836ae959400827ee856f6e6531f7fe31b6ae364c Mon Sep 17 00:00:00 2001 From: chenhang Date: Tue, 14 Jul 2026 19:06:47 +0800 Subject: [PATCH] refactor: canonicalize TypeScript and Tailwind syntax --- src/app/_components/back-button.tsx | 4 ++-- src/app/_components/core/checkbox.tsx | 4 ++-- .../payment/stripe-payment-dialog.styles.ts | 8 ++++---- .../auth/components/auth-other-options-dialog.tsx | 2 +- src/app/chat/chat-screen.tsx | 2 +- .../__tests__/tailwind-components.test.tsx | 4 ++-- src/app/chat/components/browser-hint-overlay.tsx | 10 +++++----- src/app/chat/components/chat-header.tsx | 4 ++-- src/app/chat/components/chat-input-text-field.tsx | 2 +- src/app/chat/components/history-unlock-dialog.tsx | 10 +++++----- src/app/chat/components/image-bubble.tsx | 2 +- .../components/insufficient-credits-dialog.tsx | 10 +++++----- src/app/chat/components/pwa-install-dialog.tsx | 10 +++++----- src/app/chat/components/text-bubble.tsx | 2 +- src/app/sidebar/components/user-header.tsx | 14 +++++++------- src/app/splash/components/splash-button.tsx | 2 +- .../components/subscription-cta-button.tsx | 2 +- .../components/subscription-payment-method.tsx | 8 ++++---- .../subscription-payment-success-dialog.tsx | 6 +++--- .../services/api/__tests__/http_client.test.ts | 2 +- src/lib/navigation/external_entry.ts | 2 +- src/stores/chat/chat-message-mappers.ts | 4 ++-- .../payment/__tests__/payment-machine.test.ts | 2 +- 23 files changed, 58 insertions(+), 58 deletions(-) diff --git a/src/app/_components/back-button.tsx b/src/app/_components/back-button.tsx index de608b3b..520c05e8 100644 --- a/src/app/_components/back-button.tsx +++ b/src/app/_components/back-button.tsx @@ -24,11 +24,11 @@ type BackButtonActionProps = BackButtonBaseProps & { export type BackButtonProps = BackButtonLinkProps | BackButtonActionProps; const BASE_CLASS_NAME = - "inline-flex cursor-pointer items-center justify-center rounded-full border-0 p-0 text-(--color-auth-text-primary) no-underline transition-[background,box-shadow,transform] duration-150 ease-out focus-visible:outline-2 focus-visible:outline-offset-3 focus-visible:outline-[#f657a0]"; + "inline-flex cursor-pointer items-center justify-center rounded-full border-0 p-0 text-auth-text-primary no-underline transition-[background,box-shadow,transform] duration-150 ease-out focus-visible:outline-2 focus-visible:outline-offset-3 focus-visible:outline-[#f657a0]"; const VARIANT_CLASS_NAMES = { floating: - "absolute left-[calc(var(--spacing-xl,20px)+var(--app-safe-left,0px))] top-[calc(var(--spacing-xl,20px)+var(--app-safe-top,0px))] z-2 size-(--back-button-size) bg-(--color-auth-surface) pr-[2px] shadow-[0_2px_8px_rgba(0,0,0,0.1)] hover:bg-[rgba(0,0,0,0.04)] active:scale-96", + "absolute left-[calc(var(--spacing-xl,20px)+var(--app-safe-left,0))] top-[calc(var(--spacing-xl,20px)+var(--app-safe-top,0))] z-2 size-(--back-button-size) bg-(--color-auth-surface) pr-0.5 shadow-[0_2px_8px_rgba(0,0,0,0.1)] hover:bg-[rgba(0,0,0,0.04)] active:scale-96", soft: "size-(--responsive-icon-button-size,42px) border border-[rgba(25,19,22,0.08)] bg-[rgba(255,255,255,0.82)] text-[#21191d] shadow-[0_10px_22px_rgba(50,30,40,0.08)] hover:-translate-y-px hover:bg-white hover:shadow-[0_14px_26px_rgba(50,30,40,0.12)] active:translate-y-px", ghost: diff --git a/src/app/_components/core/checkbox.tsx b/src/app/_components/core/checkbox.tsx index b106e652..27f77482 100644 --- a/src/app/_components/core/checkbox.tsx +++ b/src/app/_components/core/checkbox.tsx @@ -29,7 +29,7 @@ export function Checkbox({ ariaLabel, }: CheckboxProps) { const checkboxClassName = [ - "mt-0.5 inline-flex size-(--auth-legal-checkbox-size) shrink-0 cursor-pointer items-center justify-center rounded-full border border-(--color-auth-surface) bg-(--color-auth-surface) p-0 shadow-[0_0_0_1px_rgba(0,0,0,0.06)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--color-accent) disabled:cursor-not-allowed disabled:opacity-50", + "mt-0.5 inline-flex size-(--auth-legal-checkbox-size) shrink-0 cursor-pointer items-center justify-center rounded-full border border-(--color-auth-surface) bg-(--color-auth-surface) p-0 shadow-[0_0_0_1px_rgba(0,0,0,0.06)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent disabled:cursor-not-allowed disabled:opacity-50", ].join(" "); const button = (