import { Size, States, Testable } from '../types'; import React from 'react'; export type TextareaProps = Testable & Omit, 'onChange'> & { /** * Required. The ID of the textarea. */ id: string; /** * Optional. The state of the textarea. Can be 'Invalid' or 'Valid'. */ state?: States.Invalid | States.Valid; /** * Optional. A function to be called when the text in the textarea changes. * It should take a string representing the new text. */ onChange?: (text: string) => void; /** * Optional. The validation message to be displayed when the textarea is in an error state. */ validationMessage?: string; /** * Required. The size of the textarea. Can be 'Small' or 'Medium'. */ size: Size.Small | Size.Medium; /** * Optional. A boolean indicating whether the height of the textarea should automatically adjust to fit the text. */ autoHeight?: boolean; /** * Optional. The margin of the textarea. Can be any valid CSS margin value. */ margin?: string; /** * Optional. A note to be displayed below the textarea. */ note?: TextFieldNote; }; export type TextFieldNote = { message: string; icon: React.ReactNode; }; export interface CheckboxProps extends Testable, Omit, 'onClick' | 'onKeyDown' | 'onMouseDown' | 'tabIndex'> { /** Optional. Id of the checkbox. */ id?: string; /** Required. Current state of the checkbox. */ selected: boolean; /** Optional. Handler to be called when checkbox is selected/unselected */ select?: (selected: boolean) => void; /** Optional. Label to be shown on the right side of the checkbox. */ label?: string; /** Optional. If checkbox is selected and invalid flag is set, then checkbox will be shown in 'invalid' state. */ invalid?: boolean; /** Optional. If set, then user can not interact with it. */ disabled?: boolean; /** Optional. Margin property. */ margin?: string; /** Optional. Size of the Checkbox. Defaults to 'medium'. */ size?: Size.Small | Size.Medium | Size.Large; /** Optional. pointer-events: none style will be set to the checkbox if this flag is set. */ iconPointerEventsTransparent?: boolean; /** Optional. If set then checkbox will be shown in 'semi-selected' state. */ semiSelected?: boolean; /** Optional. If set, then user can not select/unselect the checkbox */ readOnly?: boolean; /** Optional. Tab index attribute of the checkbox. */ tabIndexVal?: number; /** Optional. Custom classname to be set to the checkbox. */ className?: string; }