import { FocusEventProps } from '../../shared/events'; import { GlobalProps } from '../../shared/global'; import { InputProps } from '../../shared/input'; export interface TimePickerProps extends GlobalProps, InputProps, FocusEventProps { /** * Times that can be selected. * * A comma-separated list of allowed time ranges. Whitespace is allowed after commas. * * The default '' allows all times. * * Each time range is in `HH:MM--HH:MM` format. * * The end of the range is exclusive, so `09:00--10:00` allows selecting `09:00` but not `10:00`. * * Either side of `--` can be omitted to create an unbounded range. * * Whitespace is allowed either side of `--`. * * @default '' * * @example * `09:00--10:00, 13:00--14:00` - assuming the step is 1 hour, this allows selecting `09:00` or `13:00`. * `12:00--` - allows selecting `12:00` and all times after it. */ allow?: string; /** * Times that cannot be selected. This subtracts from `allow`. * * A comma-separated list of allowed time ranges. Whitespace is allowed after commas. * * The default '' has no effect on `allow`. * * Each time range is in `HH:MM--HH:MM` format. * * The end of the range is exclusive, so `09:00--10:00` disallows selecting `09:00` but not `10:00`. * * Either side of `--` can be omitted to create an unbounded range. * * Whitespace is allowed either side of `--`. * * @default '' * * @example * `09:00--10:00, 13:00--14:00` - assuming the step is 1 hour, this disallows selecting `09:00` or `13:00`. */ disallow?: string; /** * Default selected value. * * The default, '', means no time is selected. * * The value must be in `HH:MM` format. * * If the provided value is invalid, '' is used as the value. * * @default '' */ defaultValue?: string; /** * Current selected value. * * The default, '', means no time is selected. * * The value must be in `HH:MM` format. * * If the provided value is invalid, '' is used as the value. * * @default '' */ value?: string; /** * The step between selectable times, in seconds. * * @default 60 */ step?: number; }