@amaui/ui-react
Version:
UI for React
45 lines (44 loc) • 1.67 kB
TypeScript
import React from 'react';
import { AmauiDate } from '@amaui/date';
import { ICalenarDays, TCalendarMonthCalendar, TCalendarMonthValue } from '../CalendarMonth/CalendarMonth';
import { ISurface } from '../Surface/Surface';
import { IColor, IElementReference, IPropsAny, ISize, ITonal } from '../types';
export type TGetAmauiDates = (value: TCalendarMonthValue, calendar: TCalendarMonthCalendar, props: IPropsAny) => Array<{
value: AmauiDate;
}>;
export type TCalendarUnit = 'day' | 'month' | 'year';
export interface ICalendar extends Omit<ISurface, 'version'> {
tonal?: ITonal;
color?: IColor;
version?: 'regular' | 'year';
size?: ISize;
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?: AmauiDate;
max?: AmauiDate;
validate?: (value: AmauiDate) => boolean;
menu_month_previous_unit?: TCalendarUnit;
menu_month_next_unit?: TCalendarUnit;
valid?: (value: AmauiDate, version: TCalendarUnit) => boolean;
geMonths?: TGetAmauiDates;
geYears?: TGetAmauiDates;
belowCalendars?: any;
IconPrevious?: IElementReference;
IconNext?: IElementReference;
IconDropDown?: IElementReference;
CalendarMonthProps?: any;
CalendarDayProps?: ICalenarDays;
OptionButtonProps?: any;
}
declare const Calendar: React.FC<ICalendar>;
export default Calendar;