import type { HTMLAttributes } from 'react';
import type { TestableProps } from '../../utils/testId';
/**
* Visual size of a temporal input. Mirrors InputGroup sizes.
*/
export type TemporalInputSize = 'default' | 'medium' | 'small';
/**
* Props shared by every temporal input root wrapper — DateInput, TimeInput,
* DateRangeInput. Extends `HTMLAttributes` so consumers can
* set `id`, `style`, `aria-*`, `data-*`, event handlers on the outer element.
* `onChange` and `defaultValue` are omitted because each input redefines
* them with its domain-specific value type.
*/
export interface TemporalInputCommonProps extends Omit, 'onChange' | 'defaultValue'>, TestableProps {
/** Whether to show the leading icon. Default: true. */
showIcon?: boolean;
/** Whether the input has an error state. Sets `aria-invalid` and error styling. */
error?: boolean;
/** Whether the input is disabled. Prevents user interaction. */
disabled?: boolean;
/** Whether the input is read-only. Segments are focusable but not editable. */
readOnly?: boolean;
/** Placeholder shown when no value is selected. */
placeholder?: string;
/** Visual size. Default: 'default' (36px). */
size?: TemporalInputSize;
}
/**
* Per-input time behaviour knobs that are not app-wide.
*
* `hourCycle` intentionally lives on `DateFormatProvider`, not here — the
* 12/24-hour choice is a product-wide preference, set once at the app root
* and consumed via `useDateFormat`. The props below, by contrast, describe
* per-component UI decisions (this specific input shows a dropdown; that
* one uses 15-minute steps).
*/
export interface TemporalInputTimeProps {
/** Show dropdown for time selection with arrow navigation. */
showTimeDropdown?: boolean;
/** Time interval in minutes for dropdown options. Default: 30. */
timeStep?: number;
}