UNPKG

@unicity/design-system

Version:

A comprehensive React component library built on Material-UI with advanced theming capabilities including neumorphism design support

135 lines 2.97 kB
import React from 'react'; export interface BaseDatePickerProps { /** * The selected date value */ value?: Date | null; /** * Callback fired when the value changes */ onChange?: (date: Date | null) => void; /** * The label content */ label?: string; /** * Helper text to display below the input */ helperText?: string; /** * If true, the input will indicate an error */ error?: boolean; /** * If true, the input is required */ required?: boolean; /** * If true, the input is disabled */ disabled?: boolean; /** * If true, the input is read-only */ readOnly?: boolean; /** * Placeholder text */ placeholder?: string; /** * Visual variant of the picker */ variant?: 'default' | 'outlined' | 'filled'; /** * Size of the component */ size?: 'small' | 'medium'; /** * Minimum selectable date */ minDate?: Date; /** * Maximum selectable date */ maxDate?: Date; /** * Date format to display */ format?: string; /** * Whether to show clear button */ showClearButton?: boolean; /** * Custom validation function */ validate?: (date: Date | null) => string | null; /** * Whether to open picker on focus */ openOnFocus?: boolean; /** * Position of the label */ labelPosition?: 'top' | 'left' | 'floating'; } export interface DatePickerProps extends BaseDatePickerProps { /** * Type of date picker */ type?: 'date'; /** * Views to show in the picker */ views?: ('year' | 'month' | 'day')[]; /** * Starting view when opening the picker */ openTo?: 'year' | 'month' | 'day'; /** * Whether to show days from other months */ showDaysOutsideCurrentMonth?: boolean; } export interface TimePickerProps extends BaseDatePickerProps { /** * Type of time picker */ type: 'time'; /** * Views to show in the picker */ views?: ('hours' | 'minutes' | 'seconds')[]; /** * Time step in minutes */ minutesStep?: number; /** * Whether to use 12-hour format */ ampm?: boolean; } export interface DateTimePickerProps extends BaseDatePickerProps { /** * Type of datetime picker */ type: 'datetime'; /** * Views to show in the picker */ views?: ('year' | 'month' | 'day' | 'hours' | 'minutes')[]; /** * Starting view when opening the picker */ openTo?: 'year' | 'month' | 'day' | 'hours' | 'minutes'; /** * Time step in minutes */ minutesStep?: number; /** * Whether to use 12-hour format */ ampm?: boolean; } export declare const DatePicker: React.FC<DatePickerProps | TimePickerProps | DateTimePickerProps>; //# sourceMappingURL=DatePicker.d.ts.map