UNPKG

@material-ui/lab

Version:

Material-UI Lab - Incubator for Material-UI React components.

64 lines (63 loc) 2.51 kB
/// <reference types="react" /> import { MuiPickersAdapter } from '../internal/pickers/hooks/useUtils'; import { ExportedArrowSwitcherProps } from '../internal/pickers/PickersArrowSwitcher'; import { TimeValidationProps } from '../internal/pickers/time-utils'; import { PickerOnChangeFn } from '../internal/pickers/hooks/useViews'; export interface ExportedClockPickerProps<TDate> extends TimeValidationProps<TDate> { /** * 12h/24h view for hour selection clock. * @default true */ ampm?: boolean; /** * Step over minutes. * @default 1 */ minutesStep?: number; /** * Display ampm controls under the clock (instead of in the toolbar). * @default false */ ampmInClock?: boolean; /** * Enables keyboard listener for moving between days in calendar. * @default currentWrapper !== 'static' */ allowKeyboardControl?: boolean; /** * Accessible text that helps user to understand which time and view is selected. * @default (view, time) => `Select ${view}. Selected time is ${format(time, 'fullTime')}` */ getClockLabelText?: (view: 'hours' | 'minutes' | 'seconds', time: TDate, adapter: MuiPickersAdapter<TDate>) => string; } export interface ClockPickerProps<TDate> extends ExportedClockPickerProps<TDate>, ExportedArrowSwitcherProps { /** * Selected date @DateIOType. */ date: TDate | null; /** * On change callback @DateIOType. */ onChange: PickerOnChangeFn<TDate>; /** * Get clock number aria-text for hours. */ getHoursClockNumberText?: (hoursText: string) => string; /** * Get clock number aria-text for minutes. */ getMinutesClockNumberText?: (minutesText: string) => string; /** * Get clock number aria-text for seconds. */ getSecondsClockNumberText?: (secondsText: string) => string; openNextView: () => void; openPreviousView: () => void; view: 'hours' | 'minutes' | 'seconds'; nextViewAvailable: boolean; previousViewAvailable: boolean; showViewSwitcher?: boolean; } export declare const styles: Record<"arrowSwitcher", import("../../../material-ui-styles/src").CSSProperties | import("../../../material-ui-styles/src").CreateCSSProperties<{}> | import("../../../material-ui-styles/src").PropsFunc<{}, import("../../../material-ui-styles/src").CreateCSSProperties<{}>>>; declare const _default: <TDate>(props: ClockPickerProps<TDate>) => JSX.Element; export default _default;