UNPKG

@project44-manifest/react

Version:

Manifest Design System react components

90 lines 2.82 kB
import * as React from 'react'; import type { DateValue } from '@react-types/calendar'; import type { AriaDateRangePickerProps } from '@react-types/datepicker'; import { As, Options, Props } from '../../system'; import type { StyleProps } from '../../types'; import { DefinedRange } from '../CalendarRanges'; import { Placement } from '../Overlay'; export declare type DateRangePickerElement = 'div'; export interface DateRangePickerOptions<T extends As = DateRangePickerElement> extends Options<T>, AriaDateRangePickerProps<DateValue>, StyleProps { /** * The ref of the element to append the overlay to. */ containerRef?: React.RefObject<HTMLElement>; /** * Helper text to append to the form control input element. */ helperText?: React.ReactNode; /** * Props passed to the helper text. */ helperTextProps?: React.HTMLAttributes<HTMLElement>; /** * Label of the input element */ label?: React.ReactNode; /** * Props passed to the label. */ labelProps?: React.HTMLAttributes<HTMLElement>; /** * The additional offset applied along the main axis between the element and its * anchor element. * * @default 4 */ offset?: number; /** * The placement of the element with respect to its anchor element. * * @default 'bottom' */ placement?: Placement; /** * Temporary text that occupies the text input when it is empty. */ placeholder?: string; /** * Whether the element should flip its orientation (e.g. top to bottom or left to right) when * there is insufficient room for it to render completely. * * @default true */ shouldFlip?: boolean; /** * The size of the combobox * * @default 'medium' */ size?: 'medium' | 'small'; /** * Icon displayed at the start of the text field. * * @example * <Combobox startIcon={<Icon />} /> */ startIcon?: React.ReactElement; /** * Allows to show or hide the calendar of the component * * @default true * @example * <DateRangePicker showCalendar={false} /> */ showCalendar?: boolean; /** * Allows to pass or avoid the ranges to the component and shoen them instead of the predefined ones * * @default false * @example * <DateRangePicker showRanges={false} /> */ showRanges?: boolean; /** * Brings the list of ranges defined to the component */ ranges?: DefinedRange[]; } export declare type DateRangePickerProps<T extends As = DateRangePickerElement> = Props<DateRangePickerOptions<T>>; export declare const DateRangePicker: import("../../system").Component<DateRangePickerOptions<"div">>; //# sourceMappingURL=DateRangePicker.d.ts.map