@onesy/ui-react
Version:
UI for React
45 lines (44 loc) • 1.79 kB
TypeScript
import React from 'react';
import { OnesyDate } from '@onesy/date';
import { ICalenarDays, TCalendarMonthCalendar, TCalendarMonthValue } from '../CalendarMonth/CalendarMonth';
import { ISurface } from '../Surface/Surface';
import { IElementReference, IPropsAny } from '../types';
export declare type TGetOnesyDates = (value: TCalendarMonthValue, calendar: TCalendarMonthCalendar, props: IPropsAny) => Array<{
value: OnesyDate;
}>;
export declare type TCalendarUnit = 'day' | 'month' | 'year';
export declare type ICalendar = Omit<ISurface, 'version' | 'onChange'> & {
version?: 'regular' | 'year';
value?: TCalendarMonthValue;
valueDefault?: TCalendarMonthValue;
onChange?: (value: TCalendarMonthValue) => any;
calendar?: TCalendarMonthCalendar;
calendarDefault?: TCalendarMonthCalendar;
onChangeCalendar?: (value: TCalendarMonthCalendar) => any;
start?: any;
end?: any;
menu?: 'month-year' | 'month';
now?: boolean;
range?: boolean;
calendars?: number;
min?: OnesyDate;
max?: OnesyDate;
validate?: (value: OnesyDate) => boolean;
menu_month_previous_unit?: TCalendarUnit;
menu_month_next_unit?: TCalendarUnit;
valid?: (value: OnesyDate, version: TCalendarUnit) => boolean;
getMonths?: TGetOnesyDates;
getYears?: TGetOnesyDates;
renderDay?: (value: OnesyDate, props: any, day: any, outside: boolean) => React.ReactNode;
renderDayName?: (order: number) => any;
belowCalendars?: any;
IconPrevious?: IElementReference;
IconNext?: IElementReference;
IconDropDown?: IElementReference;
CalendarMonthProps?: any;
CalendarDayProps?: ICalenarDays;
OptionButtonProps?: any;
PaginationItemsProps?: any;
};
declare const Calendar: React.FC<ICalendar>;
export default Calendar;