@mitcsutt/kiln-forms
Version:
Kiln forms: typed React forms on TanStack Form, in component or JSON schema mode, rendered through kiln-ui
30 lines (29 loc) • 1.1 kB
TypeScript
import { type PasswordFieldProps as UiPasswordFieldProps } from '@mitcsutt/kiln-ui';
import type { ControlledKeys } from '../internal/controlledKeys.js';
import { type CommonFieldProps } from '../../../hooks/useFieldBinding.js';
export interface FormPasswordFieldProps extends Omit<UiPasswordFieldProps, ControlledKeys>, CommonFieldProps<string> {
}
/**
* A password field with a show and hide toggle, bound to a `string` path.
*
* @remarks
* It renders kiln-ui's {@link PasswordField | PasswordField}.
*
* @example In a schema
* ```json
* {
* "kind": "password",
* "name": "password",
* "label": "Password",
* "autoComplete": "new-password"
* }
* ```
*
* @value `string`
* @empty `''`
*
* @privateRemarks
* A password field bound to a `string` path (§7.2 `password`). Empty is `''`. View mode never
* shows the password text — a fixed-length mask, so the view doesn't leak its length either.
*/
export declare const FormPasswordField: import("../../../kit/contracts.js").FieldDef<import("../../../kit/contracts.js").ExactContract<string>, FormPasswordFieldProps>;