import { Moment } from 'moment'; import * as React from 'react'; import { SemanticTRANSITIONS, SemanticCOLORS, SemanticICONS } from 'semantic-ui-react'; import * as PropTypes from 'prop-types'; import { TimeFormat } from '../pickers/BasePicker'; export interface BaseInputProps { [key: string]: any; /** Currently selected value. */ value: string; /** Called on selected value change. */ onChange: (e: React.SyntheticEvent, data: any) => void; /** If true, popup closes after selecting a value. */ closable?: boolean; /** An input can be formatted to appear inline in other content. */ inline?: boolean; /** Optional icon to display inside the Input. */ icon?: SemanticICONS | false; /** Icon position inside Input. Default: 'right'. */ iconPosition?: 'right' | 'left'; /** * Called on clear. * * @param {SyntheticEvent} event - React's original SyntheticEvent. * @param {object} data - All props and proposed value. */ onClear?: (event: React.SyntheticEvent, data: any) => void; /** Using the clearable setting will let users remove their selection from a calendar. */ clearable?: boolean; /** Optional Icon to display inside the clearable Input. */ clearIcon?: any; /** Position for the popup. */ popupPosition?: 'top left' | 'top right' | 'bottom left' | 'bottom right' | 'right center' | 'left center' | 'top center' | 'bottom center'; /** Should close when cursor leaves calendar popup. */ closeOnMouseLeave?: boolean; /** The node where the picker should mount. */ mountNode?: any; /** A field can have its label next to instead of above it. */ inlineLabel?: boolean; /** Picker width (any value that `style.width` can take). */ pickerWidth?: string; /** Style object for picker. */ pickerStyle?: object; /** Duration of the CSS transition animation in milliseconds. */ duration?: number; /** Named animation event to used. Must be defined in CSS. */ animation?: SemanticTRANSITIONS; /** Moment date localization. */ localization?: string; /** Try to prevent mobile keyboard appearing. */ hideMobileKeyboard?: boolean; } export declare const BaseInputPropTypes: { /** Currently selected value. */ value: PropTypes.Validator; /** Called on selected value change. */ onChange: PropTypes.Requireable<(...args: any[]) => any>; /** If true, popup closes after selecting a value. */ closable: PropTypes.Requireable; /** An input can be formatted to appear inline in other content. */ inline: PropTypes.Requireable; /** Optional icon to display inside the Input. */ icon: PropTypes.Requireable; /** Icon position inside Input. Default: 'right'. */ iconPosition: PropTypes.Requireable; /** * Called on clear. * * @param {SyntheticEvent} event - React's original SyntheticEvent. * @param {object} data - All props and proposed value. */ onClear: PropTypes.Requireable<(...args: any[]) => any>; /** Using the clearable setting will let users remove their selection from a calendar. */ clearable: PropTypes.Requireable; /** Optional Icon to display inside the clearable Input. */ clearIcon: PropTypes.Requireable; /** Position for the popup. */ popupPosition: PropTypes.Requireable; /** Should close when cursor leaves calendar popup. */ closeOnMouseLeave: PropTypes.Requireable; /** The node where the picker should mount. */ mountNode: PropTypes.Requireable; /** A field can have its label next to instead of above it. */ inlineLabel: PropTypes.Requireable; /** Picker width (any value that `style.width` can take). */ pickerWidth: PropTypes.Requireable; /** Style object for picker. */ pickerStyle: PropTypes.Requireable; /** Duration of the CSS transition animation in milliseconds. */ duration: PropTypes.Requireable; /** Named animation event to used. Must be defined in CSS. */ animation: PropTypes.Requireable; /** Moment date localization. */ localization: PropTypes.Requireable; /** Try to prevent mobile keyboard appearing. */ hideMobileKeyboard: PropTypes.Requireable; }; export interface MarkedValuesProps { /** Array of marked dates. */ marked?: Moment[] | Date[]; /** String specifying the mark color (Optional). */ markColor?: SemanticCOLORS; } export declare const MarkedValuesPropTypes: { /** Array of marked dates. */ marked: PropTypes.Requireable; /** String specifying the mark color (Optional). */ markColor: PropTypes.Requireable; }; export interface DateRelatedProps { /** Moment date formatting string. */ dateFormat?: string; /** Date to display initially when no date is selected. */ initialDate?: string | Date | Moment; } export declare const DateRelatedPropTypes: { /** Moment date formatting string. */ dateFormat: PropTypes.Requireable; /** Date to display initially when no date is selected. */ initialDate: PropTypes.Requireable; }; export interface TimeRelatedProps { /** Time format. */ timeFormat?: TimeFormat; /** If true, minutes picker won't be shown after picking the hour. */ disableMinute?: boolean; } export declare const TimeRelatedPropTypes: { /** Time format. */ timeFormat: PropTypes.Requireable; /** If true, minutes picker won't be shown after picking the hour. */ disableMinute: PropTypes.Requireable; }; export interface DisableValuesProps { /** Date or list of dates that are displayed as disabled. */ disable?: string | string[] | Moment | Moment[] | Date | Date[]; } export declare const DisableValuesPropTypes: { /** Date or list of dates that are displayed as disabled. */ disable: PropTypes.Requireable; }; export interface EnableValuesProps { /** Date or list of dates that are enabled (the rest are disabled). */ enable?: string | string[] | Moment | Moment[] | Date | Date[]; } export declare const EnableValuesPropTypes: { /** Date or list of dates that are enabled (the rest are disabled). */ enable: PropTypes.Requireable; }; export interface MinMaxValueProps { /** Maximum date that can be selected. */ maxDate?: string | Moment | Date; /** Minimum date that can be selected. */ minDate?: string | Moment | Date; } export declare const MinMaxValuePropTypes: { /** Maximum date that can be selected. */ maxDate: PropTypes.Requireable; /** Minimum date that can be selected. */ minDate: PropTypes.Requireable; }; export interface MultimodeProps { /** Preserve viewmode on focus? */ preserveViewMode?: boolean; } export declare const MultimodePropTypes: { /** Preserve viewmode on focus? */ preserveViewMode: PropTypes.Requireable; }; export interface RangeRelatedProps { /** Allow end date to be the same as start date. */ allowSameEndDate?: boolean; } export declare const RangeRelatedPropTypes: { /** Allow end date to be the same as start date. */ allowSameEndDate: PropTypes.Requireable; }; export interface BaseInputState { popupIsClosed: boolean; } declare abstract class BaseInput

extends React.Component { static defaultProps: { value: string; inline: boolean; localization: string; }; private calendarNode; private inputNode; protected closePopup: () => void; protected openPopup: () => void; protected isPickerInFocus: () => boolean; protected isTriggerInFocus: () => boolean; protected onModeSwitch: () => void; protected onCalendarViewMount: (calendarNode: HTMLElement) => void; protected onInputViewMount: (inputNode: HTMLElement) => void; } export default BaseInput;