import Component from '@glimmer/component'; import { CommonArgs } from '../common'; import { EuiRangeInputArgs } from '../eui-range-input/types'; import { EuiRangeLevel } from '../eui-range-levels'; import { EuiRangeTick } from '../eui-range-ticks'; export interface EuiRangeArgs extends CommonArgs, Omit { compressed?: boolean; readOnly?: boolean; fullWidth?: boolean; id: string; /** * Create colored indicators for certain intervals */ levels?: EuiRangeLevel[]; step?: number; /** * Pass `true` to displays an extra input control for direct manipulation. * Pass `'inputWithPopover'` to only show the input but show the range in a dropdown. */ showInput?: boolean | 'inputWithPopover'; /** * Shows static min/max labels on the sides of the range slider */ showLabels?: boolean; /** * Shows a thick line from min to value */ showRange?: boolean; /** * Shows clickable tick marks and labels at the given interval (`step`/`tickInterval`) */ showTicks?: boolean; /** * Shows a tooltip styled value */ showValue?: boolean; /** * Specified ticks at specified values */ ticks?: EuiRangeTick[]; /** * Modifies the number of tick marks and at what interval */ tickInterval?: number; /** * Appends to the tooltip */ valueAppend?: Component; /** * Prepends to the tooltip */ valuePrepend?: Component; onChange?: (event: Event, isValid: boolean) => void; onBlur?: (event: Event) => void; onFocus?: (event: Event) => void; } export default class EuiRangeComponent extends Component { min: number; max: number; step: number; fullWidth: boolean; compressed: boolean; isLoading: boolean; showLabels: boolean; showInput: boolean | string; showRange: boolean; showTicks: boolean; showValue: boolean; levels: EuiRangeLevel[]; preventPopoverClose: boolean; id: string; isPopoverOpen: boolean; handleOnChange(e: Event & { currentTarget: HTMLInputElement; }): void; get isValid(): boolean; get digitTolerance(): number; get showInputOnly(): boolean; get canShowDropdown(): boolean; get showRangeTooltip(): boolean; onInputFocus(e: Event): void; onInputBlur(e: Event): void; closePopover(): void; setPreventPopoverClose(bool: boolean): void; }