import "../button/btn.css"; import "../input-text-base/index.css"; import "./index.css"; import { type DateValue } from "@internationalized/date"; import type { CombineAriaPropsWithCustomProps } from "../../utilities/reactAriaProps"; import React from "react"; import { type DatePickerProps as AriaDatePickerProps } from "react-aria-components"; export type DatePickerSize = "md" | "lg"; export type DatePickerDateValue = DateValue | string; export interface DatePickerProps { /** Helper text displayed below the component. Styled as error text when `invalid` is `true`. */ description?: string; /** Disables the input and calendar button. */ disabled?: boolean; /** Sets the first day of the week in the calendar. Defaults to locale-appropriate value. */ firstDayOfWeek?: "fri" | "mon" | "sat" | "sun" | "thu" | "tue" | "wed"; /** If `true`, the `label` text is rendered as an `aria-label` instead of a visible label element. */ hideLabel?: boolean; /** Whether the input is in an invalid state. */ invalid?: boolean; /** Callback that returns `true` for dates that should be visible but not selectable. */ isDateUnavailable?: (date: DateValue) => boolean; /** Accessible label for the field. */ label: string; /** Maximum selectable date. Accepts a DateValue or ISO date string. */ max?: DatePickerDateValue; /** Minimum selectable date. Accepts a DateValue or ISO date string. */ min?: DatePickerDateValue; /** Called when the selected date changes. */ onChange?: (value: DateValue | null) => void; /** If `true`, allows the value to be read but not changed. */ readOnly?: boolean; /** If `true`, appends an asterisk at the end of the label text. */ required?: boolean; /** The size of the date picker. */ size?: DatePickerSize; /** The controlled value. Accepts a DateValue or ISO date string. */ value?: DatePickerDateValue | null; } type AriaDatePickerPropsToOmit = "children" | "defaultOpen" | "defaultValue" | "granularity" | "hideTimeZone" | "hourCycle" | "pageBehavior" | "placeholderValue" | "shouldCloseOnSelect" | "shouldForceLeadingZeros" | "slot"; type AriaDatePickerPropsToInclude = "isOpen" | "name" | "onOpenChange"; export type DatePickerElementProps = CombineAriaPropsWithCustomProps, DatePickerProps, AriaDatePickerPropsToOmit, AriaDatePickerPropsToInclude>; /** * A date picker allows a user to select a particular date. * The input supports keyboard entry of individual day, month, and year segments; * the calendar offers month and year quick-pick overlays plus a "go to today" shortcut. * * The date picker automatically displays the value and calendar from the user's locale, * and does not require a specific date format. * * Values are exchanged as `DateValue` from `@internationalized/date`, but * `value`, `min`, and `max` also accept ISO date strings (`"YYYY-MM-DD"`) for * convenience. Restrict the selectable range with `min`/`max`, or mark * individual dates as unavailable via `isDateUnavailable`. * * @component * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-datepicker--docs | Storybook Documentation} */ export declare function DatePicker({ className, description, disabled, firstDayOfWeek, hideLabel, invalid, isDateUnavailable, label, max, min, onChange, readOnly, required, size, value, ...restProps }: DatePickerElementProps): React.JSX.Element; export declare namespace DatePicker { var displayName: string; } export {}; //# sourceMappingURL=DatePicker.d.ts.map