import { Component } from 'react'; import type { Moment } from 'moment-timezone'; import { ApplyLocaleContext } from '@instructure/ui-i18n'; import { Select } from '@instructure/ui-select/latest'; import type { SelectProps } from '@instructure/ui-select/latest'; import type { TimeSelectProps, TimeSelectState, TimeSelectOptions } from './props'; type GetOption = (field: F, value?: TimeSelectOptions[F], options?: TimeSelectOptions[]) => TimeSelectOptions | undefined; /** --- category: components --- A component used to select a time value. **/ declare class TimeSelect extends Component { context: React.ContextType; static readonly componentId = "TimeSelect"; static allowedProps: readonly (keyof { renderLabel: import("@instructure/shared-types").Renderable; defaultToFirstOption?: boolean; value?: string; defaultValue?: string; id?: string; format?: string; step?: 5 | 10 | 15 | 20 | 30 | 60; interaction?: "enabled" | "disabled" | "readonly"; placeholder?: string; isRequired?: boolean; isInline?: boolean; width?: string; optionsMaxWidth?: string; visibleOptionsCount?: number; messages?: import("@instructure/ui-form-field/types/exports/b.js").FormMessage[]; placement?: import("@instructure/ui-position").PlacementPropValues; constrain?: import("@instructure/ui-position").PositionConstraint; mountNode?: import("@instructure/ui-position").PositionMountNode; onChange?: (event: React.SyntheticEvent, data: { value: string; inputText: string; }) => void; onFocus?: (event: React.FocusEvent) => void; onBlur?: (event: React.FocusEvent) => void; onShowOptions?: (event: React.SyntheticEvent) => void; onHideOptions?: (event: React.SyntheticEvent) => void; inputRef?: (inputElement: HTMLInputElement | null) => void; listRef?: (listElement: HTMLUListElement | null) => void; renderEmptyOption?: import("@instructure/shared-types").Renderable; renderBeforeInput?: import("@instructure/shared-types").Renderable; renderAfterInput?: import("@instructure/shared-types").Renderable; locale?: string; timezone?: string; allowNonStepInput?: boolean; onInputChange?: (event: React.ChangeEvent, value: string, valueAsISOString?: string) => void; allowClearingSelection?: boolean; })[]; static defaultProps: { defaultToFirstOption: boolean; format: string; step: number; isRequired: boolean; isInline: boolean; visibleOptionsCount: number; placement: string; constrain: string; renderEmptyOption: string; allowNonStepInput: boolean; allowClearingSelection: boolean; }; static contextType: import("react").Context<{ locale?: string; timezone?: string; }>; ref: Select | null; private readonly _emptyOptionId; constructor(props: TimeSelectProps); componentDidMount(): void; focus(): void; blur(): void; get _select(): Select | null; get isControlled(): boolean; get interaction(): import("@instructure/ui-react-utils").InteractionType; get focused(): boolean | null; get id(): string | null; locale(): string; timezone(): string; componentDidUpdate(prevProps: TimeSelectProps): void; getFormattedId(date: Moment): string; getInitialState(): TimeSelectState; getInitialOption(options: TimeSelectOptions[]): TimeSelectOptions | undefined; getOption: GetOption; getBaseDate(): Moment; generateOptions(): TimeSelectOptions[]; filterOptions(inputValue: string): TimeSelectOptions[]; handleRef: (node: Select) => void; handleBlur: (event: React.FocusEvent) => void; handleInputChange: (event: React.ChangeEvent) => void; onKeyDown: (event: React.KeyboardEvent) => void; handleShowOptions: (event: React.SyntheticEvent) => void; handleBlurOrEsc: SelectProps['onRequestHideOptions']; handleSelectOption: SelectProps['onRequestSelectOption']; handleHighlightOption: SelectProps['onRequestHighlightOption']; renderOptions(): import("@emotion/react/jsx-runtime").JSX.Element | import("@emotion/react/jsx-runtime").JSX.Element[]; renderEmptyOption(): import("@emotion/react/jsx-runtime").JSX.Element; parseInputText: (inputValue: string) => Moment; render(): import("@emotion/react/jsx-runtime").JSX.Element; } export { TimeSelect }; export default TimeSelect; //# sourceMappingURL=index.d.ts.map