@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
111 lines (110 loc) • 4.43 kB
TypeScript
import { ReactNodeOrFunction } from "../../utils/index.types.js";
import { ThemeProps } from "../../core/system/index.types.js";
import { Component, GenericsComponent, HTMLStyledProps } from "../../core/components/index.types.js";
import "../../core/index.js";
import { CalendarStyle } from "./calendar.style.js";
import { UseCalendarDayProps, UseCalendarProps } from "./use-calendar.js";
import { SelectRootProps } from "../select/select.js";
import "../../index.js";
import * as react35 from "react";
import { ReactElement } from "react";
//#region src/components/calendar/calendar.d.ts
interface CalendarRootProps<Multiple extends boolean = false, Range extends boolean = false> extends Omit<HTMLStyledProps, "defaultValue" | "onChange">, ThemeProps<CalendarStyle>, UseCalendarProps<Multiple, Range>, Pick<CalendarMonthProps, "day"> {
/**
* Props for the button component.
*/
buttonProps?: HTMLStyledProps<"button">;
/**
* Props for the control component.
*/
controlProps?: CalendarControlProps;
/**
* Props for the day component.
*/
dayProps?: Omit<CalendarDayProps, "value">;
/**
* Props for the month component.
*/
monthProps?: CalendarMonthProps;
/**
* Props for the month select component.
*/
monthSelectProps?: CalendarMonthSelectProps;
/**
* Props for the navigation component.
*/
navigationProps?: Omit<CalendarNavigationProps, "children">;
/**
* Props for the next button component.
*/
nextButtonProps?: CalendarNextButtonProps;
/**
* Props for the prev button component.
*/
prevButtonProps?: CalendarPrevButtonProps;
/**
* Props for the select component.
*/
selectProps?: SelectRootProps;
/**
* Props for the weekday component.
*/
weekdayProps?: HTMLStyledProps<"th">;
/**
* Props for the weekdays component.
*/
weekdaysProps?: HTMLStyledProps<"tr">;
/**
* Props for the week component.
*/
weekProps?: HTMLStyledProps<"tr">;
/**
* Props for the weeks component.
*/
weeksProps?: HTMLStyledProps<"tbody">;
/**
* Props for the year select component.
*/
yearSelectProps?: CalendarYearSelectProps;
}
declare const CalendarPropsContext: react35.Context<Partial<CalendarRootProps<false, false>> | undefined>, useCalendarPropsContext: () => Partial<CalendarRootProps<false, false>> | undefined;
/**
* `Calendar` is a component for displaying or selecting dates in a calendar.
*
* @see https://yamada-ui.com/docs/components/calendar
*/
declare const CalendarRoot: GenericsComponent<{
<Multiple extends boolean = false, Range extends boolean = false>(props: CalendarRootProps<Multiple, Range>): ReactElement;
}>;
interface CalendarNavigationProps extends HTMLStyledProps<"nav"> {}
declare const CalendarNavigation: Component<"nav", CalendarNavigationProps>;
interface CalendarControlProps extends Omit<HTMLStyledProps, "children"> {
/**
* The control children to use.
*/
children?: ReactNodeOrFunction<{
month: Date;
}>;
}
declare const CalendarControl: Component<"div", CalendarControlProps>;
interface CalendarPrevButtonProps extends HTMLStyledProps<"button"> {}
declare const CalendarPrevButton: Component<"button", CalendarPrevButtonProps>;
interface CalendarNextButtonProps extends HTMLStyledProps<"button"> {}
declare const CalendarNextButton: Component<"button", CalendarNextButtonProps>;
interface CalendarYearSelectProps extends SelectRootProps {}
declare const CalendarYearSelect: Component<"div", CalendarYearSelectProps>;
interface CalendarMonthSelectProps extends SelectRootProps {}
declare const CalendarMonthSelect: Component<"div", CalendarMonthSelectProps>;
interface CalendarMonthProps extends Omit<HTMLStyledProps<"table">, "children"> {
/**
* The day component to use.
*/
day?: ReactNodeOrFunction<{
value: Date;
}>;
}
declare const CalendarMonth: Component<"table", CalendarMonthProps>;
interface CalendarDayProps extends Omit<HTMLStyledProps<"td">, "value">, UseCalendarDayProps {}
//#endregion
export { CalendarControl, CalendarControlProps, CalendarMonth, CalendarMonthProps, CalendarMonthSelect, CalendarMonthSelectProps, CalendarNavigation, CalendarNavigationProps, CalendarNextButton, CalendarNextButtonProps, CalendarPrevButton, CalendarPrevButtonProps, CalendarPropsContext, CalendarRoot, CalendarRootProps, CalendarYearSelect, CalendarYearSelectProps, useCalendarPropsContext };
//# sourceMappingURL=calendar.d.ts.map