import type { CSSResultGroup } from 'lit';
import DSAIconButton from '../icon-button/icon-button';
import { InputBase } from '../../internal/components/input-base/input-base';
import type { ShoelaceFormControl } from '../../internal/shoelace-element';
/**
* @summary Input Masks collect data from the user in a masked fashion.
* @documentation https://dsa.service-public-autonomie.fr/latest/librairie-webcomponents/champs-de-saisie/input-mask/web-hTyf0FvL
*
* @dependency dsa-icon-button
* @dependency dsa-error-text
* @dependency dsa-success-text
*
* @slot label - The input's label. Alternatively, you can use the `label` attribute.
* @slot prefix - Used to prepend a presentational icon or similar element to the input.
* @slot suffix - Used to postpend a presentational icon or similar element to the input.
* @slot help-text - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.
* @slot tooltip - The tooltip slot allows additional information to be passed along the label.
*
* @event dsa-blur - Emitted when the control loses focus.
* @event dsa-change - Emitted when an alteration to the control's value is committed by the user.
* @event dsa-clear - Emitted when the clear button is activated.
* @event dsa-focus - Emitted when the control gains focus.
* @event dsa-input - Emitted when the control receives input.
* @event dsa-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.
*/
export default class DSAInputMask extends InputBase implements ShoelaceFormControl {
static styles: CSSResultGroup;
static dependencies: {
'dsa-icon-button': typeof DSAIconButton;
'dsa-success-text': typeof import("../success-text/success-text").default;
'dsa-error-text': typeof import("../error-text/error-text").default;
};
private readonly localize;
private effectiveMask;
private patternRegExp?;
input: HTMLInputElement;
private maskedValue;
/**
* Tells the browser what type of data will be entered by the user, allowing it to display the appropriate virtual
* keyboard on supportive devices.
*/
inputmode: 'none' | 'text' | 'decimal' | 'numeric' | 'search';
/** A regular expression pattern to validate input against. */
pattern: string;
/**
* Used to define the allowed or expected characters within a string or data input. It specifies the permissible characters that can be present at specific positions within a sequence.
* It should follow the format defined by the placeholder, but with its own permissible characters.
*
* - all characters: includes any character, whether it's a letter, number.
*```ts
* '_'
* ```
* - numeric characters: specifies numeric values that can be included.
* ```ts
* '#dDmMyYaA09'
* ```
* - letter characters: denotes alphabetic characters allowed in the sequence.
* ```ts
* '?LaA'
* ```
*
* - example including only numeric values
* ```html
*
* ```
*/
mask: string;
/** Gets the validity state object */
get validity(): ValidityState;
connectedCallback(): void;
private updateMaskConfig;
private syncMaskedValue;
private handleInputValueChange;
private rawValueToMaskedValue;
protected handleChange(): void;
handleValueChange(): Promise;
handleMaskConfigChange(): void;
/** Replaces a range of text with a new string. */
setRangeText(replacement: string, start?: number, end?: number, selectMode?: 'select' | 'start' | 'end' | 'preserve'): void;
renderInput(): import("lit").TemplateResult<1>;
}
declare global {
interface HTMLElementTagNameMap {
'dsa-input-mask': DSAInputMask;
}
}