import { SharedTextInputProps } from '../../composables/useLenientMaxLengthValidation.js'; import { SharedFormElementProps } from '../OnyxFormElement/types.js'; import { OnyxFormElementV2Props } from '../OnyxFormElementV2/types.js'; export type OnyxInputProps = Omit & Pick & SharedTextInputProps & { /** * Input type. * For numeric inputs, we recommend using the [OnyxStepper](https://storybook.onyx.schwarz/?path=/docs/form-elements-stepper--docs). * For date inputs, refer to the [OnyxDatePicker](https://storybook.onyx.schwarz/?path=/docs/form-elements-datepicker--docs). */ type?: InputType; /** * Pattern the value must match to be valid. */ pattern?: string | RegExp; /** * Whether to hide the check icon when the input is in a success state. * * @deprecated This property is obsolete since the "success" state will no longer automatically show a "check" icon. * The "check" icon is intended as temporary feedback after a user action (e.g. clicking a copy button). Use the `trailingIcons` slot to manually show the icon if needed. */ hideSuccessIcon?: boolean; /** * Whether to hide the clear icon when the input is filled and focused. */ hideClearIcon?: boolean; /** * Show or hide the password value for input with `type="password"`. * If unset, the state will be managed internally. */ showPassword?: boolean; /** * Whether to disable the inline padding for the leading and trailing slot. * Useful when placing full-size components like OnyxSelect or OnyxFormElementAction inside. * When set to `true`, use custom CSS with the `var(--onyx-form-element-v2-padding-inline)` to apply padding if needed. * * Will become the default in version 2. */ disableSlotPadding?: boolean; }; export declare const INPUT_TYPES: readonly ["email", "password", "search", "tel", "text", "url"]; export type InputType = (typeof INPUT_TYPES)[number];