import { PasswordPassThrough, PasswordIconTemplateContext } from 'primeng/types/password'; export * from 'primeng/types/password'; import * as i0 from '@angular/core'; import { NgZone, PipeTransform, EventEmitter, ElementRef, TemplateRef, QueryList } from '@angular/core'; import { MotionOptions } from '@primeuix/motion'; import * as i2 from 'primeng/api'; import { OverlayOptions, PrimeTemplate, OverlayService } from 'primeng/api'; import { BaseEditableHolder } from 'primeng/baseeditableholder'; import { BaseInput } from 'primeng/baseinput'; import * as i1 from 'primeng/bind'; import { Bind } from 'primeng/bind'; import { ConnectedOverlayScrollHandler } from 'primeng/dom'; import { Fluid } from 'primeng/fluid'; import { Overlay } from 'primeng/overlay'; import { Nullable, VoidListener } from 'primeng/ts-helpers'; import { Subscription } from 'rxjs'; import { BaseStyle } from 'primeng/base'; /** * * Password displays strength indicator for password fields. * * [Live Demo](https://www.primeng.org/password/) * * @module passwordstyle * */ declare enum PasswordClasses { /** * Class name of the root element */ root = "p-password", /** * Class name of the pt input element */ pcInputText = "p-password-input", /** * Class name of the mask icon element */ maskIcon = "p-password-mask-icon", /** * Class name of the unmask icon element */ unmaskIcon = "p-password-unmask-icon", /** * Class name of the overlay element */ overlay = "p-password-overlay", /** * Class name of the meter element */ meter = "p-password-meter", /** * Class name of the meter label element */ meterLabel = "p-password-meter-label", /** * Class name of the meter text element */ meterText = "p-password-meter-text", /** * Class name of the clear icon */ clearIcon = "p-password-clear-icon" } declare class PasswordStyle extends BaseStyle { name: string; style: string; classes: { root: ({ instance }: { instance: any; }) => (string | { 'p-inputwrapper-filled': any; 'p-variant-filled': boolean; 'p-inputwrapper-focus': any; 'p-password-fluid': any; })[]; rootDirective: ({ instance }: { instance: any; }) => (string | { 'p-inputwrapper-filled': any; 'p-variant-filled': boolean; 'p-password-fluid-directive': any; })[]; pcInputText: string; maskIcon: string; unmaskIcon: string; overlay: string; content: string; meter: string; meterLabel: ({ instance }: { instance: any; }) => string; meterText: string; clearIcon: string; }; inlineStyles: { root: ({ instance }: { instance: any; }) => { position: string | undefined; }; overlay: { position: string; }; }; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } interface PasswordStyle extends BaseStyle { } type Meter = { strength: string; width: string; }; /** * Password directive. * @group Components */ declare class PasswordDirective extends BaseEditableHolder { zone: NgZone; bindDirectiveInstance: Bind; $pcPasswordDirective: PasswordDirective | undefined; /** * Used to pass attributes to DOM elements inside the Password component. * @defaultValue undefined * @group Props */ pPasswordPT: i0.InputSignal; /** * Indicates whether the component should be rendered without styles. * @defaultValue undefined * @group Props */ pPasswordUnstyled: i0.InputSignal; onAfterViewChecked(): void; /** * Text to prompt password entry. Defaults to PrimeNG I18N API configuration. * @group Props */ promptLabel: string; /** * Text for a weak password. Defaults to PrimeNG I18N API configuration. * @group Props */ weakLabel: string; /** * Text for a medium password. Defaults to PrimeNG I18N API configuration. * @group Props */ mediumLabel: string; /** * Text for a strong password. Defaults to PrimeNG I18N API configuration. * @group Props */ strongLabel: string; /** * Whether to show the strength indicator or not. * @group Props */ feedback: boolean; /** * Sets the visibility of the password field. * @defaultValue false * @type boolean * @group Props */ set showPassword(show: boolean); /** * Specifies the input variant of the component. * @defaultValue 'outlined' * @group Props */ variant: i0.InputSignal<"filled" | "outlined" | undefined>; /** * Spans 100% width of the container when enabled. * @defaultValue false * @group Props */ fluid: i0.InputSignalWithTransform; /** * Specifies the size of the component. * @defaultValue undefined * @group Props */ size: i0.InputSignal<"large" | "small" | undefined>; pcFluid: Fluid | null; $variant: i0.Signal<"filled" | "outlined" | null>; get hasFluid(): boolean; panel: Nullable; meter: Nullable; info: Nullable; filled: Nullable; content: Nullable; label: Nullable; scrollHandler: Nullable; documentResizeListener: VoidListener; _componentStyle: PasswordStyle; constructor(zone: NgZone); onInput(e: Event): void; createPanel(): void; showOverlay(): void; hideOverlay(): void; onFocus(): void; onBlur(): void; labelSignal: i0.WritableSignal; onKeyup(e: Event): void; updateMeter(): void; getWidth(label: string): "" | "33.33%" | "66.66%" | "100%"; strengthClass(label: any): string; testStrength(str: string): number; normalize(x: number, y: number): number; bindScrollListener(): void; unbindScrollListener(): void; bindDocumentResizeListener(): void; unbindDocumentResizeListener(): void; onWindowResize(): void; onDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; static ngAcceptInputType_feedback: unknown; } type Mapper = (item: T, ...args: any[]) => G; declare class MapperPipe implements PipeTransform { transform(value: T, mapper: Mapper, ...args: unknown[]): G; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } declare const Password_VALUE_ACCESSOR: any; /** * Password displays strength indicator for password fields. * @group Components */ declare class Password extends BaseInput { bindDirectiveInstance: Bind; $pcPassword: Password | undefined; onAfterViewChecked(): void; /** * Defines a string that labels the input for accessibility. * @group Props */ ariaLabel: string | undefined; /** * Specifies one or more IDs in the DOM that labels the input field. * @group Props */ ariaLabelledBy: string | undefined; /** * Label of the input for accessibility. * @group Props */ label: string | undefined; /** * Text to prompt password entry. Defaults to PrimeNG I18N API configuration. * @group Props */ promptLabel: string | undefined; /** * Regex value for medium regex. * @group Props */ mediumRegex: string; /** * Regex value for strong regex. * @group Props */ strongRegex: string; /** * Text for a weak password. Defaults to PrimeNG I18N API configuration. * @group Props */ weakLabel: string | undefined; /** * Text for a medium password. Defaults to PrimeNG I18N API configuration. * @group Props */ mediumLabel: string | undefined; /** * specifies the maximum number of characters allowed in the input element. * @deprecated since v20.0.0, use maxlength instead. * @group Props */ maxLength: number | undefined; /** * Text for a strong password. Defaults to PrimeNG I18N API configuration. * @group Props */ strongLabel: string | undefined; /** * Identifier of the accessible input element. * @group Props */ inputId: string | undefined; /** * Whether to show the strength indicator or not. * @group Props */ feedback: boolean; /** * Whether to show an icon to display the password as plain text. * @group Props */ toggleMask: boolean | undefined; /** * Style class of the input field. * @group Props */ inputStyleClass: string | undefined; /** * Style class of the element. * @deprecated since v20.0.0, use `class` instead. * @group Props */ styleClass: string | undefined; /** * Inline style of the input field. * @group Props */ inputStyle: { [klass: string]: any; } | null | undefined; /** * Transition options of the show animation. * @group Props * @deprecated since v21.0.0, use `motionOptions` instead. */ showTransitionOptions: string; /** * Transition options of the hide animation. * @group Props * @deprecated since v21.0.0, use `motionOptions` instead. */ hideTransitionOptions: string; /** * Specify automated assistance in filling out password by browser. * @group Props */ autocomplete: string | undefined; /** * Advisory information to display on input. * @group Props */ placeholder: string | undefined; /** * When enabled, a clear icon is displayed to clear the value. * @group Props */ showClear: boolean; /** * When present, it specifies that the component should automatically get focus on load. * @group Props */ autofocus: boolean | undefined; /** * Index of the element in tabbing order. * @group Props */ tabindex?: number; /** * Target element to attach the overlay, valid values are "body" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]="mydiv" for a div element having #mydiv as variable name). * @defaultValue 'self' * @group Props */ appendTo: i0.InputSignal; /** * The motion options. * @group Props */ motionOptions: i0.InputSignal; /** * Whether to use overlay API feature. The properties of overlay API can be used like an object in it. * @group Props */ overlayOptions: OverlayOptions | undefined; /** * Callback to invoke when the component receives focus. * @param {Event} event - Browser event. * @group Emits */ onFocus: EventEmitter; /** * Callback to invoke when the component loses focus. * @param {Event} event - Browser event. * @group Emits */ onBlur: EventEmitter; /** * Callback to invoke when clear button is clicked. * @group Emits */ onClear: EventEmitter; overlayViewChild: Overlay; input: ElementRef; /** * Custom template of content. * @group Templates */ contentTemplate: Nullable>; /** * Custom template of footer. * @group Templates */ footerTemplate: Nullable>; /** * Custom template of header. * @group Templates */ headerTemplate: Nullable>; /** * Custom template of clear icon. * @group Templates */ clearIconTemplate: Nullable>; /** * Custom template of hide icon. * @param {PasswordIconTemplateContext} context - icon context. * @see {@link PasswordIconTemplateContext} * @group Templates */ hideIconTemplate: Nullable>; /** * Custom template of show icon. * @param {PasswordIconTemplateContext} context - icon context. * @see {@link PasswordIconTemplateContext} * @group Templates */ showIconTemplate: Nullable>; templates: QueryList; $appendTo: i0.Signal; _contentTemplate: TemplateRef | undefined; _footerTemplate: TemplateRef | undefined; _headerTemplate: TemplateRef | undefined; _clearIconTemplate: TemplateRef | undefined; _hideIconTemplate: TemplateRef | undefined; _showIconTemplate: TemplateRef | undefined; overlayVisible: boolean; meter: Nullable; infoText: Nullable; focused: boolean; unmasked: boolean; mediumCheckRegExp: RegExp; strongCheckRegExp: RegExp; resizeListener: VoidListener; scrollHandler: Nullable; value: Nullable; translationSubscription: Nullable; _componentStyle: PasswordStyle; overlayService: OverlayService; onInit(): void; onAfterContentInit(): void; onInput(event: Event): void; onInputFocus(event: Event): void; onInputBlur(event: Event): void; onKeyUp(event: KeyboardEvent): void; updateUI(value: string): void; onMaskToggle(): void; onOverlayClick(event: Event): void; testStrength(str: string): number; promptText(): any; weakText(): any; mediumText(): any; strongText(): any; inputType(unmasked: boolean): "password" | "text"; getTranslation(option: string): any; clear(): void; /** * @override * * @see {@link BaseEditableHolder.writeControlValue} * Writes the value to the control. */ writeControlValue(value: any, setModelValue: (value: any) => void): void; onDestroy(): void; get containerDataP(): string | undefined; get meterDataP(): string | undefined; get overlayDataP(): string | undefined; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_maxLength: unknown; static ngAcceptInputType_feedback: unknown; static ngAcceptInputType_toggleMask: unknown; static ngAcceptInputType_showClear: unknown; static ngAcceptInputType_autofocus: unknown; static ngAcceptInputType_tabindex: unknown; } declare class PasswordModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { MapperPipe, Password, PasswordClasses, PasswordDirective, PasswordModule, PasswordStyle, Password_VALUE_ACCESSOR };