import { type TextInput as RNTextInput } from "react-native"; import { type LayoutStyle, type MeasureProps } from "../../style/index.js"; import { type TextEntryProps } from "../../atoms/input/input.shared.js"; import { type PhoneCountry } from "./countries.js"; import { type PhoneInputSkin, type Size } from "./phone-input.styles.js"; /** The subset of the Input's text-entry passthrough that makes sense for a phone number. */ export type PhoneEntryProps = Pick; export interface PhoneInputProps extends PhoneEntryProps, MeasureProps { /** The national number typed so far (controlled). Omit and use `defaultValue` for uncontrolled use. */ value?: string; /** Called with the new number on each keystroke. */ onChangeText?: (text: string) => void; /** * The countries the segment offers, in the order shown. Defaults to the kit's * curated `PHONE_COUNTRIES` list; pass a full, localized, or reordered list. */ countries?: readonly PhoneCountry[]; /** The selected country's ISO alpha-2 code (controlled). Omit and use `defaultCountry`. */ country?: string; /** Initial country code for uncontrolled use. Defaults to "US" when the list has it, else the first row. */ defaultCountry?: string; /** Called with the chosen country's code when a row is picked (both modes). */ onCountryChange?: (code: string) => void; /** Placeholder shown while the number is empty. */ placeholder?: string; /** * The field's persistent label, rendered above the box on every platform (a * grouped field never floats its label). It is the number field's programmatic * name, and Field delegates its label into it. */ label?: string; /** * Marks the field as required: a destructive "*" after the label (decorative, never in * the accessible name), and the number field announced as required, * * through * aria-required on the web and with the word in its name ("Phone number, required") on * iOS and Android. * * * with the word in its name ("Phone number, required"). * */ required?: boolean; error?: boolean; invalid?: boolean; disabled?: boolean; /** Read-only: shows the number but blocks editing and the country list. */ readOnly?: boolean; small?: boolean; large?: boolean; /** Accessible name for the number field when there is no `label`. */ accessibilityLabel?: string; /** ID of the helper/error text that describes the field (its `nativeID`). */ "aria-describedby"?: string; /** Composition within a parent only, never a restyle hook and never a width: the parent layout container provides the bounds. */ style?: LayoutStyle; } export declare function sizeOf(p: PhoneInputProps): Size; /** Build a PhoneInput component from a platform skin. */ export declare function createPhoneInput(skin: PhoneInputSkin): import("react").ForwardRefExoticComponent>; //# sourceMappingURL=phone-input.shared.d.ts.map