UNPKG

@yamada-ui/calendar

Version:

Yamada UI calendar component

92 lines (89 loc) 2.65 kB
import * as _yamada_ui_core from '@yamada-ui/core'; import { ThemeProps, FC, HTMLUIProps } from '@yamada-ui/core'; import { MotionProps } from '@yamada-ui/motion'; import { PortalProps } from '@yamada-ui/portal'; import { ReactNode } from 'react'; import { DatePickerIconProps, DatePickerFieldProps } from './date-picker.mjs'; import { UseMonthPickerProps } from './use-month-picker.mjs'; import '@yamada-ui/icon'; import './use-date-picker.mjs'; import '@yamada-ui/popover'; import './calendar.mjs'; import './calendar-header.mjs'; import '@yamada-ui/button'; import './use-calendar-header.mjs'; import './month.mjs'; import './month-list.mjs'; import './use-calendar.mjs'; import 'dayjs'; import './year-list.mjs'; import './use-calendar-picker.mjs'; import '@yamada-ui/form-control'; interface MonthPickerOptions { children?: FC<{ value: Date | undefined; onClose: () => void; }> | ReactNode; /** * If `true`, display the month picker clear icon. * * @default true */ clearable?: boolean; /** * The border color when the input is invalid. */ errorBorderColor?: string; /** * The border color when the input is focused. */ focusBorderColor?: string; /** * If `true`, display the month picker clear icon. * * @default true * * @deprecated Use `clearable` instead. */ isClearable?: boolean; /** * Props for month picker clear icon element. */ clearIconProps?: DatePickerIconProps; /** * Props for month picker container element. */ containerProps?: Omit<HTMLUIProps, "children">; /** * Props for month picker container element. */ contentProps?: Omit<MotionProps, "children">; /** * Props for month picker field element. */ fieldProps?: Omit<DatePickerFieldProps, "children" | "inputProps">; /** * Props for month picker icon element. */ iconProps?: DatePickerIconProps; /** * Props for month picker input element. */ inputProps?: DatePickerFieldProps["inputProps"]; /** * Props to be forwarded to the portal component. * * @default '{ disabled: true }' * */ portalProps?: Omit<PortalProps, "children">; } interface MonthPickerProps extends ThemeProps<"DatePicker">, MonthPickerOptions, UseMonthPickerProps { } /** * `MonthPicker` is a component used for users to select a month. * * @see Docs https://yamada-ui.com/components/forms/month-picker */ declare const MonthPicker: _yamada_ui_core.Component<"div", MonthPickerProps>; export { MonthPicker, type MonthPickerProps };