import '@components/icon/icon.js'; import { FormBase } from '@internal/components/formBase.js'; import '@internal/components/hint/hint'; import type { FormFieldBaseProps } from '@internal/types/formField.js'; import { type CSSResultGroup } from 'lit'; /** * The skf-text-field is used to create a text input field. It can be used inside a form element or standalone. * * @documentation See [InVision DSM](https://skf.invisionapp.com/dsm/ab-skf/4-web-applications/nav/5fa7caf78c01200018354495/asset/619e4125b3d2147c0c584b11) for design principles. * * @attribute {boolean} disabled - If true, sets disabled state * @attribute {boolean} required - If true, value is required or must be checked for the form to be submittable * * @event change - Fires when the value of the input changes * @event invalid - Fires when the input is invalid * * @slot Default - Alternatively, you can use the `label` attribute * * @tagname skf-input * * Three undocumented but self explanatory boolean attributes change the validation * behaviour: validate-on-input, validate-on-submit and native-validation */ export declare class SkfInput extends FormBase implements FormFieldBaseProps { static styles: CSSResultGroup; private customError; /** If provided, renders a custom aria-label for the clear button **Notice!** Only applicable to type=search. */ buttonAriaLabelClear: string; /** If provided, renders a custom aria-label for the visibility button. **Notice!** Only applicable to type=password. */ buttonAriaLabelHide: string; /** If provided, renders a custom aria-label for the visibility button **Notice!** Only applicable to type=password. */ buttonAriaLabelShow: string; /** If provided, forces component to invalid state until removed. Its value is used as hint text. */ set customInvalid(value: string | undefined); get customInvalid(): string | undefined; /** If provided, outputs helping hints in console */ debug: boolean; /** If true, hides the label visually */ hideLabel: boolean; /** If provided, displays informational text below the field */ hint?: string; /** If provided, tells what keyboard to use if applicable */ inputmode: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search'; /** The input's label. Alternatively, you can use the `label` attribute. */ label?: string; /** If provided, displays a prefix/adornment before the input-element */ leading?: string; /** If provided, sets the maximum value to accept for this input */ max?: number | string; /** If provided, sets the maximum character length to accept for this input */ maxLength?: number; /** If provided, sets the minimum value to accept for this input */ min?: number | string; /** If provided, sets the minimum character length to accept for this input */ minLength?: number; /** If provided, adds name to the input-element */ name?: string; /** If provided, adds name to the input-element */ pattern?: string; /** If provided, displays placeholder text */ placeholder?: string; /** If true, makes the element not mutable, meaning the user can not edit the control */ readonly?: boolean; /** If provided, renders an alternative A11y text for the asterisk */ requiredLabel?: string; /** If provided, displays provided severity state */ severity?: FormFieldBaseProps['severity']; /** If provided, displays provided severity state */ showValid?: boolean; /** If provided, displays an alternative size */ size?: 'sm' | 'md'; /** If provided, displays a suffix/adornment after the input-element */ trailing?: string; /** If provided, changes the type of form control */ type?: Exclude; /** If provided, sets validation start, "input", "change" or "submit" */ validateOn?: 'input' | 'change' | 'submit'; /** The current value of the input field */ value: string; /** @internal */ /** true if the internal state is invalid */ invalid: boolean; /** @internal */ private _buttonDown; /** @internal */ $input: HTMLInputElement; /** @internal */ private _numberController; /** @internal */ private _passwordController; constructor(); protected firstUpdated(): void; willUpdate(changedProperties: Map): void; attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void; /** @internal */ _handleInput: () => void; /** @internal */ _resetValue: (event: Event) => void; /** @internal */ _handlePressStart: (event: MouseEvent) => void; /** @internal */ _handlePressEnd: () => void; /** @internal */ validateInput(): void; /** * Number */ /** @internal */ private _renderNumberButton; /** * Password */ /** @internal */ private _renderPasswordButton; /** * Search */ /** @internal */ private _renderSearchButton; /** @internal */ private _onBlur; render(): import("lit").TemplateResult<1>; }