"use client"; // Adapted from Adobe React Spectrum starters (Apache-2.0). // Modified: owned composition, local runtime, scoped CSS and customization. // See THIRD_PARTY_NOTICES.md. import { DateField as AriaDateField, type DateFieldProps as AriaProps, type DateValue, DateInput, DateSegment, Label, Text, FieldError, type ValidationResult, composeRenderProps, } from "./react-aria-runtime.js"; export { parseDate, parseDateTime, Time } from "./react-aria-runtime.js"; export interface DateFieldProps extends Omit< AriaProps, "children" > { label: string; description?: string; errorMessage?: string | ((validation: ValidationResult) => string); } export function DateField({ label, description, errorMessage, className, ...props }: DateFieldProps) { return ( `ynr-date-field ynr-aria ${value ?? ""}`, )} > {(segment) => ( )} {description && ( {description} )} {errorMessage} ); }