import { Dayjs } from 'dayjs'; import { DateRangePicker as RsDateRangePicker } from 'rsuite'; /** * DateRangePicker * Classification: custom (wraps rsuite `DateRangePicker`) * rsuite base: https://rsuitejs.com/components/date-range-picker/ * * A start/end date range picker built on rsuite's `DateRangePicker` (the same * control used in the product app), so the calendars, preset rail, time panel * with the "Now" shortcut and AM/PM toggle come straight from rsuite. This * wrapper keeps the ergonomic `@aistrike-dev/ui` surface: dayjs-friendly presets and * `valueType` conversion for `value`/`onChange`. * * Layout: preset shortcuts are arranged in a left rail; the footer bar carries * an Apply button (styled to match the Button atom) pinned to the left edge and * the selected range aligned to the right edge. * * Full-day default: the working times default to 12:00:00 AM (start) and * 11:59:59 PM (end), so picking the same day twice yields a range that spans the * whole day (00:00:00 → 23:59:59). Times set explicitly in the time panel are * preserved. * * rsuite is themed by the consumer (via `` / its CSS). Import * `rsuite/dist/rsuite-no-reset.min.css` once at the app root; Storybook does * this in `.storybook/preview.tsx`. */ export type DateRangeValueType = 'dayjs' | 'date' | 'string'; export type RangeBound = Dayjs | Date | string | null; export interface DateRange { start: T; end: T; } export interface DateRangePreset { label: string; getRange: () => { start: Dayjs | null; end: Dayjs | null; }; } export interface DateRangePickerProps { /** Controlled value. */ value?: DateRange; /** Uncontrolled initial value. */ defaultValue?: DateRange; /** Called with the committed range (converted to `valueType`). */ onChange?: (range: DateRange) => void; /** Preset shortcuts. Defaults to a canonical list. */ presets?: DateRangePreset[]; /** Label of the preset to select initially. */ defaultPreset?: string; /** Allow clearing the range (emits `{ start: null, end: null }`). */ allowAllTime?: boolean; /** Bias default presets toward future dates. */ futureMode?: boolean; minDate?: RangeBound; maxDate?: RangeBound; /** Output value type for `onChange`/`value`. Default `'dayjs'`. */ valueType?: DateRangeValueType; /** Display + string-value format (date-fns tokens). Default `'MMM d, yyyy'`. */ format?: string; /** Show the time panel (hh:mm:ss + Now). Default `true`. */ showTime?: boolean; /** 12-hour clock with an AM/PM toggle in the time panel. Default `true`. */ showMeridian?: boolean; /** `standalone` renders an inline trigger; `embedded` renders a full-width block with a label. */ variant?: 'standalone' | 'embedded'; disabled?: boolean; label?: string; /** Overlay placement (rsuite). */ placement?: React.ComponentProps['placement']; } export declare function DateRangePicker({ value, defaultValue, onChange, presets, defaultPreset, allowAllTime, futureMode, minDate, maxDate, valueType, format, showTime, showMeridian, variant, disabled, label, placement, }: DateRangePickerProps): import("react").JSX.Element;