import { EventEmitter } from "../../stencil-public-runtime"; import { IcAriaLive, IcDateValueFormat, IcDisableTimeSelection, IcInformationStatusOrEmpty, IcSizes, IcThemeMode, IcTimeFormat } from "../../utils/types"; import "../../../../web-components/src/components/ic-input-container/ic-input-container"; import "../../../../web-components/src/components/ic-input-component-container/ic-input-component-container"; import "../../../../web-components/src/components/ic-input-label/ic-input-label"; import "../../../../web-components/src/components/ic-toggle-button-group/ic-toggle-button-group"; import "../../../../web-components/src/components/ic-toggle-button/ic-toggle-button"; import "../../../../web-components/src/components/ic-input-validation/ic-input-validation"; import "../../../../web-components/src/components/ic-button/ic-button"; import "../../../../web-components/src/components/ic-typography/ic-typography"; import "../../../../web-components/src/components/ic-link/ic-link"; /** * @slot helper-text - Content is set as the helper text for the time input. */ export declare class TimeInput { private DEFAULT_TIME_FORMAT; private TOGGLE_BUTTON_SELECTOR; private ARIA_INVALID; private ARIA_LABEL; private ARIA_LABELLED_BY; private assistiveHintId; private hourInputEl?; private minuteInputEl?; private secondInputEl?; private millisecondInputEl?; private periodToggleEl?; private defaultHelperText; private EVENT_OBJECT_STRING; private FIT_TO_VALUE; private initialValue; private inputCompContainerEl; private inputsInOrder; private isValidHour; private isValidMinute; private isValidSecond; private isValidMillisecond; private isValidTime; private isTimeSetFromKeyboardEvent; private preventAutoFormatting; private preventHourInput; private preventMinuteInput; private preventSecondInput; private preventMillisecondInput; private previousSelectedTime; private selectedTime; private selectedTimeInfoEl?; private screenReaderInfoId; private selectedTimeInfoId; private externalSetTime; private clearInput; private maxTime; private minTime; private previousHour; private previousMinute; private previousSecond; private previousMillisecond; private previousPeriod; el: HTMLIcTimeInputElement; invalidTimeText: string; clockFocused: boolean; clearButtonFocused: boolean; removeLabelledBy: boolean; hour: string; minute: string; second: string; millisecond: string; period: string; watchInputHandler(): void; private isSSSFormat; /** * If `true`, the disabled state will be set. */ disabled: boolean; watchDisabledHandler(): void; /** * An array of objects with start and end values that will be disabled in the time input. The times can be in any format supported as `timeFormat`, in ISO 8601 time string format (`HH:MM:SS`) or as a JavaScript `Date` object. */ disableTimes: IcDisableTimeSelection[]; /** * If `true`, every individual input field completed will emit an icTimeChange event. */ emitTimePartChange?: boolean; /** * The helper text that will be displayed for additional field guidance. This will default to the text "Use format" along with the `timeFormat` value. */ helperText: string | null; watchHelperTextHandler(useDefault?: boolean): void; /** * If `true`, the helper text will be visually hidden, but still read out by screenreaders. */ hideHelperText: boolean; /** * If `true`, the label will be visually hidden, but will still be read out by screen readers. */ hideLabel?: boolean; /** * The ID for the input. */ inputId: string; /** * The text to display as the validation message when an invalid time is entered. */ invalidTimeMessage: string; /** * The label for the time input. */ label: string; /** * The latest time that will be allowed. The value can be in any format supported as `timeFormat`, in ISO 8601 time string format (`HH:MM:SS`) or as a JavaScript `Date` object. */ max: string | Date; watchMaxHandler(): void; /** * The earliest time that will be allowed. The value can be in any format supported as `timeFormat`, in ISO 8601 time string format (`HH:MM:SS`) or as a JavaScript `Date` object. */ min: string | Date; watchMinHandler(): void; /** * The name of the control, which is submitted with the form data. */ name: string; /** * If `true`, the input will require a value. */ required: boolean; watchRequiredHandler(): void; /** * If `true`, the time input will show an AM/PM toggle when in 12-hour time period. */ showAmPmToggle?: boolean; /** * If `true`, a button which clears the time input when clicked will be displayed. */ showClearButton?: boolean; /** * @internal If `true`, a button which displays the clock view when clicked will be displayed. */ showClockButton?: boolean; /** * The size of the time input to be displayed. */ size: IcSizes; /** * Sets the time picker to the dark or light theme colors. "inherit" will set the color based on the system settings or ic-theme component. */ theme?: IcThemeMode; /** * The format in which the time will be displayed. */ timeFormat: IcTimeFormat; watchTimeFormatHandler(): void; /** * The time period format: "12" for 12-hour, "24" for 24-hour. Defaults to "24". */ timePeriod: "12" | "24"; /** * The value of the time input. The value can be in any format supported as `timeFormat`, in ISO 8601 time string format (`HH:MM:SS`) or as a JavaScript `Date` object. */ value?: IcDateValueFormat; /** * The value of the `aria-live` attribute on the validation message. */ validationAriaLive: IcAriaLive; /** * The validation status - e.g. 'error' | 'warning' | 'success'. This will override the built-in time validation. */ validationStatus: IcInformationStatusOrEmpty; /** * The text to display as the validation message. This will override the built-in time validation. */ validationText?: string; /** * @internal Emitted when the clock is opened. */ clockButtonClicked: EventEmitter<{ value: Date | null; }>; /** * Emitted when the input loses focus. */ icBlur: EventEmitter<{ value: Date | null; }>; /** * Emitted when the value has changed. */ icTimeChange: EventEmitter<{ value: string | null; timeObject: { hour: string | null; minute: string | null; second: string | null; millisecond: string | null; period: string | null; }; }>; /** * Emitted when the input gains focus. */ icFocus: EventEmitter<{ value: Date | null; }>; disconnectedCallback(): void; componentWillLoad(): void; componentDidLoad(): void; componentWillUpdate(): void; componentDidRender(): void; /** * Returns the value as a Date object * @returns Date */ getTime(): Promise; /** * @internal Used to enable other components to invoke an icTimeChange event from the input. */ triggerIcTimeChange(t: Date | null): Promise; private setInputPasteValue; private isHHMMFormat; private isKeyboardOrEvent; private setTimeValidity; private setInputValue; private setPreventInput; private setValidationMessage; private formatTime; private handleInput; private handleKeyDown; private handleFocus; private handleBlur; private handleUpDownArrowKeyPress; private handleTimeChange; private setValueAndEmitChange; private convertTo24Hour; private emitIcTimeChange; private setTime; private setAriaInvalid; private handleClear; private notifyScreenReaderSelectedTime; private setFitToValueStyling; private handleHostBlur; private handleHostFocus; private handleFormReset; private preventInput; private moveToNextInput; private moveToPreviousInput; private autocompleteInput; private convertToTime; private setInputsInOrder; private updateInputValues; private removeAriaLabelledBy; private setAriaLabelledBy; private getInputsInOrder; private getDescOfInputsOrder; private getScreenReaderInfo; private notifyScreenReader; private handlePaste; private handleClearFocus; private handleClearBlur; private handleClockFocus; private handleClockBlur; private isPastedStringTimeValid; private setPastedValueAndValidation; private handleAMPM; render(): any; }