goobs-frontend
Version:
A comprehensive React-based libary for building modern web applications
41 lines • 1.97 kB
TypeScript
import { default as React } from 'react';
import { FieldStyleOverrides } from '../../Shell';
export interface RoutingNumberProps {
/** Fires on every edit with the digits-only routing-number string. */
onChange?: (value: string) => void;
/** Optional side-channel for validity changes (ABA checksum + length). */
onValidityChange?: (isValid: boolean) => void;
/** Validates the ABA checksum in addition to the 9-digit length (default true). */
useChecksum?: boolean;
/** Marks the value as prefilled: it renders masked until the field is focused or edited. */
isDefaultValue?: boolean;
/** Controlled value. Omit inside a `<Form>` with `name` to let the engine drive it. */
value?: string;
/** Field label (default 'Routing Number'). */
label?: React.ReactNode;
placeholder?: string;
id?: string;
/** Forwarded to the input as `name` for native form submission. */
name?: string;
onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
helperText?: string;
/** Error message rendered below the input; sets aria-invalid. */
error?: string | boolean;
/** Stable test selector — emitted as `data-field` on the wrapper. */
dataField?: string;
/** Stable test selector — emitted as `data-field-name` on the wrapper. */
dataFieldName?: string;
styles?: FieldStyleOverrides;
}
/**
* ABA routing-number input built on FieldShell (9 digits). `onChange` emits
* the digits-only string — not a DOM event — and `onValidityChange` reports
* the 9-digit length plus, when `useChecksum` is on, the ABA checksum. With
* `isDefaultValue`, a prefilled number renders masked until focused or
* edited. Auto-binds by `name` inside a goobs `<Form>` when no explicit
* `value` is passed.
*/
declare const RoutingNumber: React.FC<RoutingNumberProps>;
export default RoutingNumber;
//# sourceMappingURL=index.d.ts.map