UNPKG

@instawork/design-system

Version:

The design system for Instawork's web apps

36 lines (35 loc) 1.4 kB
import { Duration } from 'luxon'; import { CustomComponent } from '../common'; import { TimeRangeComponent } from './time-range.component'; import { TimeRangeDurationState } from './time-range-duration-state'; import './time-range-display.component.scss'; export interface TimeRangeDisplayElement extends HTMLElement { } declare global { interface HTMLElementTagNameMap { 'iw-time-range-display': TimeRangeDisplayElement; } interface JQuery { iwTimeRangeDisplay(): JQuery<TimeRangeDisplayElement>; } } export declare class TimeRangeDisplayComponent extends CustomComponent<TimeRangeDisplayElement> { static readonly COMPONENT_SELECTOR = "iw-time-range-display"; static readonly TEMPLATE: string; static loadPlugin(): void; get srcSelector(): string; get msgInfoCrossesMidnight(): string; get emptyState(): string; readonly $src: JQuery; readonly srcCtrl: TimeRangeComponent; readonly $current: JQuery; readonly $diff: JQuery; readonly $info: JQuery; readonly $infoPopoverButton: JQuery<HTMLButtonElement>; constructor($el: JQuery); protected onSrcChange(): void; protected updateCurrentHours(duration: Duration): void; protected updateDiffHours(duration: Duration): void; protected updateInfo(state: TimeRangeDurationState): void; protected infoMessageContent(type: string, msg: string): JQuery; }