@codecademy/gamut
68.2.268.2.3-alpha.f19d29.0
dist/DatePicker/DatePickerInput/utils.d.ts+
dist/DatePicker/DatePickerInput/utils.d.tsNew file+17
Index: package/dist/DatePicker/DatePickerInput/utils.d.ts
===================================================================
--- package/dist/DatePicker/DatePickerInput/utils.d.ts
+++ package/dist/DatePicker/DatePickerInput/utils.d.ts
@@ -0,0 +1,17 @@
+/** Single date field in locale order (from `Intl.DateTimeFormat#formatToParts`). */
+export type DatePartKind = 'month' | 'day' | 'year';
+export type DateFormatLayoutItem = {
+ kind: 'field';
+ field: DatePartKind;
+} | {
+ kind: 'literal';
+ text: string;
+};
+/**
+ * Month/day/year order and literal separators for the locale (e.g. MM/DD/YYYY vs DD/MM/YYYY).
+ */
+export declare const getDateFormatLayout: (locale: Intl.Locale) => DateFormatLayoutItem[];
+/** Focus / tab order for the three fields (locale order). */
+export declare const getDateFieldOrder: (layout: DateFormatLayoutItem[]) => DatePartKind[];
+/** ISO 8601 date-only string for hidden form fields. */
+export declare const formatDateISO8601DateOnly: (date: Date) => string;