import { FieldBaseProps } from "../FieldBase/FieldBase.cjs"; import { WidthProp } from "@marigold/system"; import { ReactElement, Ref } from "react"; import RAC from "react-aria-components"; import { DateValue } from "react-aria-components/DateField"; type RemovedProps = 'className' | 'isRequired' | 'isDisabled' | 'isInvalid' | 'isReadOnly' | 'label' | 'children' | 'style'; export interface DateFieldProps extends Omit, RemovedProps>, Pick, 'label' | 'addon' | 'description' | 'errorMessage'> { /** * Visual variant of the component. Which values exist is defined by the theme * and listed in the "Appearance" section of the component's documentation. */ variant?: string; /** * Size of the component. Which values exist is defined by the theme and listed * in the "Appearance" section of the component's documentation. */ size?: string; /** * Optional element (e.g., button or icon) rendered inside the DateField. */ action?: ReactElement; /** * If `true`, the date field is required. * @default false */ required?: RAC.DateFieldProps['isRequired']; /** * If `true`, the date field is disabled. * @default false */ disabled?: RAC.DateFieldProps['isDisabled']; /** * If `true`, the field is considered invalid and if set the errorMessage is shown instead of the `description`. * @default false */ error?: RAC.DateFieldProps['isInvalid']; /** * If `true`, the date field is readOnly. * @default false */ readOnly?: RAC.DateFieldProps['isReadOnly']; /** * Sets the width of the field. You can see allowed tokens here: https://tailwindcss.com/docs/width * * Numeric/scale values are spacing-scale tokens, not pixels: `width={64}` * resolves to `calc(var(--spacing) * 64)` ~= 16rem (256px), not 64px. * @default 'full' */ width?: WidthProp['width']; } declare const DateFieldBase: ({ variant, size, action, disabled, required, error, readOnly, onChange, ref, ...rest }: DateFieldProps & { ref?: Ref; }) => import("react").JSX.Element; export { DateFieldBase as DateField };