UNPKG

@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.29 kB
/// <reference types="react" /> /** * 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 { ButtonHTMLProps, ButtonOptions } from "reakit"; import { CalendarStateReturn } from "./CalendarState"; export declare const useCalendarButton: { (options?: CalendarButtonOptions | 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; } & Pick<CalendarStateReturn, "focusNextMonth" | "focusPreviousMonth" | "focusNextYear" | "focusPreviousYear"> & { goto: CalendarGoto; } & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & { wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined; } & { disabled?: boolean | undefined; } & import("react").ButtonHTMLAttributes<any>, next: import("reakit").RoleOptions & { disabled?: boolean | undefined; focusable?: boolean | undefined; } & { unstable_clickOnEnter?: boolean | undefined; unstable_clickOnSpace?: boolean | undefined; } & Pick<CalendarStateReturn, "focusNextMonth" | "focusPreviousMonth" | "focusNextYear" | "focusPreviousYear"> & { goto: CalendarGoto; } & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & { wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined; } & { disabled?: boolean | undefined; } & import("react").ButtonHTMLAttributes<any>) => boolean; __keys: readonly any[]; __useOptions: (options: CalendarButtonOptions, htmlProps: ButtonHTMLProps) => CalendarButtonOptions; }; export declare const CalendarButton: import("../system").Component<"button", import("reakit").RoleOptions & { disabled?: boolean | undefined; focusable?: boolean | undefined; } & { unstable_clickOnEnter?: boolean | undefined; unstable_clickOnSpace?: boolean | undefined; } & Pick<CalendarStateReturn, "focusNextMonth" | "focusPreviousMonth" | "focusNextYear" | "focusPreviousYear"> & { goto: CalendarGoto; } & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & { wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined; } & { disabled?: boolean | undefined; } & import("react").ButtonHTMLAttributes<any>>; export declare type CalendarButtonOptions = ButtonOptions & Pick<CalendarStateReturn, "focusNextMonth" | "focusPreviousMonth" | "focusPreviousYear" | "focusNextYear"> & { goto: CalendarGoto; }; export declare type CalendarButtonHTMLProps = ButtonHTMLProps; export declare type CalendarButtonProps = CalendarButtonOptions & CalendarButtonHTMLProps; export declare type CalendarGoto = "nextMonth" | "previousMonth" | "nextYear" | "previousYear";