import React from "react"; import { CommonTextboxProps } from "../../../textbox"; import { ValidationProps } from "../../../../__internal__/validations"; export interface FormInputPropTypes extends ValidationProps, Omit { /** * @deprecated `adaptiveLabelBreakpoint` has been deprecated. * It is recommended to use `useMediaQuery` hook to implement adaptive behaviour. * Breakpoint for adaptive label (inline labels change to top aligned). Enables the adaptive behaviour when set **/ adaptiveLabelBreakpoint?: number; /** Prop to specify the aria-label attribute of the component input */ ariaLabel?: string; /** Prop to specify the aria-labelledby property of the component input */ ariaLabelledby?: string; /** If true the Component will be focused when rendered */ autoFocus?: boolean; /** If true, the component will be disabled */ disabled?: boolean; /** Id attribute of the input element */ id?: string; /** The width of the input as a percentage */ inputWidth?: number; /** Label content */ label?: string; /** [Legacy] A message that the Help component will display */ labelHelp?: React.ReactNode; /** [Legacy] When true label is inline */ labelInline?: boolean; /** [Legacy] Label width */ labelWidth?: number; /** Name attribute of the input element */ name?: string; /** Specify a callback triggered on blur */ onBlur?: (ev: React.FocusEvent) => void; /** Specify a callback triggered on click */ onClick?: (ev: React.MouseEvent) => void; /** Specify a callback triggered on focus */ onFocus?: (ev: React.FocusEvent) => void; /** Specify a callback triggered onKeyDown */ onKeyDown?: (ev: React.KeyboardEvent) => void; /** Placeholder string to be displayed in input */ placeholder?: string; /** Flag to configure component as mandatory */ required?: boolean; /** If true, the component will be read-only */ readOnly?: boolean; /** Size of an input */ size?: "small" | "medium" | "large"; /** * Id of the element containing the currently displayed value * to be read by voice readers * @private * @ignore */ accessibilityLabelId?: string; /** * Label id passed from Select component * @private * @ignore * */ labelId?: string; } export interface SelectTextboxProps extends FormInputPropTypes { /** Id attribute of the select list */ "aria-controls"?: string; /** Value to be displayed in the Textbox */ formattedValue?: string; /** If true, the list is displayed */ isOpen?: boolean; /** Value of the Select Input */ selectedValue?: string | Record | (string | Record)[]; /** @private @ignore */ transparent?: boolean; /** @private @ignore */ activeDescendantId?: string; /** Specify a callback triggered on change */ onChange: (ev: React.ChangeEvent) => void; /** * Sets the type of select, which determines the behaviour of the textbox. * If "simple", the textbox does not allow typing and functions as a standard select. * If "filterable", the textbox allows typing and filters the options based on the input value. * If "multi", the textbox allows typing and is used for multi-selects, displaying selected options as comma-separated values. */ selectType?: "simple" | "filterable" | "multi"; } declare const SelectTextbox: React.ForwardRefExoticComponent>; export default SelectTextbox;