import 'rollup-plugin-inject-process-env'; import { FormTextInput } from "stentor-models"; /** * The HTML input helper attributes we derive for a form field. * * These are what give mobile users the right keyboard and let iOS/Android * AutoFill offer the right saved value - neither happens without explicit tokens. */ export interface InputHelperProps { /** * The real HTML input type. Note this is NOT FormInput.type, which is the * widget discriminator ("TEXT" | "DROPDOWN" | ...) and is not a valid input type. */ readonly type: "text" | "tel" | "email"; readonly inputMode: "text" | "tel" | "email" | "numeric"; /** * Left off entirely when we cannot confidently pick a token - a wrong * autocomplete is worse than none. */ readonly autoComplete?: string; readonly enterKeyHint: "next" | "done"; } export interface FormatToInputPropsRequest { readonly format?: FormTextInput["format"]; readonly name?: string; /** * When true the keyboard shows "done" rather than "next". */ readonly isLastField?: boolean; } /** * Derive the mobile input helper attributes for a text field. * * `field.format` carries the real semantics ("PHONE", "ZIP_CODE", ...); when it * is unset we fall back to plain text and only infer autoComplete from the field * name where that is unambiguous. */ export declare function formatToInputProps(request: FormatToInputPropsRequest): InputHelperProps; export default formatToInputProps;