import { AriaDisabledProps } from '../../core/types/a11y-props.js'; import type { BehaviorTrackingProps } from '../../core/types/behavior-tracking-props.js'; import { DataTestId } from '../../core/types/data-props.js'; import type { FormControlProps } from '../../core/types/form-control-props.js'; import { MaskingProps } from '../../core/types/masking-props.js'; import { StylingProps } from '../../core/types/styling-props.js'; import type { TimeValue } from '../../core/types/time.js'; import type { MessageTarget } from '../validation/message-routing.js'; /** * Determines what datetime parts to show. * @public */ export type DateTimePickerType = 'time' | 'date' | 'datetime'; /** * Determines the level of precision of the time component. * @public */ export type DateTimePickerPrecision = 'minutes' | 'seconds' | 'milliseconds'; /** * Props to define what datetime parts should be shown. * @public */ export type DateTimePickerTypeProps = { type: Extract; precision?: never; } | { type?: Exclude; precision?: DateTimePickerPrecision; }; /** * @public */ export type DateTimePickerProps = FormControlProps void, HTMLDivElement> & StylingProps & DataTestId & MaskingProps & DateTimePickerTypeProps & BehaviorTrackingProps & { /** * Earliest allowed ISOString and timestamp for validation. */ min?: string; /** * Latest allowed ISOString for validation. */ max?: string; /** * The placeholder that's shown in the input field if the content is empty. */ placeholder?: string; /** * Internal: associates this control with a `_Form` rendered outside its * React subtree via the native `form` attribute. Unstable. * @internal */ _form?: string; /** * Internal: routes this control's native/Strato validation messages to the * field outlet (default), the enclosing form's outlet, or both. Unstable. * @internal */ _messageTarget?: MessageTarget | MessageTarget[]; }; /** * Props or the DateSelector component. * @internal */ export interface DateSelectorProps extends StylingProps, DataTestId, MaskingProps, AriaDisabledProps { /** Determine if the trigger is disabled or not. */ disabled: boolean; /** Determine if the trigger is in error state or not. */ error: boolean; /** Determines whether the input is in read-only mode. */ readOnly?: boolean; /** Placed on the overlay wrapper so the parent can identify it for focus boundary tracking. */ overlayOwnerId?: string; } /** * Imperative handle to provide methods to interact with the calendar widget. * @internal */ export interface DateSelectorRef { /** Open the calendar widget. */ open(): void; /** Close the calendar widget. */ close(): void; } //# sourceMappingURL=types.d.ts.map