import "./date_segments_field.css"; import type * as React from "react"; import { useRender } from "@base-ui/react/use-render"; import { type StyleProps } from "./style_props"; import { SegmentLabels, SegmentsConfig } from "./date_segments"; export interface DateSegmentsProps extends StyleProps { /** Canonical value (`YYYY-MM-DD` / `YYYY-MM-DDTHH:mm`), `""` when empty. */ value: string; onChange: (value: string) => void; /** Layout + value↔buffer mapping; see `dateSegmentsConfig`. */ config: SegmentsConfig; /** Accessible names per segment. */ segmentLabels: SegmentLabels; disabled?: boolean; autoFocus?: boolean; testID?: string; /** Accessible name for the segment group (e.g. "Start date"). */ accessibilityLabel?: string; /** Fires when a segment in this group gains focus. */ onFocus?: () => void; /** Fires when a segment in this group loses focus. */ onBlur?: () => void; /** Escape pressed in a segment (web) — an inline editor cancels its session. */ onEscape?: () => void; /** Alt+ArrowDown pressed in a segment (web) — open the calendar popover * (the segment-field convention; plain ArrowDown steps the spinbutton). */ onOpenPicker?: () => void; /** Reports whether the buffer holds a PARTIAL entry — non-empty but not yet a * complete valid date (a typed day with no year). Complete values emit * through `onChange`; an emptied buffer emits `""`; between the two, this is * the only signal — an inline editor blocks its commit on it. */ onIncompleteChange?: (incomplete: boolean) => void; ref?: React.Ref; render?: useRender.RenderProp; } /** * Borderless segmented date / datetime editor — one editable segment per locale * field (in locale order, 12/24h derived) plus literal separators. Emits a canonical * ISO value only once the segments form a complete, valid date. The bordered frame, * focus ring, and calendar button live in {@link DateField}, which composes one (or * two, for a range) of these. * * Segment editing (digits, arrows, AM/PM) is keyboard-driven. */ export declare function DateSegments(props: DateSegmentsProps): React.ReactElement>;