@theredhead — Frontend Library - v1.0.0
    Preparing search index...

    Adapter for password fields.

    Sets the native input type to "password" and provides a suffix eye icon that toggles visibility when clicked. Validates that the password meets minimum strength requirements.

    readonly adapter = new PasswordTextAdapter();
    

    Implements

    Index

    Constructors

    Properties

    prefixIcon: "<circle cx=\"12\" cy=\"16\" r=\"1\" /><rect x=\"3\" y=\"10\" width=\"18\" height=\"12\" rx=\"2\" /><path d=\"M7 10V7a5 5 0 0 1 10 0v3\" />" = UIIcons.Lucide.Security.LockKeyhole

    Optional SVG icon content to display before the input.

    Should be a Lucide SVG inner-content string (e.g. UIIcons.Lucide.Text.AtSign).

    Accessors

    • get inputType(): string

      Optional HTML input type attribute value.

      When set, this overrides the type input on UIInput so the adapter can request the semantically correct native input type (e.g. "email", "tel", "url").

      Returns string

    • get suffixIcon(): string

      Optional SVG icon content to display after the input.

      Returns string

    Methods

    • Called when the user clicks the suffix icon.

      Parameters

      • _text: string

      Returns void

    • Transform the raw text into the adapted value.

      Called on every input event. The result is stored in the value model and written back to the native input element, so the user sees the adapted text. The original keystrokes are preserved in the text model.

      Parameters

      • text: string

        Raw text from the input element.

      Returns string

      Adapted value string (displayed in the field and emitted via value).

    • Validate the raw text and return a result indicating whether the current input is valid.

      When present, UIInput exposes a valid signal and applies the invalid host class when validation fails.

      Parameters

      • text: string

        Raw text from the input element.

      Returns TextAdapterValidationResult

      Validation result with valid flag and error messages.