export type TimeRangeMode = "relative" | "absolute"; export type TimeRange = { mode: TimeRangeMode; relative?: string; from: number; to: number; }; export type TimeRangePreset = string | { token: string; label?: string; durationMs?: number; }; import type { Snippet } from "svelte"; type TimeRangePickerProps = { value?: TimeRange; defaultValue?: TimeRange; onChange?: (value: TimeRange) => void; presets?: TimeRangePreset[]; min?: number; max?: number; locale?: string; timeFormat?: "24" | "12"; timeStep?: number; calendarMonths?: 1 | 2; disabled?: boolean; label?: string; placement?: "bottom-start" | "bottom-end" | "top-start" | "top-end"; align?: "start" | "end" | "center"; size?: "sm" | "md" | "lg"; class?: string; formatRange?: (value: TimeRange, locale: string) => string; formatPresetLabel?: (token: string, locale: string) => string; /** * Optional consumer controls rendered in the Custom tab, directly above the * From/To fields (e.g. a "date basis" radio group). The Custom tab is * staged behind Apply, so treat whatever this snippet edits as a DRAFT: * reseed it from `onOpenChange(true)` and commit it from `onChange` when * the emitted value has `mode: "absolute"` (that emit only happens on * Apply). Cancel / Escape / outside click emit nothing. */ customExtra?: Snippet; /** Fires whenever the panel opens (`true`) or closes (`false`). */ onOpenChange?: (open: boolean) => void; }; declare const TimeRangePicker: import("svelte").Component; type TimeRangePicker = ReturnType; export default TimeRangePicker; //# sourceMappingURL=TimeRangePicker.svelte.d.ts.map