diff --git a/src/components/admin/general-settings-section.tsx b/src/components/admin/general-settings-section.tsx index 686e961c9..14e5236b3 100644 --- a/src/components/admin/general-settings-section.tsx +++ b/src/components/admin/general-settings-section.tsx @@ -3,11 +3,16 @@ import { useMemo } from "react"; import { Settings } from "lucide-react"; import { useTranslations } from "@/lib/i18n/context"; +import { NativeSelect } from "@/components/ui/native-select"; import { SettingsToggle, useAdminSettings, useUpdateSettings } from "./_shared"; import { listSupportedTimezones } from "@/lib/tz/format"; -const NATIVE_SELECT_CLASS = - "border-input bg-background text-foreground ring-offset-background focus-visible:ring-ring flex h-9 rounded-md border px-3 py-1 text-sm shadow-xs transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-none"; +// v1.4.27 MB7 / CF-52 — the in-file `NATIVE_SELECT_CLASS` constant +// retired; the shared `` primitive owns the visual +// contract now. The admin copy previously diverged on the +// `focus-visible:ring-[3px]` weight; the shared primitive pins +// `focus-visible:ring-2` so admin selects match the rest of the form +// surface. export function GeneralSettingsSection() { const { t } = useTranslations(); @@ -43,17 +48,17 @@ export function GeneralSettingsSection() { {t("admin.defaultLanguageDescription")}

- +
{/* v1.4.25 W7 — server-wide default timezone for new @@ -69,13 +74,13 @@ export function GeneralSettingsSection() { {t("admin.defaultUserTimezoneDescription")}

- + diff --git a/src/components/settings/account-section.tsx b/src/components/settings/account-section.tsx index 9a1424d46..c40e98410 100644 --- a/src/components/settings/account-section.tsx +++ b/src/components/settings/account-section.tsx @@ -37,6 +37,7 @@ import { import { Input } from "@/components/ui/input"; import { DateInput } from "@/components/ui/date-input"; import { Label } from "@/components/ui/label"; +import { NativeSelect } from "@/components/ui/native-select"; import { PasswordInput } from "@/components/ui/password-input"; import { useAuth } from "@/hooks/use-auth"; import { formatDate } from "@/lib/format"; @@ -53,15 +54,10 @@ interface PasskeyInfo { createdAt: string; } -/** - * Shared class string for native `` and shadcn - * `` (`h-9`, identical border/focus tokens) so gender, - * language, and any future native dropdown render at the same height - * and width as every other input in the form. - */ -const NATIVE_SELECT_CLASS = - "border-input bg-background text-foreground ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex h-9 w-full rounded-md border px-3 py-1 text-sm focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none"; +// v1.4.27 MB7 / CF-52 — the in-file `NATIVE_SELECT_CLASS` constant +// retired; the shared `` primitive owns the visual +// contract now. Existing ` setGender(e.target.value)} - className={NATIVE_SELECT_CLASS} > - +

{t("settings.genderHint")}

@@ -432,18 +427,17 @@ export function AccountSection() {
- +

{t("settings.languageDescription")}

diff --git a/src/components/settings/timezone-picker.tsx b/src/components/settings/timezone-picker.tsx index 423095706..f26157d9c 100644 --- a/src/components/settings/timezone-picker.tsx +++ b/src/components/settings/timezone-picker.tsx @@ -21,14 +21,17 @@ import { Compass } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; +import { NativeSelect } from "@/components/ui/native-select"; import { detectBrowserTimezone, listSupportedTimezones, } from "@/lib/tz/format"; import { useTranslations } from "@/lib/i18n/context"; -const NATIVE_SELECT_CLASS = - "border-input bg-background text-foreground ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex h-9 w-full rounded-md border px-3 py-1 text-sm focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none"; +// v1.4.27 MB7 / CF-52 — the in-file `NATIVE_SELECT_CLASS` constant +// retired; the shared `` primitive owns the visual +// contract now. The `sm:max-w-sm` modifier still composes via the +// `className` prop below so the picker keeps its narrow desktop width. export interface TimezonePickerProps { /** The user's current stored timezone. */ @@ -89,11 +92,11 @@ export function TimezonePicker({
- +