/** * DatePicker Component (TachUI) * * SwiftUI-inspired date and time selection component with multiple styles * and display modes. Supports reactive bindings and comprehensive customization. */ import type { ModifiableComponent, ModifierBuilder } from '@tachui/core'; import type { Signal } from '@tachui/core'; import type { ComponentInstance, ComponentProps, DOMNode } from '@tachui/core'; /** * Date picker display components */ export type DatePickerDisplayComponents = 'date' | 'time' | 'dateAndTime'; /** * Date picker style options */ export type DatePickerStyle = 'compact' | 'wheel' | 'graphical'; /** * DatePicker component properties */ export interface DatePickerProps extends ComponentProps { title?: string; selection: Signal | Date; displayedComponents?: DatePickerDisplayComponents | Signal; style?: DatePickerStyle | Signal; minimumDate?: Date | Signal; maximumDate?: Date | Signal; locale?: string | Signal; dateFormat?: string | Signal; timeFormat?: string | Signal; onChange?: (date: Date) => void; disabled?: boolean | Signal; accessibilityLabel?: string; accessibilityHint?: string; } /** * DatePicker theme configuration */ export interface DatePickerTheme { colors: { background: string; border: string; text: string; selectedBackground: string; selectedText: string; disabledText: string; accent: string; }; spacing: { padding: number; gap: number; itemHeight: number; }; borderRadius: number; fontSize: number; fontFamily: string; } /** * DatePicker component implementation */ export declare class DatePickerComponent implements ComponentInstance { readonly type: "component"; readonly id: string; readonly props: DatePickerProps; private theme; private containerElement; constructor(props: DatePickerProps); private resolveValue; private getSelectedDate; private setSelectedDate; private getDisplayedComponents; private getStyle; private isDisabled; private getMinimumDate; private getMaximumDate; private isDateInRange; private createCompactPicker; private getInputValue; private createWheelPicker; private createDateWheels; private createTimeWheels; private createWheel; private createGraphicalPicker; private createCalendarGrid; private createDayElement; render(): DOMNode; private updatePicker; } /** * Create a DatePicker component */ export declare function DatePicker(props: DatePickerProps): ModifiableComponent & { modifier: ModifierBuilder>; }; /** * DatePicker utility functions and presets */ export declare const DatePickerUtils: { /** * Create a birthday picker (past dates only) */ birthday(selection: Signal): DatePickerProps; /** * Create a meeting time picker (future dates only) */ meetingTime(selection: Signal): DatePickerProps; /** * Create a deadline picker with date range */ deadline(selection: Signal, minimumDate?: Date, maximumDate?: Date): DatePickerProps; /** * Create a time-only picker */ timeOnly(selection: Signal): DatePickerProps; }; /** * DatePicker styles and theming */ export declare const DatePickerStyles: { theme: DatePickerTheme; /** * Create a custom theme */ createTheme(overrides: Partial): DatePickerTheme; }; //# sourceMappingURL=DatePicker.d.ts.map