import * as React from "react"; import { cn } from "@/lib/utils"; /** * Base input primitive. * * v1.4 hardening: defaults `autoComplete` to `"off"` and tells * LastPass / 1Password to skip the field when the caller does not * opt in to a semantic autocomplete value. HealthLog is a health-data * app — letting browsers / password managers autofill measurement, * medication, mood, and AI-token inputs with the user's last-saved * email or account password is at best confusing and at worst leaks * credentials into a free-text field that gets persisted server-side. * * Auth and profile forms (login, register, change-email) keep working * because they already pass an explicit `autoComplete` value — * `"username"`, `"email"`, `"current-password"`, `"new-password"`. When * `autoComplete` is anything other than `"off"`, the LastPass / * 1Password ignore attrs are dropped so password managers fill the * field normally. */ function Input({ className, type, autoComplete, ...props }: React.ComponentProps<"input">) { const resolvedAutoComplete = autoComplete ?? "off"; const skipAutofill = resolvedAutoComplete === "off"; return ( ); } export { Input };