import * as lit from 'lit'; import { LitElement, TemplateResult } from 'lit'; import { T as TypeStatus, K as KemetField, d as KemetInput, e as KemetTextarea } from '../constants-CcB9aXsT.js'; import 'lit-html'; import '../form-controller-BR0gZhrG.js'; /** * @since 1.2.0 * @status stable * * @tagname kemet-password * @summary Gauges the strength of a password entered by the user. * * @prop {array} rules - An array of objects containing the rules the password must meet. * @prop {boolean} show - Controls the display of the component. * @prop {string} value - The value of the input component. * @prop {string} message - A message that is above the rules. * @prop {string} strength - The strength of the password. Weak | Better | Strong. * @prop {string} icon * @prop {number} iconSize * * @event kemet-status-change - Fires when there's a change in status. * * @csspart status - The status message. * @csspart indicator - The strength indicator bars. * @csspart message - A message to display to the user. * @csspart rules - A description of rules to follow. * */ interface InterfaceOptions { pattern: string; message: string; meetsCriteria?: boolean; } interface InterfacePasswordStatusChangeDetails { status: TypeStatus; meetsPasswordCriteria: boolean; element: KemetPassword; } declare class KemetPassword extends LitElement { static styles: lit.CSSResult[]; rules: InterfaceOptions[]; show: boolean; value: string; message: string; strength: string; icon: string; iconSize: number; status: TypeStatus; field: KemetField; input: KemetInput | KemetTextarea; firstUpdated(): void; render(): TemplateResult<1>; /** * Makes the list of rules * @private * @returns {TemplateResult<1>[]} the criteria rules */ makeRules(): TemplateResult<1>[]; /** * Makes the check icon if the criteria has been met * @param {boolean} meetsCriteria * @private * @returns {TemplateResult} an icon component */ makeCheckIcon(meetsCriteria: boolean): TemplateResult; /** * Handles the kemet-input-input event * @param {*} event * @private */ handleInput(event: CustomEvent): void; /** * Determines the strength of the password * @private */ setStrength(): void; /** * Determines whether to show or hide the component * @private */ visibility(): void; } declare global { interface HTMLElementTagNameMap { 'kemet-password': KemetPassword; } } export { type InterfacePasswordStatusChangeDetails, KemetPassword as default };