@amaui/ui-react
Version:
UI for React
73 lines (72 loc) • 2.9 kB
TypeScript
import React from 'react';
import { AmauiDate } from '@amaui/date';
import { TClockUnit } from '../Clock/Clock';
import { IAdvancedTextField } from '../AdvancedTextField/AdvancedTextField';
import { ISize, IValueBreakpoints, IElementReference, IPropsAny } from '../types';
export type TTimePickerValue = AmauiDate | [AmauiDate, AmauiDate];
export type TTimePickerSelecting = TClockUnit | [TClockUnit, TClockUnit];
export interface ITimePicker extends Omit<IAdvancedTextField, 'version'> {
version?: 'auto' | 'mobile' | 'desktop';
value?: TTimePickerValue;
valueDefault?: TTimePickerValue;
onChange?: (value: TTimePickerValue) => any;
selecting?: TTimePickerSelecting;
selectingDefault?: TTimePickerSelecting;
onChangeSelecting?: (value: TTimePickerSelecting) => any;
size?: ISize;
now?: boolean;
range?: boolean;
static?: boolean;
valid?: (value: AmauiDate, version: TClockUnit) => boolean;
validate?: (value: AmauiDate) => boolean;
min?: AmauiDate;
max?: AmauiDate;
autoNext?: boolean | Partial<Record<IValueBreakpoints, boolean>>;
autoCloseOnLast?: boolean | Partial<Record<IValueBreakpoints, boolean>>;
openMobile?: 'input' | 'select';
openDesktop?: 'input' | 'select';
selectModalSubHeadingText?: string;
selectModalSubHeadingTextRange?: string;
inputModalSubHeadingText?: string;
inputModalSubHeadingTextRange?: string;
orientation?: 'vertical' | 'horizontal' | Partial<Record<IValueBreakpoints, 'vertical' | 'horizontal'>>;
format?: '12' | '24';
hour?: boolean;
minute?: boolean;
second?: boolean;
switch?: boolean | Partial<Record<IValueBreakpoints, boolean>>;
today?: boolean;
clear?: boolean;
placeholder?: string;
heading?: boolean;
actions?: boolean;
fullWidth?: boolean;
readOnly?: boolean;
disabled?: boolean;
onClick?: (event: React.MouseEvent<any>) => any;
onClose?: (event: React.MouseEvent<any>) => any;
onCancel?: (event: React.MouseEvent<any>) => any;
onNow?: (event: React.MouseEvent<any>) => any;
onOk?: (event: React.MouseEvent<any>) => any;
renderValue?: (value: AmauiDate, version: TClockUnit, x: number, y: number, valueNumber: number, otherProps: any) => React.ReactNode;
Icon?: IElementReference;
IconEnter?: IElementReference;
WrapperProps?: IPropsAny;
MainProps?: IPropsAny;
ModalProps?: IPropsAny;
MiddleProps?: IPropsAny;
ButtonProps?: IPropsAny;
TooltipProps?: IPropsAny;
ToggleButtonsProps?: IPropsAny;
ToggleButtonProps?: IPropsAny;
IconButtonProps?: IPropsAny;
InputProps?: IPropsAny;
ClockProps?: IPropsAny;
TabsProps?: IPropsAny;
TabFromProps?: IPropsAny;
TabToProps?: IPropsAny;
AdvancedTextFieldProps?: IPropsAny;
IconProps?: IPropsAny;
}
declare const TimePicker: React.FC<ITimePicker>;
export default TimePicker;