@codecademy/gamut
68.2.268.2.3-alpha.794432.0
dist/DatePicker/Calendar/utils/keyHandler.d.ts+
dist/DatePicker/Calendar/utils/keyHandler.d.tsNew file+12
Index: package/dist/DatePicker/Calendar/utils/keyHandler.d.ts
===================================================================
--- package/dist/DatePicker/Calendar/utils/keyHandler.d.ts
+++ package/dist/DatePicker/Calendar/utils/keyHandler.d.ts
@@ -0,0 +1,12 @@
+import type { CalendarBodyProps } from '../types';
+import { type DateWithRow } from './dateGrid';
+/** Calendar grid props and callbacks used by `keyHandler`, aligned with `CalendarBodyProps`. */
+export type KeyHandlerParams = Pick<CalendarBodyProps, 'onFocusedDateChange' | 'onDateSelect' | 'onDisplayDateChange' | 'onEscapeKeyPress' | 'hasAdjacentMonthRight' | 'hasAdjacentMonthLeft' | 'disabledDates'> & {
+ e: React.KeyboardEvent;
+ /** The date for the day cell that received the key event */
+ date: Date;
+ datesWithRow: DateWithRow[];
+ month: number;
+ year: number;
+};
+export declare const keyHandler: ({ e, date, onFocusedDateChange, datesWithRow, month, year, disabledDates, onDateSelect, onEscapeKeyPress, onDisplayDateChange, hasAdjacentMonthRight, hasAdjacentMonthLeft, }: KeyHandlerParams) => void;