goobs-frontend
Version:
A comprehensive React-based libary for building modern web applications
38 lines • 1.63 kB
TypeScript
import { default as React } from 'react';
import { FieldStyleOverrides } from '../Shell';
export interface PasswordFieldProps {
/** Field label (default 'Password'). */
label?: string;
placeholder?: string;
/** Controlled value. Omit inside a `<Form>` with `name` to let the engine drive it. */
value?: string;
/**
* Canonical value-shape onChange. Receives the raw input string —
* consumers wire this directly into setState without unwrapping a
* synthetic event.
*/
onChange?: (value: string) => void;
onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
helperText?: string;
/** Error message rendered below the input; sets aria-invalid. */
error?: string | boolean;
id?: string;
/** 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;
/** Forwarded to the input as `name` for native form submission. */
name?: string;
/** Per-instance style overrides. */
styles?: FieldStyleOverrides;
}
/**
* Password input built on FieldShell with a show/hide eye toggle overlaid on
* the input. `onChange` emits the plain string value — not a DOM event.
* Auto-binds its value by `name` inside a goobs `<Form>` when no explicit
* `value` is passed; otherwise it is a controlled input.
*/
declare const PasswordField: React.FC<PasswordFieldProps>;
export default PasswordField;
//# sourceMappingURL=index.d.ts.map