import { ReactNode } 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?: boolean; 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; /** * optional '15px' reserve helperText space prop for the select field */ reserveHelperTextSpace?: boolean; /** * variants to set color/style of the Select field */ variant?: 'primary' | 'website'; /** * Provide the size for the select */ size?: 'small' | 'medium'; /** * Provide the character count for the tooltip after which the tooltip should be displayed */ tooltipCharCount?: number; } 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 {};