UNPKG

@yamada-ui/calendar

Version:

Yamada UI calendar component

31 lines (28 loc) 1.44 kB
import { HTMLUIProps, ThemeProps, ComponentArgs } from '@yamada-ui/core'; import { RefAttributes, ReactElement } from 'react'; import { CalendarHeaderProps } from './calendar-header.js'; import { MonthProps } from './month.js'; import { MonthListProps } from './month-list.js'; import { MaybeValue, UseCalendarProps } from './use-calendar.js'; import { YearListProps } from './year-list.js'; import '@yamada-ui/button'; import '@yamada-ui/icon'; import './use-calendar-header.js'; import 'dayjs'; interface CalendarOptions { /** * Props for calendar header element. */ headerProps?: HTMLUIProps; } interface CalendarBaseProps extends Omit<HTMLUIProps, "defaultValue" | "onChange" | "value">, ThemeProps<"Calendar">, CalendarOptions, Omit<CalendarHeaderProps, "index" | "label">, Pick<YearListProps, "yearGridProps" | "yearProps">, Pick<MonthListProps, "monthGridProps" | "monthProps">, Pick<MonthProps, "dayProps" | "tableProps" | "weekdayProps"> { } interface CalendarProps<Y extends MaybeValue = Date> extends CalendarBaseProps, UseCalendarProps<Y> { } /** * `Calendar` is a component for displaying or selecting dates in a calendar. * * @see Docs https://yamada-ui.com/components/data-display/calendar */ declare const Calendar: (<Y extends MaybeValue = Date>(props: CalendarProps<Y> & RefAttributes<HTMLDivElement>) => ReactElement) & ComponentArgs; export { Calendar, type CalendarBaseProps, type CalendarProps };