/** One entry in the `countries` select; `dial_code` prefixes the number on change. */ export type CountryOption = { country_id: string | number; code: string; country: string; dial_code: string; }; /** The number field stays isDisabled until a country is chosen (via the select or the country prop) — with neither, typing silently does nothing. */ export type PhoneNumberInputProps = { label?: string; /** Falls back to an auto-generated id (shared with `inputId` when that's omitted too), so the label is always bound. */ id?: string; /** Control-scale height: xs 32 · sm 38 · md 40 · lg 48px. Defaults to "sm", like TextInput, so it lines up in a form. */ size?: string; /** The number shown in the field; a later change to it updates the field. A leading dial code (the `onChange` shape) is stripped, so echoing `onChange` back is safe. */ value?: string; codeValueReturn?: boolean; country?: string; placeholder?: string; onChange: (value: string) => void; countries: CountryOption[]; /** The number ``'s id; the label binds to this when given, else to `id`, else to an auto-generated id. */ inputId?: string; selectId?: string; name?: string; error?: boolean; errorMessage?: string; helperText?: string; isInformation?: boolean; informationMessage?: string; isRequired?: boolean; onBlur?: () => void; onFocus?: () => void; isReadOnly?: boolean; autoComplete?: string; height?: string; width?: string; minW?: string; maxW?: string; showCountrySelect?: boolean; /** Accessible name for the country-code select; defaults to "Country code". */ countrySelectAriaLabel?: string; };