// Generated by dts-bundle-generator v7.2.0 import React from 'react'; import { HTMLAttributes, ReactNode, RefObject } from 'react'; export type TimeFormat = "12h" | "24h"; export type AmPm = "AM" | "PM"; export type TimePickerMode = "scroll" | "dropdown"; /** * Translatable labels for the TimePicker component. * All texts can be customized for localization. */ export interface TimePickerLabels { /** * Label for the hours column in 24h format. * @default "Hours" */ hoursLabel?: string; /** * Label for the hour column in 12h format. * @default "Hour" */ hourLabel?: string; /** * Label for the minutes column. * @default "Minutes" */ minutesLabel?: string; /** * Accessible label for the AM/PM selector group. * @default "AM/PM selector" */ amPmSelectorLabel?: string; /** * Display text for the AM option. * @default "AM" */ amLabel?: string; /** * Display text for the PM option. * @default "PM" */ pmLabel?: string; } export interface TimeValue { hours: number; minutes: number; ampm?: AmPm; } export interface TimePickerProperties { /** * Display mode for the time picker panel. * - "scroll": Shows a scroll-based wheel picker with separate hour/minute columns. * - "dropdown": Shows a single scrollable list of time options. * @default "scroll" */ mode?: TimePickerMode; /** * Current time value (HH:mm string format or Date object). * For 12h format, use "HH:mm AM/PM" or just "HH:mm" (will default to AM). */ value?: string | Date | null; /** * Callback fired when the time changes. * @param value - The formatted time string (HH:mm for 24h, hh:mm AM/PM for 12h). * @param date - A Date object representing the selected time (today's date with selected time). */ onChange?: (value: string | null, date: Date | null) => void; /** * Time format: 12-hour with AM/PM or 24-hour. * @default "24h" */ format?: TimeFormat; /** * Step interval in minutes for the time picker. * For scroll mode: controls minute increments in the minutes column. * For dropdown mode: controls the time options shown in the list. * Common values: 1, 15, 30, 60. * @default 1 for scroll picker, 30 for dropdown */ step?: number; /** * Whether the picker is disabled. * @default false */ disabled?: boolean; /** * Placeholder text for the input field. * @default "Select time" */ placeholder?: string; /** * Controls the open state of the picker panel (controlled mode). */ open?: boolean; /** * Callback fired when the panel open state changes. */ onOpenChange?: (open: boolean) => void; /** * Accessible label for the time picker input. */ "aria-label"?: string; /** * ID of an element that labels the time picker. */ "aria-labelledby"?: string; /** * ID of an element that describes the time picker. */ "aria-describedby"?: string; /** * Name attribute for the hidden input (for form submission). */ name?: string; /** * Whether the input is required. * @default false */ required?: boolean; /** * ID attribute for the input element. */ id?: string; /** * Translatable labels for localization. * Allows customization of all text content rendered by the component. */ labels?: TimePickerLabels; } export type OmittedHTMLAttributes = "value" | "onChange" | "placeholder" | "disabled"; export interface TimePickerProps extends TimePickerProperties, Omit, OmittedHTMLAttributes> { } export interface DropdownOption { value: string; hours: number; minutes: number; ampm?: AmPm; } export interface TimePickerPanelBaseProps { format: TimeFormat; disabled: boolean; labels: TimePickerLabels; ariaLabel?: string; } /** * TimePicker allows users to select a time value using either a scroll-based * wheel picker (default) or a dropdown list of time options. * * @example * // Basic 24h scroll picker with 15-minute intervals * console.log(value)} step={15} /> * * @example * // 12h format scroll picker * * * @example * // Dropdown mode * console.log(value)} step={30} /> */ export declare const TimePicker: React.ForwardRefExoticComponent>; export interface TimePickerColumnBaseProps { /** * Time format (affects hour range for hours column). */ format: TimeFormat; /** * Label for the column (for accessibility). */ label?: string; /** * Step interval in minutes (only applies to minutes column). * @default 1 */ step?: number; } export interface TimePickerColumnSingleProps extends TimePickerColumnBaseProps { /** * Type of values displayed in the column. */ type: "hours" | "minutes"; /** * Available options for the column. * When provided, the column uses these values instead of computing them internally. */ options: number[]; /** * Current time picker column value. */ value?: number; /** * Currently selected value. */ selected?: number; /** * Callback when a value is selected. */ onSelect: (value: number) => void; /** * Callback when Tab is pressed to move to next column. */ onTabNext?: () => void; /** * Callback when Shift+Tab is pressed to move to previous column. */ onTabPrev?: () => void; } export interface TimePickerColumnCombinedProps extends TimePickerColumnBaseProps { /** * Type "combined" shows full time options (HH:mm) in a simple scrollable list. */ type: "combined"; /** * Pre-computed dropdown options for combined mode. */ options: DropdownOption[]; /** * The current/initial time value string (e.g., "14:30"). */ currentValue?: string | null; /** * The currently selected time value string. */ selectedValue?: string | null; /** * Callback when a time option is selected. */ onSelectTime: (hours: number, minutes: number) => void; /** * Ref to the scroll container. */ scrollContainerRef?: RefObject; } export type TimePickerColumnProps = TimePickerColumnSingleProps | TimePickerColumnCombinedProps; /** * TimePickerColumn renders a scrollable column of time values. * For type "hours" or "minutes": Uses ScrollPane with gradients for wheel-style selection. * For type "combined": Renders a flat scrollable list of full time options. */ export declare const TimePickerColumn: React.FC; export interface TimePickerOptionProps extends Omit, "role"> { /** * Whether this option is currently selected. */ selected?: boolean; /** * Whether this option represents the current time. */ current?: boolean; /** * Whether this option is disabled. */ disabled?: boolean; /** * The display value/label for this option. */ children: ReactNode; /** * Callback when this option is selected. */ onSelect?: () => void; /** * ARIA role for the button. Use "option" for listbox and "radio" for radiogroup. * @default "option" */ role?: "option" | "radio"; } /** * TimePickerOption is a single selectable time option in dropdown mode. */ export declare const TimePickerOption: React.ForwardRefExoticComponent>; export interface TimePickerAmPmProps { /** * Currently selected AM/PM value. */ current?: AmPm; /** * Selected AM/PM value. */ selected?: AmPm; /** * Callback when new value of AM/PM is selected. */ onSelect: (value: AmPm) => void; /** * Whether the AM/PM selector is disabled. */ disabled?: boolean; /** * Display text for the AM option. * @default "AM" */ amLabel?: string; /** * Display text for the PM option. * @default "PM" */ pmLabel?: string; /** * Accessible label for the AM/PM selector group. * @default "AM/PM selector" */ selectorLabel?: string; /** * Callback when Shift+Tab is pressed to move to previous column. */ onTabPrev?: () => void; } /** * TimePickerAmPm renders the AM/PM toggle buttons for 12-hour format. * Implements the roving tabindex pattern for radio group keyboard navigation. */ export declare const TimePickerAmPm: React.FC; export interface TimePickerDropdownProps extends TimePickerPanelBaseProps { step: number; dropdownOptions: DropdownOption[]; initialValue: TimeValue | null; internalTimeValue: Partial | null; selectTime: (hours: number, minutes: number, ampm?: AmPm) => void; setAmPm: (ampm: AmPm) => void; } /** * Internal dropdown panel component that displays a scrollable list * of time options with optional AM/PM toggle. */ export declare const TimePickerDropdown: React.FC; export interface TimePickerScrollPanelProps extends TimePickerPanelBaseProps { hourOptions: number[]; minuteOptions: number[]; initialValue: TimeValue | null; timeValue: Partial | null; setHours: (hours: number) => void; setMinutes: (minutes: number) => void; setAmPm: (ampm: AmPm) => void; } /** * Internal scroll panel component that displays hour and minute columns * with a scroll-wheel interface for time selection. */ export declare const TimePickerScroll: React.FC; export {};