import { DataTrackingId, LayoutUtilProps, Size } from '../../types'; import { YearlessDate, YearlessDateMode } from './types'; import { ReactElement, ReactNode, ComponentPropsWithoutRef } from 'react'; import { FieldLabelProps } from '../FieldLabel'; import { HelperProps } from '../../internal/components'; export type DateFieldYearlessProps = Omit, "onChange" | "value" | "defaultValue" | "ref" | "size" | "type" | "onFocus" | "onBlur"> & LayoutUtilProps & { /** * The controlled value of the date field */ value?: YearlessDate | null; /** * The default value for uncontrolled usage */ defaultValue?: YearlessDate | null; /** * The function to call when the date value changes */ onChange?: DateFieldYearlessChangeHandler; /** * The date format mode (mm/dd or dd/mm) */ mode?: YearlessDateMode; /** * Whether the field is required */ required?: boolean; /** * The minimum allowed date */ minDate?: YearlessDate | null; /** * The maximum allowed date */ maxDate?: YearlessDate | null; /** * Configuration for unavailable dates */ unavailable?: { /** * Array of dates that are not selectable */ dates?: YearlessDate[]; }; /** * Whether the picker is disabled */ disablePicker?: boolean; /** * Error state for the field. Pass `true` to indicate error styling without a message. * Pass a string, string[], or ReactElement (deprecated) for error messages. */ error?: boolean | string | ReactElement | string[]; /** * Label for the field. * Omitting `label` is deprecated — it will be required in v4.0.0. Use `hideLabel` to visually hide it. * Passing `ReactNode` is deprecated — use a plain string with inline markdown instead. */ label?: FieldLabelProps["children"]; /** * Props for the label component */ labelProps?: FieldLabelProps; /** * Description text for the field */ description?: HelperProps["description"]; /** * @deprecated No longer used. Error messages always use `aria-live="assertive"`. */ errorAriaLive?: HelperProps["errorAriaLive"]; /** * Warning message(s) to display. Supports a single string or an array of strings. */ warning?: string | string[]; /** * Size of the input */ size?: Extract; /** * Whether the field is disabled */ disabled?: boolean; /** * Whether the field is in loading state */ loading?: boolean; /** * Additional info content */ moreInfo?: ReactNode; /** * Whether to disable the format hint */ disableHint?: boolean; /** * When `true`, hides the visible label and moves it to `aria-label` on the input. * @default false */ hideLabel?: boolean; /** * Function to call when the field is focused */ onFocus?: (event: React.FocusEvent) => void; /** * Function to call when the field is blurred */ onBlur?: (event: React.FocusEvent) => void; } & DataTrackingId; /** * Represents a change event for the DateFieldYearless component */ export type DateFieldYearlessChange = { /** * The current date value */ value: YearlessDate | null; /** * Whether the input is valid */ isInputValid: boolean; /** * Whether the input is empty */ isInputEmpty: boolean; /** * Whether the overall value is valid */ isValid: boolean; }; /** * Handler function for DateFieldYearless change events */ export type DateFieldYearlessChangeHandler = (change: DateFieldYearlessChange) => void; /** * DateFieldYearless component for inputting dates without year information. * * Features: * - Supports both controlled and uncontrolled usage * - Supports different date formats (mm/dd or dd/mm) * - Supports layout utilities for positioning and spacing * * @example * console.log('Date changed:', change.value)} * /> */ export declare const DateFieldYearless: { (props: DateFieldYearlessProps): import("react/jsx-runtime").JSX.Element; displayName: string; };