import { FC } from 'react'; import { TextInputProps } from './Input'; import { TranslationMeridiem } from '../DateTimePicker'; declare type FormatVariants = 'hh:mm:ss' | 'hh:mm' | 'mm:ss' | 'hh' | 'mm' | 'ss'; export declare type BaseTimeInputProps = Omit; export interface TimeInputValues { readonly hour?: number; readonly minute?: number; readonly second?: number; } export interface TimeInputProps extends BaseTimeInputProps { /** * If `true` will show and set the time in AM/PM format, * `false` will show and set time in 24 hour format. */ readonly hour12?: boolean; /** * Initial value in seconds, will be parsed into the given format. */ readonly value: TimeInputValues; /** * Callback that returns the amount of seconds in TimeInput. * * returns seconds */ readonly onChange: (value: TimeInputValues) => void; /** * AM/PM translation labels * * Default `AM` and `PM` */ readonly hour12MeridiemLabels?: TranslationMeridiem; } /** * Time input component * * The time input uses a text input box to * write time, the input forces the user to enter * in a specific format e.g. (hh:mm:ss). * * When variant `hour12` is `false` the time input will act as a 24 hour input. * * When property `hour12` is `true`, the input is * postfixed with am/pm, and the hours can only go * from 01 to 12, there is also a select besides the input component * that lets the user to choose between AM and PM. * * Duration input component (DurationInput) * * Is a variant of TimeInput but the highest time unit * in the input are not limited in value (can go up to max 99). */ export declare const TimeInput: FC; export interface DurationInputProps extends BaseTimeInputProps { /** * Initial value in seconds, will be parsed into the given format. */ readonly value: number; /** * Callback that returns the amount of seconds in TimeInput. * * returns seconds */ readonly onChange: (value: number) => void; /** * Sets the format of the input. * hh:mm:ss, hh:mm, mm:ss, hh, mm, ss are valid format. */ readonly format: FormatVariants; } /** * Duration input component * * Is a variant of TimeInput but the highest time unit * in the input are not limited in value (can go up to max 99). */ export declare const DurationInput: FC; export declare const TimeInputField: FC; export declare const DurationInputField: FC; export {};