import React from "react"; import { PlusInput as PlusInputElement } from "../dist/components/input/index.js"; export type { PlusInputElement }; export interface PlusInputProps extends Pick< React.AllHTMLAttributes, | "children" | "dir" | "hidden" | "id" | "lang" | "slot" | "style" | "title" | "translate" | "onClick" | "onFocus" | "onBlur" > { /** Whether the input should have a clear button */ clearable?: boolean; /** Whether the input is disabled */ disabled?: boolean; /** Whether the input is readonly */ readonly?: boolean; /** Whether the input is required */ required?: boolean; /** Whether to show a password toggle button */ passwordToggle?: boolean; /** Whether the password is visible */ passwordVisible?: boolean; /** Whether the input is in an error state */ error?: boolean; /** Whether the input should automatically get focus */ autoFocus?: boolean | undefined; /** Whether spellcheck is enabled */ spellCheck?: boolean | undefined; /** Whether the input should take up full width */ fullWidth?: boolean; /** The type of input */ type?: PlusInputElement["type"]; /** The name of the input */ name?: PlusInputElement["name"]; /** The value of the input */ value?: PlusInputElement["value"]; /** The placeholder text */ placeholder?: PlusInputElement["placeholder"]; /** The size of the input */ size?: PlusInputElement["size"]; /** The label for the input */ label?: PlusInputElement["label"]; /** The validation pattern for the input */ pattern?: PlusInputElement["pattern"]; /** The minimum length of the input value */ minlength?: PlusInputElement["minlength"]; /** The maximum length of the input value */ maxlength?: PlusInputElement["maxlength"]; /** The minimum value of the input */ min?: PlusInputElement["min"]; /** The maximum value of the input */ max?: PlusInputElement["max"]; /** The step value for numeric inputs */ step?: PlusInputElement["step"]; /** Whether autocorrect is enabled */ autocorrect?: PlusInputElement["autocorrect"]; /** The autocomplete attribute */ autocomplete?: PlusInputElement["autocomplete"]; /** The enterkeyhint attribute */ enterkeyhint?: PlusInputElement["enterkeyhint"]; /** The inputmode attribute */ inputmode?: PlusInputElement["inputmode"]; /** Caption text to display below the input */ caption?: PlusInputElement["caption"]; /** The error message to display */ errorMessage?: PlusInputElement["errorMessage"]; /** Icon name for the prefix icon */ prefixIcon?: PlusInputElement["prefixIcon"]; /** Icon name for the suffix icon */ suffixIcon?: PlusInputElement["suffixIcon"]; /** A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the class selectors or functions like the method `Document.getElementsByClassName()`. */ className?: string; /** Contains a space-separated list of the part names of the element that should be exposed on the host element. */ exportparts?: string; /** Used for labels to link them with their inputs (using input id). */ htmlFor?: string; /** Used to help React identify which items have changed, are added, or are removed within a list. */ key?: number | string; /** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */ part?: string; /** A mutable ref object whose `.current` property is initialized to the passed argument (`initialValue`). The returned object will persist for the full lifetime of the component. */ ref?: any; /** Allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the `Tab` key, hence the name) and determine their relative ordering for sequential focus navigation. */ tabIndex?: number; /** Emitted when the input value changes */ onPlusInput?: (event: CustomEvent) => void; /** Emitted when the input value changes and the input loses focus */ onPlusChange?: (event: CustomEvent) => void; /** Emitted when the input gains focus */ onPlusFocus?: (event: CustomEvent) => void; /** Emitted when the input loses focus */ onPlusBlur?: (event: CustomEvent) => void; /** Emitted when the clear button is clicked */ onPlusClear?: (event: CustomEvent) => void; /** Emitted when the password visibility is toggled */ onPlusPasswordToggle?: (event: CustomEvent) => void; /** Emitted when the input value is invalid */ onPlusInvalid?: (event: CustomEvent) => void; } /** * Form input component that provides various input types, validation, and styling features. * --- * * * ### **Events:** * - **plus-input** - Emitted when the input value changes * - **plus-change** - Emitted when the input value changes and the input loses focus * - **plus-focus** - Emitted when the input gains focus * - **plus-blur** - Emitted when the input loses focus * - **plus-clear** - Emitted when the clear button is clicked * - **plus-password-toggle** - Emitted when the password visibility is toggled * - **plus-invalid** - Emitted when the input value is invalid * * ### **Methods:** * - **checkValidity(): _boolean_** - Checks the validity of the input against constraints. * - **reportValidity(): _boolean_** - Reports the validity of the input. If the input is invalid, * it dispatches an 'invalid' event and focuses the input. * - **setCustomValidity(message: _string_): _void_** - Sets a custom validation message for the input. * * ### **Slots:** * - **prefix** - Content to be placed before the input * - **suffix** - Content to be placed after the input * * ### **CSS Parts:** * - **input** - The native input element * - **wrapper** - The input wrapper element * - **prefix** - The prefix container * - **suffix** - The suffix container * - **clear-button** - The clear button * - **password-toggle** - The password visibility toggle button */ export const PlusInput: React.ForwardRefExoticComponent;