import { ReactNode, RefObject } from 'react'; export interface SelectProps { label?: string; showLabel?: boolean; /** * Provide the boolean value if arrow icon is reuired or not */ showArrowIcon?: boolean; optionsList: Option[]; selectedOption: Option; onChange: (option: Option) => void; errorMsg?: string; className?: string; optionZIndex?: number; disabled?: boolean; borderRadius?: string; showBorder?: boolean; required?: boolean; /** * optionsRequired:false prop removes options from dropdown & shows static label only */ optionsRequired?: boolean; selectedOptionColor?: string; labelAccessor?: string; valueAccessor?: string; height?: number; width?: number | string; onBlur?: () => void; disableInput?: boolean; showIcon?: boolean; iconName?: string; /** * Provide the placehoder for the select */ placeHolder?: string; /** * Provide the boolean value if tooltip is reuired or not */ showToolTip?: boolean; /** * Provide the background color for the select label on the hover state */ labelBackgroundColor?: string; /** * To close the modal in the select dropdown */ onCancelModal?: () => void; /** * To close the modal in the select dropdown */ onSaveModal?: () => void; /** * Pass the custom Jsx for the Modal */ modalJSXProps?: ReactNode; /** * Pass the recurrence boolean for the exeception cases */ recurrence?: boolean; /** * Toggles the visibility of dropdown options, when called, toggles the dropdown visibility */ showOptions?: { open: boolean; toggle: boolean; }; /** * Tooltip for input data */ tooltip?: boolean; /** * Provide the boolean value if close icon is reuired or not */ showClearIcon?: boolean; /** * Handel function for clearing the selected data */ handelClear?: () => void; /** * Handle background color */ background?: string; /** * No Result message */ noResultsMessage?: string; /** * Ref for select option dropdown */ dropDownRef?: RefObject; /** * handling dropdownDown height */ dropDownHeight?: number; onSearchText?: (text: string) => void; } export interface DropdownPosition { positionX: number; positionY: number; width: number; fromBottom: number; } export interface SelectState { isInputFocused: boolean; iconColor: string; isIconClick: boolean; showOptions: boolean; options: Option[]; option: string; dropdownPosition: DropdownPosition; } type OptionValue = any; export interface Option { [key: string]: OptionValue; } export {};