UNPKG

@yamada-ui/calendar

Version:

Yamada UI calendar component

92 lines (89 loc) 2.63 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 { UseYearPickerProps } from './use-year-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 YearPickerOptions { children?: FC<{ value: Date | undefined; onClose: () => void; }> | ReactNode; /** * If `true`, display the year 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 year picker clear icon. * * @default true * * @deprecated Use `clearable` instead. */ isClearable?: boolean; /** * Props for year picker clear icon element. */ clearIconProps?: DatePickerIconProps; /** * Props for year picker container element. */ containerProps?: Omit<HTMLUIProps, "children">; /** * Props for year picker container element. */ contentProps?: Omit<MotionProps, "children">; /** * Props for year picker field element. */ fieldProps?: Omit<DatePickerFieldProps, "children" | "inputProps">; /** * Props for year picker icon element. */ iconProps?: DatePickerIconProps; /** * Props for year picker input element. */ inputProps?: DatePickerFieldProps["inputProps"]; /** * Props to be forwarded to the portal component. * * @default '{ disabled: true }' * */ portalProps?: Omit<PortalProps, "children">; } interface YearPickerProps extends ThemeProps<"DatePicker">, YearPickerOptions, UseYearPickerProps { } /** * `YearPicker` is a component used for users to select a year. * * @see Docs https://yamada-ui.com/components/forms/year-picker */ declare const YearPicker: _yamada_ui_core.Component<"div", YearPickerProps>; export { YearPicker, type YearPickerProps };