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

286 lines (285 loc) 18.2 kB
import * as React from "react"; import { ButtonHTMLProps, ButtonOptions, CompositeItemHTMLProps, CompositeItemOptions } from "reakit"; import { TimePickerColumnStateReturn } from "./TimePickerColumnState"; export declare type TimePickerColumnValueOptions = ButtonOptions & CompositeItemOptions & Pick<TimePickerColumnStateReturn, "selected" | "move" | "setSelected" | "visible" | "restoreOldTime" | "updateOldTime" | "columnType" | "date" | "popover"> & { value: number; }; export declare type TimePickerColumnValueHTMLProps = ButtonHTMLProps & CompositeItemHTMLProps; export declare type TimePickerColumnValueProps = TimePickerColumnValueOptions & TimePickerColumnValueHTMLProps; export declare const useTimePickerColumnValue: { (options?: TimePickerColumnValueOptions | undefined, htmlProps?: TimePickerColumnValueHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): TimePickerColumnValueHTMLProps; unstable_propsAreEqual: (prev: import("reakit").RoleOptions & { disabled?: boolean | undefined; focusable?: boolean | undefined; } & { unstable_clickOnEnter?: boolean | undefined; unstable_clickOnSpace?: boolean | undefined; } & Pick<Partial<import("reakit").unstable_IdStateReturn>, "baseId" | "unstable_idCountRef"> & { id?: string | undefined; } & Pick<Partial<import("reakit").CompositeStateReturn>, "baseId" | "unstable_virtual" | "orientation" | "unstable_moves" | "unstable_hasActiveWidget"> & Pick<import("reakit").CompositeStateReturn, "currentId" | "items" | "registerItem" | "unregisterItem" | "next" | "previous" | "up" | "down" | "first" | "last" | "setCurrentId"> & Pick<{ up: (unstable_allTheWay?: boolean | undefined) => void; down: (unstable_allTheWay?: boolean | undefined) => void; baseId: string; unstable_idCountRef: React.MutableRefObject<number>; setBaseId: React.Dispatch<React.SetStateAction<string>>; unstable_virtual: boolean; rtl: boolean; orientation?: import("reakit/ts/Composite/__utils/types").Orientation | undefined; items: import("reakit/ts/Composite/__utils/types").Item[]; groups: import("reakit/ts/Composite/__utils/types").Group[]; currentId?: string | null | undefined; loop: boolean | import("reakit/ts/Composite/__utils/types").Orientation; wrap: boolean | import("reakit/ts/Composite/__utils/types").Orientation; shift: boolean; unstable_moves: number; unstable_hasActiveWidget: boolean; unstable_includesBaseElement: boolean; registerItem: (item: import("reakit/ts/Composite/__utils/types").Item) => void; unregisterItem: (id: string) => void; registerGroup: (group: import("reakit/ts/Composite/__utils/types").Group) => void; unregisterGroup: (id: string) => void; move: (id: string | null) => void; next: (unstable_allTheWay?: boolean | undefined) => void; previous: (unstable_allTheWay?: boolean | undefined) => void; first: () => void; last: () => void; sort: () => void; unstable_setVirtual: React.Dispatch<React.SetStateAction<boolean>>; setRTL: React.Dispatch<React.SetStateAction<boolean>>; setOrientation: React.Dispatch<React.SetStateAction<import("reakit/ts/Composite/__utils/types").Orientation | undefined>>; setCurrentId: React.Dispatch<React.SetStateAction<string | null | undefined>>; setLoop: React.Dispatch<React.SetStateAction<boolean | import("reakit/ts/Composite/__utils/types").Orientation>>; setWrap: React.Dispatch<React.SetStateAction<boolean | import("reakit/ts/Composite/__utils/types").Orientation>>; setShift: React.Dispatch<React.SetStateAction<boolean>>; reset: () => void; unstable_setIncludesBaseElement: React.Dispatch<React.SetStateAction<boolean>>; unstable_setHasActiveWidget: React.Dispatch<React.SetStateAction<boolean>>; popover: { baseId: string; unstable_idCountRef: React.MutableRefObject<number>; visible: boolean; animated: number | boolean; animating: boolean; setBaseId: React.Dispatch<React.SetStateAction<string>>; show: () => void; hide: () => void; toggle: () => void; setVisible: React.Dispatch<React.SetStateAction<boolean>>; setAnimated: React.Dispatch<React.SetStateAction<number | boolean>>; stopAnimation: () => void; modal: boolean; unstable_disclosureRef: React.MutableRefObject<HTMLElement | null>; setModal: React.Dispatch<React.SetStateAction<boolean>>; unstable_referenceRef: React.RefObject<HTMLElement | null>; unstable_popoverRef: React.RefObject<HTMLElement | null>; unstable_arrowRef: React.RefObject<HTMLElement | null>; unstable_popoverStyles: React.CSSProperties; unstable_arrowStyles: React.CSSProperties; unstable_originalPlacement: "auto" | "left" | "right" | "auto-start" | "auto-end" | "top-start" | "top" | "top-end" | "right-start" | "right-end" | "bottom-end" | "bottom" | "bottom-start" | "left-end" | "left-start"; unstable_update: () => boolean; placement: "auto" | "left" | "right" | "auto-start" | "auto-end" | "top-start" | "top" | "top-end" | "right-start" | "right-end" | "bottom-end" | "bottom" | "bottom-start" | "left-end" | "left-start"; place: React.Dispatch<React.SetStateAction<"auto" | "left" | "right" | "auto-start" | "auto-end" | "top-start" | "top" | "top-end" | "right-start" | "right-end" | "bottom-end" | "bottom" | "bottom-start" | "left-end" | "left-start">>; pickerId: string | undefined; dialogId: string | undefined; isDisabled: boolean | undefined; isReadOnly: boolean | undefined; segmentFocus: (() => void) | undefined; } | undefined; date: Date; selected: number; setSelected: (value: number, close?: boolean | undefined) => void; visible: boolean | undefined; columnType: import("./TimePickerColumnState").ColumnType; restoreOldTime: (() => Date) | undefined; updateOldTime: (() => void) | undefined; }, "move" | "date" | "visible" | "popover" | "selected" | "setSelected" | "columnType" | "restoreOldTime" | "updateOldTime"> & { value: number; } & 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; } & Pick<Partial<import("reakit").unstable_IdStateReturn>, "baseId" | "unstable_idCountRef"> & { id?: string | undefined; } & Pick<Partial<import("reakit").CompositeStateReturn>, "baseId" | "unstable_virtual" | "orientation" | "unstable_moves" | "unstable_hasActiveWidget"> & Pick<import("reakit").CompositeStateReturn, "currentId" | "items" | "registerItem" | "unregisterItem" | "next" | "previous" | "up" | "down" | "first" | "last" | "setCurrentId"> & Pick<{ up: (unstable_allTheWay?: boolean | undefined) => void; down: (unstable_allTheWay?: boolean | undefined) => void; baseId: string; unstable_idCountRef: React.MutableRefObject<number>; setBaseId: React.Dispatch<React.SetStateAction<string>>; unstable_virtual: boolean; rtl: boolean; orientation?: import("reakit/ts/Composite/__utils/types").Orientation | undefined; items: import("reakit/ts/Composite/__utils/types").Item[]; groups: import("reakit/ts/Composite/__utils/types").Group[]; currentId?: string | null | undefined; loop: boolean | import("reakit/ts/Composite/__utils/types").Orientation; wrap: boolean | import("reakit/ts/Composite/__utils/types").Orientation; shift: boolean; unstable_moves: number; unstable_hasActiveWidget: boolean; unstable_includesBaseElement: boolean; registerItem: (item: import("reakit/ts/Composite/__utils/types").Item) => void; unregisterItem: (id: string) => void; registerGroup: (group: import("reakit/ts/Composite/__utils/types").Group) => void; unregisterGroup: (id: string) => void; move: (id: string | null) => void; next: (unstable_allTheWay?: boolean | undefined) => void; previous: (unstable_allTheWay?: boolean | undefined) => void; first: () => void; last: () => void; sort: () => void; unstable_setVirtual: React.Dispatch<React.SetStateAction<boolean>>; setRTL: React.Dispatch<React.SetStateAction<boolean>>; setOrientation: React.Dispatch<React.SetStateAction<import("reakit/ts/Composite/__utils/types").Orientation | undefined>>; setCurrentId: React.Dispatch<React.SetStateAction<string | null | undefined>>; setLoop: React.Dispatch<React.SetStateAction<boolean | import("reakit/ts/Composite/__utils/types").Orientation>>; setWrap: React.Dispatch<React.SetStateAction<boolean | import("reakit/ts/Composite/__utils/types").Orientation>>; setShift: React.Dispatch<React.SetStateAction<boolean>>; reset: () => void; unstable_setIncludesBaseElement: React.Dispatch<React.SetStateAction<boolean>>; unstable_setHasActiveWidget: React.Dispatch<React.SetStateAction<boolean>>; popover: { baseId: string; unstable_idCountRef: React.MutableRefObject<number>; visible: boolean; animated: number | boolean; animating: boolean; setBaseId: React.Dispatch<React.SetStateAction<string>>; show: () => void; hide: () => void; toggle: () => void; setVisible: React.Dispatch<React.SetStateAction<boolean>>; setAnimated: React.Dispatch<React.SetStateAction<number | boolean>>; stopAnimation: () => void; modal: boolean; unstable_disclosureRef: React.MutableRefObject<HTMLElement | null>; setModal: React.Dispatch<React.SetStateAction<boolean>>; unstable_referenceRef: React.RefObject<HTMLElement | null>; unstable_popoverRef: React.RefObject<HTMLElement | null>; unstable_arrowRef: React.RefObject<HTMLElement | null>; unstable_popoverStyles: React.CSSProperties; unstable_arrowStyles: React.CSSProperties; unstable_originalPlacement: "auto" | "left" | "right" | "auto-start" | "auto-end" | "top-start" | "top" | "top-end" | "right-start" | "right-end" | "bottom-end" | "bottom" | "bottom-start" | "left-end" | "left-start"; unstable_update: () => boolean; placement: "auto" | "left" | "right" | "auto-start" | "auto-end" | "top-start" | "top" | "top-end" | "right-start" | "right-end" | "bottom-end" | "bottom" | "bottom-start" | "left-end" | "left-start"; place: React.Dispatch<React.SetStateAction<"auto" | "left" | "right" | "auto-start" | "auto-end" | "top-start" | "top" | "top-end" | "right-start" | "right-end" | "bottom-end" | "bottom" | "bottom-start" | "left-end" | "left-start">>; pickerId: string | undefined; dialogId: string | undefined; isDisabled: boolean | undefined; isReadOnly: boolean | undefined; segmentFocus: (() => void) | undefined; } | undefined; date: Date; selected: number; setSelected: (value: number, close?: boolean | undefined) => void; visible: boolean | undefined; columnType: import("./TimePickerColumnState").ColumnType; restoreOldTime: (() => Date) | undefined; updateOldTime: (() => void) | undefined; }, "move" | "date" | "visible" | "popover" | "selected" | "setSelected" | "columnType" | "restoreOldTime" | "updateOldTime"> & { value: number; } & 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: TimePickerColumnValueOptions, htmlProps: TimePickerColumnValueHTMLProps) => TimePickerColumnValueOptions; }; export declare const TimePickerColumnValue: import("../system").Component<"div", import("reakit").RoleOptions & { disabled?: boolean | undefined; focusable?: boolean | undefined; } & { unstable_clickOnEnter?: boolean | undefined; unstable_clickOnSpace?: boolean | undefined; } & Pick<Partial<import("reakit").unstable_IdStateReturn>, "baseId" | "unstable_idCountRef"> & { id?: string | undefined; } & Pick<Partial<import("reakit").CompositeStateReturn>, "baseId" | "unstable_virtual" | "orientation" | "unstable_moves" | "unstable_hasActiveWidget"> & Pick<import("reakit").CompositeStateReturn, "currentId" | "items" | "registerItem" | "unregisterItem" | "next" | "previous" | "up" | "down" | "first" | "last" | "setCurrentId"> & Pick<{ up: (unstable_allTheWay?: boolean | undefined) => void; down: (unstable_allTheWay?: boolean | undefined) => void; baseId: string; unstable_idCountRef: React.MutableRefObject<number>; setBaseId: React.Dispatch<React.SetStateAction<string>>; unstable_virtual: boolean; rtl: boolean; orientation?: import("reakit/ts/Composite/__utils/types").Orientation | undefined; items: import("reakit/ts/Composite/__utils/types").Item[]; groups: import("reakit/ts/Composite/__utils/types").Group[]; currentId?: string | null | undefined; loop: boolean | import("reakit/ts/Composite/__utils/types").Orientation; wrap: boolean | import("reakit/ts/Composite/__utils/types").Orientation; shift: boolean; unstable_moves: number; unstable_hasActiveWidget: boolean; unstable_includesBaseElement: boolean; registerItem: (item: import("reakit/ts/Composite/__utils/types").Item) => void; unregisterItem: (id: string) => void; registerGroup: (group: import("reakit/ts/Composite/__utils/types").Group) => void; unregisterGroup: (id: string) => void; move: (id: string | null) => void; next: (unstable_allTheWay?: boolean | undefined) => void; previous: (unstable_allTheWay?: boolean | undefined) => void; first: () => void; last: () => void; sort: () => void; unstable_setVirtual: React.Dispatch<React.SetStateAction<boolean>>; setRTL: React.Dispatch<React.SetStateAction<boolean>>; setOrientation: React.Dispatch<React.SetStateAction<import("reakit/ts/Composite/__utils/types").Orientation | undefined>>; setCurrentId: React.Dispatch<React.SetStateAction<string | null | undefined>>; setLoop: React.Dispatch<React.SetStateAction<boolean | import("reakit/ts/Composite/__utils/types").Orientation>>; setWrap: React.Dispatch<React.SetStateAction<boolean | import("reakit/ts/Composite/__utils/types").Orientation>>; setShift: React.Dispatch<React.SetStateAction<boolean>>; reset: () => void; unstable_setIncludesBaseElement: React.Dispatch<React.SetStateAction<boolean>>; unstable_setHasActiveWidget: React.Dispatch<React.SetStateAction<boolean>>; popover: { baseId: string; unstable_idCountRef: React.MutableRefObject<number>; visible: boolean; animated: number | boolean; animating: boolean; setBaseId: React.Dispatch<React.SetStateAction<string>>; show: () => void; hide: () => void; toggle: () => void; setVisible: React.Dispatch<React.SetStateAction<boolean>>; setAnimated: React.Dispatch<React.SetStateAction<number | boolean>>; stopAnimation: () => void; modal: boolean; unstable_disclosureRef: React.MutableRefObject<HTMLElement | null>; setModal: React.Dispatch<React.SetStateAction<boolean>>; unstable_referenceRef: React.RefObject<HTMLElement | null>; unstable_popoverRef: React.RefObject<HTMLElement | null>; unstable_arrowRef: React.RefObject<HTMLElement | null>; unstable_popoverStyles: React.CSSProperties; unstable_arrowStyles: React.CSSProperties; unstable_originalPlacement: "auto" | "left" | "right" | "auto-start" | "auto-end" | "top-start" | "top" | "top-end" | "right-start" | "right-end" | "bottom-end" | "bottom" | "bottom-start" | "left-end" | "left-start"; unstable_update: () => boolean; placement: "auto" | "left" | "right" | "auto-start" | "auto-end" | "top-start" | "top" | "top-end" | "right-start" | "right-end" | "bottom-end" | "bottom" | "bottom-start" | "left-end" | "left-start"; place: React.Dispatch<React.SetStateAction<"auto" | "left" | "right" | "auto-start" | "auto-end" | "top-start" | "top" | "top-end" | "right-start" | "right-end" | "bottom-end" | "bottom" | "bottom-start" | "left-end" | "left-start">>; pickerId: string | undefined; dialogId: string | undefined; isDisabled: boolean | undefined; isReadOnly: boolean | undefined; segmentFocus: (() => void) | undefined; } | undefined; date: Date; selected: number; setSelected: (value: number, close?: boolean | undefined) => void; visible: boolean | undefined; columnType: import("./TimePickerColumnState").ColumnType; restoreOldTime: (() => Date) | undefined; updateOldTime: (() => void) | undefined; }, "move" | "date" | "visible" | "popover" | "selected" | "setSelected" | "columnType" | "restoreOldTime" | "updateOldTime"> & { value: number; } & React.HTMLAttributes<any> & React.RefAttributes<any> & { wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined; } & { disabled?: boolean | undefined; } & React.ButtonHTMLAttributes<any>>;