@papernote/ui
Version:
A modern React component library with a paper notebook aesthetic - minimal, professional, and expressive
66 lines • 1.83 kB
TypeScript
export interface TimePickerHandle {
focus: () => void;
blur: () => void;
open: () => void;
close: () => void;
}
export interface TimePickerProps {
/** Selected time value (24-hour format: "HH:mm" or "HH:mm:ss") */
value?: string | null;
/** Change handler */
onChange?: (time: string | null) => void;
/** Input label */
label?: string;
/** Placeholder text */
placeholder?: string;
/** Use 12-hour format */
use12Hour?: boolean;
/** Show seconds picker */
showSeconds?: boolean;
/** Minute step interval (1, 5, 10, 15, 30) */
minuteStep?: 1 | 5 | 10 | 15 | 30;
/** Minimum time (24-hour format: "HH:mm") */
minTime?: string;
/** Maximum time (24-hour format: "HH:mm") */
maxTime?: string;
/** Validation state */
validationState?: 'error' | 'success' | 'warning' | null;
/** Validation message */
validationMessage?: string;
/** Helper text */
helperText?: string;
/** Required field */
required?: boolean;
/** Disabled state */
disabled?: boolean;
/** Custom className */
className?: string;
/** Size variant */
size?: 'sm' | 'md' | 'lg';
}
/**
* TimePicker component - Time selection with dropdown spinners.
*
* Features:
* - 12-hour or 24-hour format
* - Optional seconds
* - Minute step intervals
* - Min/max time constraints
* - Keyboard navigation
* - Validation states
* - Spinner controls
*
* @example
* ```tsx
* <TimePicker
* label="Meeting Time"
* value={meetingTime}
* onChange={setMeetingTime}
* use12Hour
* minuteStep={15}
* />
* ```
*/
declare const TimePicker: import("react").ForwardRefExoticComponent<TimePickerProps & import("react").RefAttributes<TimePickerHandle>>;
export default TimePicker;
//# sourceMappingURL=TimePicker.d.ts.map