UNPKG

@payfit/unity-components

Version:

116 lines (115 loc) 2.77 kB
import { CalendarDate } from '@internationalized/date'; import { ReactElement } from 'react'; import { DateFieldProps } from 'react-aria-components/DateField'; export declare const dateSegment: import('tailwind-variants').TVReturnType<{ isPlaceholder: { true: string[]; false: string; }; isLiteral: { true: string; false: string; }; }, undefined, string[], { isPlaceholder: { true: string[]; false: string; }; isLiteral: { true: string; false: string; }; }, undefined, import('tailwind-variants').TVReturnType<{ isPlaceholder: { true: string[]; false: string; }; isLiteral: { true: string; false: string; }; }, undefined, string[], unknown, unknown, undefined>>; export declare const dateInput: import('tailwind-variants').TVReturnType<{ isInvalid: { true: { base: string; state: string; }; }; isReadOnly: { true: { base: string; }; }; isDisabled: { true: { base: string; }; }; }, { base: string; input: string; state: string; }, undefined, { isInvalid: { true: { base: string; state: string; }; }; isReadOnly: { true: { base: string; }; }; isDisabled: { true: { base: string; }; }; }, { base: string; input: string; state: string; }, import('tailwind-variants').TVReturnType<{ isInvalid: { true: { base: string; state: string; }; }; isReadOnly: { true: { base: string; }; }; isDisabled: { true: { base: string; }; }; }, { base: string; input: string; state: string; }, undefined, unknown, unknown, undefined>>; export interface DateInputProps extends DateFieldProps<CalendarDate> { /** Element to display after the input field */ suffix?: ReactElement; /** Whether the field is required */ isRequired?: boolean; /** Whether the field is in an invalid state */ isInvalid?: boolean; /** Whether the field is in a loading state */ isLoading?: boolean; /** Whether the field is disabled */ isDisabled?: boolean; /** Whether the field is read-only */ isReadOnly?: boolean; /** Clear button click handler */ onClearButtonPress?: () => void; } export declare function DateInput({ isLoading, isInvalid, isReadOnly, isDisabled, onClearButtonPress, }: DateInputProps): import("react/jsx-runtime").JSX.Element; export declare namespace DateInput { var displayName: string; }