@renderlesskit/react
Version:
Collection of headless components/hooks that are accessible, composable, customizable from low level to build your own UI & Design System powered by Reakit
58 lines (57 loc) • 3.59 kB
TypeScript
/**
* All credit goes to [React Spectrum](https://github.com/adobe/react-spectrum)
* We improved the Calendar from Aria [useCalendarBase](https://github.com/adobe/react-spectrum/blob/main/packages/%40react-aria/calendar/src/useCalendarBase.ts)
* to work with Reakit System
*/
import * as React from "react";
import { ButtonHTMLProps, ButtonOptions } from "reakit";
import { CalendarStateReturn } from "./CalendarState";
import { RangeCalendarStateReturn } from "./RangeCalendarState";
export declare const useCalendarCellButton: {
(options?: CalendarCellButtonOptions | undefined, htmlProps?: ButtonHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): ButtonHTMLProps;
unstable_propsAreEqual: (prev: import("reakit").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & {
unstable_clickOnEnter?: boolean | undefined;
unstable_clickOnSpace?: boolean | undefined;
} & Partial<Pick<RangeCalendarStateReturn, "anchorDate">> & Pick<CalendarStateReturn, "month" | "isDisabled" | "dateValue" | "isFocused" | "focusedDate" | "isInvalidDateRange" | "isRangeCalendar" | "setFocusedDate" | "selectDate"> & {
date: Date;
} & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
} & React.ButtonHTMLAttributes<any>, next: import("reakit").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & {
unstable_clickOnEnter?: boolean | undefined;
unstable_clickOnSpace?: boolean | undefined;
} & Partial<Pick<RangeCalendarStateReturn, "anchorDate">> & Pick<CalendarStateReturn, "month" | "isDisabled" | "dateValue" | "isFocused" | "focusedDate" | "isInvalidDateRange" | "isRangeCalendar" | "setFocusedDate" | "selectDate"> & {
date: Date;
} & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
} & React.ButtonHTMLAttributes<any>) => boolean;
__keys: readonly any[];
__useOptions: (options: CalendarCellButtonOptions, htmlProps: ButtonHTMLProps) => CalendarCellButtonOptions;
};
export declare const CalendarCellButton: import("../system").Component<"span", import("reakit").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & {
unstable_clickOnEnter?: boolean | undefined;
unstable_clickOnSpace?: boolean | undefined;
} & Partial<Pick<RangeCalendarStateReturn, "anchorDate">> & Pick<CalendarStateReturn, "month" | "isDisabled" | "dateValue" | "isFocused" | "focusedDate" | "isInvalidDateRange" | "isRangeCalendar" | "setFocusedDate" | "selectDate"> & {
date: Date;
} & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
} & React.ButtonHTMLAttributes<any>>;
export declare type CalendarCellButtonOptions = ButtonOptions & Partial<Pick<RangeCalendarStateReturn, "anchorDate">> & Pick<CalendarStateReturn, "focusedDate" | "selectDate" | "setFocusedDate" | "isDisabled" | "month" | "dateValue" | "isFocused" | "isRangeCalendar" | "isInvalidDateRange"> & {
date: Date;
};
export declare type CalendarCellButtonHTMLProps = ButtonHTMLProps;
export declare type CalendarCellButtonProps = CalendarCellButtonOptions & CalendarCellButtonHTMLProps;