UNPKG

@douyinfe/semi-ui

Version:

A modern, comprehensive, flexible design system and UI library. Connect DesignOps & DevOps. Quickly build beautiful React apps. Maintained by Douyin-fe team.

70 lines (69 loc) 3.46 kB
import React from 'react'; import PropTypes from 'prop-types'; import BaseComponent, { BaseProps } from '../_base/baseComponent'; import InputFoundation, { TimeInputAdapter } from '@douyinfe/semi-foundation/lib/cjs/timePicker/inputFoundation'; import { TimePickerProps } from './TimePicker'; export type TimeInputProps = Pick<TimePickerProps, 'value' | 'format' | 'prefixCls' | 'placeholder' | 'clearText' | 'inputReadOnly' | 'disabled' | 'type' | 'timeZone' | 'defaultOpen' | 'disabledHours' | 'disabledMinutes' | 'disabledSeconds' | 'dateFnsLocale' | 'onFocus' | 'onBlur' | 'focusOnOpen' | 'locale' | 'localeCode' | 'insetLabel' | 'validateStatus' | 'borderless' | 'preventScroll'> & BaseProps & { onChange?: (value: string) => void; onEsc?: () => void; onClick?: React.MouseEventHandler; defaultOpenValue?: boolean; currentSelectPanel?: string; timeStampValue?: any; invalid?: boolean; }; declare class TimeInput extends BaseComponent<TimeInputProps, any> { static propTypes: { borderless: PropTypes.Requireable<boolean>; format: PropTypes.Requireable<string>; prefixCls: PropTypes.Requireable<string>; placeholder: PropTypes.Requireable<string>; clearText: PropTypes.Requireable<string>; inputReadOnly: PropTypes.Requireable<boolean>; hourOptions: PropTypes.Requireable<any[]>; minuteOptions: PropTypes.Requireable<any[]>; secondOptions: PropTypes.Requireable<any[]>; disabledHours: PropTypes.Requireable<(...args: any[]) => any>; disabledMinutes: PropTypes.Requireable<(...args: any[]) => any>; disabledSeconds: PropTypes.Requireable<(...args: any[]) => any>; onChange: PropTypes.Requireable<(...args: any[]) => any>; onFocus: PropTypes.Requireable<(...args: any[]) => any>; onBlur: PropTypes.Requireable<(...args: any[]) => any>; onEsc: PropTypes.Requireable<(...args: any[]) => any>; onClick: PropTypes.Requireable<(...args: any[]) => any>; defaultOpenValue: PropTypes.Requireable<object>; currentSelectPanel: PropTypes.Requireable<string>; focusOnOpen: PropTypes.Requireable<boolean>; timeStampValue: PropTypes.Requireable<any>; locale: PropTypes.Requireable<object>; localeCode: PropTypes.Requireable<string>; insetLabel: PropTypes.Requireable<PropTypes.ReactNodeLike>; validateStatus: PropTypes.Requireable<string>; preventScroll: PropTypes.Requireable<boolean>; }; static defaultProps: { borderless: boolean; inputReadOnly: boolean; onChange: (...args: any[]) => void; onBlur: (...args: any[]) => void; onFocus: (...args: any[]) => void; onClick: (...args: any[]) => void; disabledHours: (...args: any[]) => void; disabledMinutes: (...args: any[]) => void; disabledSeconds: (...args: any[]) => void; format: string; }; foundation: InputFoundation; constructor(props: TimeInputProps); componentDidMount(): void; componentDidUpdate(prevProps: TimeInputProps): void; get adapter(): TimeInputAdapter; setRef: (node: HTMLElement) => void; handleClick: React.MouseEventHandler; handleFocus: React.FocusEventHandler; handleBlur: React.FocusEventHandler; handleChange: (v: string) => void; getInput(): React.JSX.Element; render(): React.JSX.Element; } export default TimeInput;