@codecademy/gamut
68.3.068.3.1-alpha.a2040c.0
dist/DatePicker/DatePickerInput/Segment/index.d.ts+
dist/DatePicker/DatePickerInput/Segment/index.d.tsNew file+20
Index: package/dist/DatePicker/DatePickerInput/Segment/index.d.ts
===================================================================
--- package/dist/DatePicker/DatePickerInput/Segment/index.d.ts
+++ package/dist/DatePicker/DatePickerInput/Segment/index.d.ts
@@ -0,0 +1,20 @@
+import { type Dispatch, type SetStateAction } from 'react';
+import type { DatePartKind } from '../utils';
+import { SegmentValues } from './utils';
+export type AssignSegmentRef = (field: DatePartKind, el: HTMLSpanElement | null) => void;
+export type DatePickerInputSegmentProps = {
+ field: DatePartKind;
+ segments: SegmentValues;
+ disabled: boolean;
+ error: boolean;
+ onFocus: () => void;
+ onAltArrowDown: () => void;
+ /** Focus a sibling segment; must use refs registered via `assignSegmentRef` (owned by parent). */
+ onSiblingFocus: (field: DatePartKind) => void;
+ assignSegmentRef: AssignSegmentRef;
+ setSegments: Dispatch<SetStateAction<SegmentValues>>;
+ prevField: DatePartKind | null;
+ nextField: DatePartKind | null;
+ applySegments: (next: SegmentValues) => void;
+};
+export declare const DatePickerInputSegment: React.FC<DatePickerInputSegmentProps>;