UNPKG

goobs-frontend

Version:

A comprehensive React-based libary for building modern web applications

46 lines 1.74 kB
import { default as React } from 'react'; import { FieldStyleOverrides } from '../../Shell'; export interface DateRange { start: Date | null; end: Date | null; } export interface DateRangeProps { startLabel?: string; endLabel?: string; value?: DateRange; onChange?: (dateRange: DateRange) => void; disableFutureDateValidation?: boolean; placeholder?: string; helperText?: string; /** * Error message rendered below the inputs; sets aria-invalid on the * shell. Top-level `disabled`/`required`/`error` were dropped from * this component during the FieldShell migration — pass `disabled` * and `required` via `styles` instead. `error` stays top-level here * because callers commonly compute it from cross-field validation * (e.g. start > end), which doesn't belong in style overrides. */ error?: string | boolean; /** Stable test selector — emitted as `data-field` on the wrapper. */ dataField?: string; /** Stable test selector — emitted as `data-field-name` on the wrapper. */ dataFieldName?: string; /** * Form-engine binding key. When set inside a `<Form>` and no explicit * `value` is passed, the {start,end} range is read/written through the form * engine; the engine's error/required for this field also attach to the * start shell. Inert outside a `<Form>`. */ name?: string; style?: React.CSSProperties; styles?: FieldStyleOverrides & { height?: string; fontSize?: string; borderRadius?: string; padding?: string; gap?: string; }; } declare const DateRange: React.FC<DateRangeProps>; export default DateRange; //# sourceMappingURL=index.d.ts.map