import { EventEmitter } from '../../stencil-public-runtime'; import { TextInputAutocomplete } from '../../utils/constants'; /** * @slot leading-input - Content to be placed before the input text, within the input container. * @slot trailing-input - Content to be placed after the input text, within the input container. * @slot before-input - Content to be placed before the input text, outside the input container. * @slot after-input - Content to be placed after the input text, outside the input container. * @slot label - Content to be placed as the label, will override the label prop. * @slot description - Content to be placed as the description, will override the description prop. * @slot error-description - Content to be placed as the error description, will override the errorDescription prop. */ export declare class NvFieldtext { el: HTMLNvFieldtextElement; private inputElement; /****************************************************************************/ /** * Message defines a 'hint ' message for the Text Field. * @deprecated Use `description` instead. */ readonly message: string; /** * Add the message to the validation state. * @deprecated Use `errorDescription` and set the error prop instead. */ readonly validation: string; /** * Type of the input. * @deprecated use type instead. */ readonly textInputType: 'text' | 'tel' | 'email'; /****************************************************************************/ /** * Sets the ID for the input element and the for attribute of the associated * label. If no ID is provided, a random one will be automatically generated * to ensure unique identification, facilitating proper label association and * accessibility. */ readonly inputId: string; /** * Lets you define the text that explains what users should enter in the text * input field. It’s a crucial element for making forms clear and * user-friendly. */ readonly label: string; /** * Add helpful hints or extra information under the text input field. This is * where you can clarify what users should enter or provide additional * instructions, making the form easier to fill out correctly. */ description: string; /** * Display temporary text inside the input field to give users a hint about * what to type. It’s a great way to provide examples or suggestions directly * in the field before they start typing. */ readonly placeholder: string; /** * Defines the name attribute of the input field, which is crucial for form * submission. This value is used as the key in the key-value pair sent to * the server, representing the input’s data in form submissions. It should be * unique within the form to avoid conflicts */ readonly name: string; /** * Specifies the value of the input field, which determines the text displayed * within the field. This prop is typically used in controlled components * where the input’s value is managed by the component’s state. */ value: string; /** * The type prop lets you specify what kind of information the input field * should accept. Choose 'text' for general words or sentences, 'tel' for * phone numbers, or 'email' for email addresses. This makes sure users get * the right keyboard and validation for what they need to enter. */ type: 'text' | 'tel' | 'email'; /** * The disabled prop lets you turn off the input field so that users can’t * type in it. When disabled, the field is grayed out and won’t respond to * clicks or touches. */ readonly disabled: boolean; /** * Display the input field’s content without allowing users to change it. * Users can still click on it, select, and copy the text, but they won’t be * able to type or delete anything. */ readonly readonly: boolean; /** * Marks the input field as required, ensuring that the user must fill it out * before submitting the form. * @note This uses the native HTML `required` attribute, which triggers browser validation. */ readonly required: boolean; /** * Marks the input field as required for accessibility purposes without triggering * native HTML validation. Use this when implementing custom validation logic. * @note When set, this uses `aria-required` instead of the native `required` attribute. * This allows developers to implement custom validation while maintaining accessibility. * @note If this prop is not explicitly set, the component will check for the HTML attribute * 'aria-required' directly to determine if it should be applied. */ readonly ariaRequiredAttr: boolean; /** * Alters the input field’s appearance to indicate an error, helping users * identify fields that need correction. * @validator error */ error: boolean; /** * A description that appears when there is an error related to the textfield * field. * @validator message */ errorDescription?: string; /** * Changes the input field’s appearance to indicate successful input or * validation. */ readonly success: boolean; /** * Limits how many characters users can type into the input field. It’s * helpful for making sure users don’t enter too much information, keeping * their input within the allowed limit. */ readonly maxlength: number; /** * Ensures that users type at least a certain number of characters into the * input field. It’s a way to make sure users provide enough information * before moving on. */ readonly minlength: number; /** * Set rules for how the input should be formatted. For example, you can * require that a phone number includes only digits or that an email address * has the correct format. If users don’t follow these rules, they’ll get a * prompt to correct their input after the form is submitted. */ readonly pattern: string; /** * The autocomplete prop helps users fill out the input field faster by * suggesting entries they’ve used before, like their email or address. * You can turn it on to make forms more convenient or off to ensure users * always type in fresh data. */ readonly autocomplete: `${TextInputAutocomplete}`; /** * When used with the email input type, this prop enables the field to accept * multiple email addresses. Users can enter several addresses, separating * each one with a comma, allowing the form to handle multiple recipients. */ readonly multiple: boolean; /** * Applies focus to the input field as soon as the component is mounted. This * is equivalent to setting the native autofocus attribute on an * element. */ readonly autofocus: boolean; /** * Allows the field to stretch and fill the entire width of its container. */ readonly fluid: boolean; /****************************************************************************/ /** * Emitted when the input value changes. * @bind value */ valueChanged: EventEmitter; /****************************************************************************/ /** * Handles the input event on the input element. * Emits the inputChanged event with the new value. * @param {Event} event - Event object of the input event. */ private handleInput; /** * Handles focus when the input container is clicked. */ private handleInputContainerClick; /****************************************************************************/ componentWillRender(): void; /****************************************************************************/ render(): any; }