@dloizides/ui-forms 1.44.1 → 1.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1004,6 +1004,11 @@ declare function DateTimeField(props: DateTimeFieldProps): React.ReactElement;
1004
1004
  /** A calendar date control with no label row, for a `Field` render-prop child whose caller owns the label. */
1005
1005
  declare function DateInput({ fieldProps, context }: DateInputProps): React.ReactElement;
1006
1006
 
1007
+ declare const enum DateDisplay {
1008
+ Long = "long",
1009
+ Numeric = "numeric"
1010
+ }
1011
+
1007
1012
  interface DatePickerLabels {
1008
1013
  dialog: string;
1009
1014
  rangeDialog: string;
@@ -1045,10 +1050,12 @@ interface DatePickerProviderProps {
1045
1050
  locale?: string;
1046
1051
  /** Fixed `YYYY-MM-DD` today, for demos and tests. */
1047
1052
  today?: string;
1053
+ /** Closed-field format; omitted = Long (`Fri 20 Nov 2026`), Numeric = the locale's `20/11/2026`. */
1054
+ display?: DateDisplay;
1048
1055
  children: React.ReactNode;
1049
1056
  }
1050
1057
  /** Supplies picker labels, locale and an optional fixed today to every date control below it. */
1051
- declare function DatePickerProvider({ labels, locale, today, children }: DatePickerProviderProps): React.ReactElement;
1058
+ declare function DatePickerProvider({ labels, locale, today, display, children }: DatePickerProviderProps): React.ReactElement;
1052
1059
 
1053
1060
  declare const DEFAULT_DATE_PICKER_LABELS: DatePickerLabels;
1054
1061
 
@@ -1846,4 +1853,4 @@ declare const defaultDecisionVariant: (width: number) => DecisionPanelVariant;
1846
1853
  /** The outcomes with the lead one first; the rest keep their order. */
1847
1854
  declare const leadFirst: <T extends string>(outcomes: ReadonlyArray<DecisionOutcome<T>>, lead: T | undefined) => Array<DecisionOutcome<T>>;
1848
1855
 
1849
- export { ActionBar, type ActionBarProps, AddOnRequest, type AddOnRequestProps, AlignToControl, type AlignToControlProps, type AnchorRect, AnchoredMenu, type AnchoredMenuColors, type AnchoredMenuListbox, type AnchoredMenuPlacement, type AnchoredMenuProps, type AutoGrowRows, type BicDraft, BicInput, type BicInputProps, BicRejection, type BicRejectionLabels, type BicVerdict, type BlurVerdict, COUNTRIES, type ChecklistItem, ChipLabelWrap, type ChipOption, ChipSelector, type ChipSelectorProps, type ChipSingleSelectRole, type ChipVariant, type ControlOption, type Country, CountryField, type CountryFieldProps, CountryFlag, type CountryFlagProps, DEFAULT_DATE_PICKER_LABELS, DEFAULT_MAX_RECENTS, DEFAULT_OPTIONAL_LABEL, DEFAULT_TYPEAHEAD_MAX_SUGGESTIONS, DEFAULT_TYPEAHEAD_MIN_CHARS, DateField, type DateFieldProps, DateInput, type DateInputProps, type DatePickerLabels, DatePickerProvider, type DatePickerProviderProps, DateRangeControl, type DateRangeControlProps, type DateRangeValue, DateTimeField, type DateTimeFieldProps, type DecisionChecklist, type DecisionError, type DecisionOutcome, DecisionPanel, type DecisionPanelLabels, type DecisionPanelProps, type DecisionPanelVariant, type DecisionSubmission, type DecisionTone, type DropdownFrame, DropdownPlacement, FLAG_HEIGHT, FLAG_WIDTH, Field, type FieldChildContext, type FieldChildren, type FieldLabelVariant, type FieldMarker, type FieldProps, type FieldSpacing, FileInput, type FileInputProps, FixBar, type FixBarProps, type FlagShape, FlagShapeKind, type Focusable, type FocusableRefs, FormActions, type FormActionsProps, FormCell, type FormCellProps, FormCheckbox, type FormCheckboxProps, FormField, type FormFieldProps, FormGrid, type FormGridProps, FormSection, type FormSectionProps, FormStack, type FormStackProps, FormStatusLine, type FormStatusLineProps, FormSwitch, type FormSwitchProps, GatedChecklist, type GatedChecklistProps, type GroupSelection, IBAN_MAX_LENGTH, IBAN_REGISTERED_COUNTRY_COUNT, INLINE_FIELD_ROW_MIN_WIDTH, type IbanDraft, IbanInput, type IbanInputProps, IbanRejection, type IbanRejectionLabels, type IbanVerdict, InlineFieldRow, type InlineFieldRowLayout, type InlineFieldRowProps, LINE_ITEMS_WIDE_MIN_WIDTH, type LineItemCell, type LineItemColumn, LineItems, type LineItemsLabels, type LineItemsProps, PHONE_MAX_WIDTH, RESPONSIVE_FORM_DEFAULT_BREAKPOINT, RadioList, type RadioListProps, type RadioOption, type RadioRowIdentity, type RecentValues, ResponsiveFormLayout, type ResponsiveFormLayoutProps, SEGMENT_BESIDE_FIELD, SEGMENT_BESIDE_TEXT_INPUT, SearchSelect, type SearchSelectLabels, type SearchSelectProps, type SearchSelectSections, type SearchSelectState, type SearchSelectTrigger, SelectControl, type SelectControlProps, SelectField, type SelectFieldProps, type SelectMenuAnchor, type SelectMotion, SelectSurface, type StepNeighbours, StepperNav, type StepperNavLabels, type StepperNavProps, type StepperStep, StepperTabs, type StepperTabsProps, type ThemedInput, ThemedTextInput, type ThemedTextInputProps, TypeaheadControl, type TypeaheadControlProps, type TypeaheadSearch, type TypeaheadSearchProps, UploadWithLinkField, type UploadWithLinkFieldProps, type UploadWithLinkLabels, type UseThemedInputOptions, actionBarPosition, buildSearchSelectSections, canRemoveLine, controlStyles, countryFieldOptions, countryFlag, countryOptions, defaultDecisionVariant, draftBic, draftIban, dropdownFrame, findOption, fitDropdownWidth, flagShapes, groupAriaChecked, groupInFours, highlightAfterQuery, ibanCounter, ibanLengthFor, inlineFieldRowLayout, isAddOnOpen, isChecklistComplete, isFallbackFlag, isFixBarVisible, isLineItemsWide, isOutside, isUnmatched, isWideFormLayout, leadFirst, lineItemColumnFlex, lineNumberOf, moveHighlight, nextHighlight, placeDropdown, radioRowIdentity, rejectionMessage, resolveGroupSelection, resolveSelectMotion, resolveStepNeighbours, rowsForText, suggestOptions, toCountryValue, toggleGroupSelection, useAutoGrowRows, useBlurVerdict, useDeferredFocus, useFocusFirstInvalid, useKeepInView, useOutsidePress, useRecentValues, useReducedMotion, useSearchSelectState, useThemedInput, validateBic, validateDecision, validateIban };
1856
+ export { ActionBar, type ActionBarProps, AddOnRequest, type AddOnRequestProps, AlignToControl, type AlignToControlProps, type AnchorRect, AnchoredMenu, type AnchoredMenuColors, type AnchoredMenuListbox, type AnchoredMenuPlacement, type AnchoredMenuProps, type AutoGrowRows, type BicDraft, BicInput, type BicInputProps, BicRejection, type BicRejectionLabels, type BicVerdict, type BlurVerdict, COUNTRIES, type ChecklistItem, ChipLabelWrap, type ChipOption, ChipSelector, type ChipSelectorProps, type ChipSingleSelectRole, type ChipVariant, type ControlOption, type Country, CountryField, type CountryFieldProps, CountryFlag, type CountryFlagProps, DEFAULT_DATE_PICKER_LABELS, DEFAULT_MAX_RECENTS, DEFAULT_OPTIONAL_LABEL, DEFAULT_TYPEAHEAD_MAX_SUGGESTIONS, DEFAULT_TYPEAHEAD_MIN_CHARS, DateDisplay, DateField, type DateFieldProps, DateInput, type DateInputProps, type DatePickerLabels, DatePickerProvider, type DatePickerProviderProps, DateRangeControl, type DateRangeControlProps, type DateRangeValue, DateTimeField, type DateTimeFieldProps, type DecisionChecklist, type DecisionError, type DecisionOutcome, DecisionPanel, type DecisionPanelLabels, type DecisionPanelProps, type DecisionPanelVariant, type DecisionSubmission, type DecisionTone, type DropdownFrame, DropdownPlacement, FLAG_HEIGHT, FLAG_WIDTH, Field, type FieldChildContext, type FieldChildren, type FieldLabelVariant, type FieldMarker, type FieldProps, type FieldSpacing, FileInput, type FileInputProps, FixBar, type FixBarProps, type FlagShape, FlagShapeKind, type Focusable, type FocusableRefs, FormActions, type FormActionsProps, FormCell, type FormCellProps, FormCheckbox, type FormCheckboxProps, FormField, type FormFieldProps, FormGrid, type FormGridProps, FormSection, type FormSectionProps, FormStack, type FormStackProps, FormStatusLine, type FormStatusLineProps, FormSwitch, type FormSwitchProps, GatedChecklist, type GatedChecklistProps, type GroupSelection, IBAN_MAX_LENGTH, IBAN_REGISTERED_COUNTRY_COUNT, INLINE_FIELD_ROW_MIN_WIDTH, type IbanDraft, IbanInput, type IbanInputProps, IbanRejection, type IbanRejectionLabels, type IbanVerdict, InlineFieldRow, type InlineFieldRowLayout, type InlineFieldRowProps, LINE_ITEMS_WIDE_MIN_WIDTH, type LineItemCell, type LineItemColumn, LineItems, type LineItemsLabels, type LineItemsProps, PHONE_MAX_WIDTH, RESPONSIVE_FORM_DEFAULT_BREAKPOINT, RadioList, type RadioListProps, type RadioOption, type RadioRowIdentity, type RecentValues, ResponsiveFormLayout, type ResponsiveFormLayoutProps, SEGMENT_BESIDE_FIELD, SEGMENT_BESIDE_TEXT_INPUT, SearchSelect, type SearchSelectLabels, type SearchSelectProps, type SearchSelectSections, type SearchSelectState, type SearchSelectTrigger, SelectControl, type SelectControlProps, SelectField, type SelectFieldProps, type SelectMenuAnchor, type SelectMotion, SelectSurface, type StepNeighbours, StepperNav, type StepperNavLabels, type StepperNavProps, type StepperStep, StepperTabs, type StepperTabsProps, type ThemedInput, ThemedTextInput, type ThemedTextInputProps, TypeaheadControl, type TypeaheadControlProps, type TypeaheadSearch, type TypeaheadSearchProps, UploadWithLinkField, type UploadWithLinkFieldProps, type UploadWithLinkLabels, type UseThemedInputOptions, actionBarPosition, buildSearchSelectSections, canRemoveLine, controlStyles, countryFieldOptions, countryFlag, countryOptions, defaultDecisionVariant, draftBic, draftIban, dropdownFrame, findOption, fitDropdownWidth, flagShapes, groupAriaChecked, groupInFours, highlightAfterQuery, ibanCounter, ibanLengthFor, inlineFieldRowLayout, isAddOnOpen, isChecklistComplete, isFallbackFlag, isFixBarVisible, isLineItemsWide, isOutside, isUnmatched, isWideFormLayout, leadFirst, lineItemColumnFlex, lineNumberOf, moveHighlight, nextHighlight, placeDropdown, radioRowIdentity, rejectionMessage, resolveGroupSelection, resolveSelectMotion, resolveStepNeighbours, rowsForText, suggestOptions, toCountryValue, toggleGroupSelection, useAutoGrowRows, useBlurVerdict, useDeferredFocus, useFocusFirstInvalid, useKeepInView, useOutsidePress, useRecentValues, useReducedMotion, useSearchSelectState, useThemedInput, validateBic, validateDecision, validateIban };
package/dist/index.d.ts CHANGED
@@ -1004,6 +1004,11 @@ declare function DateTimeField(props: DateTimeFieldProps): React.ReactElement;
1004
1004
  /** A calendar date control with no label row, for a `Field` render-prop child whose caller owns the label. */
1005
1005
  declare function DateInput({ fieldProps, context }: DateInputProps): React.ReactElement;
1006
1006
 
1007
+ declare const enum DateDisplay {
1008
+ Long = "long",
1009
+ Numeric = "numeric"
1010
+ }
1011
+
1007
1012
  interface DatePickerLabels {
1008
1013
  dialog: string;
1009
1014
  rangeDialog: string;
@@ -1045,10 +1050,12 @@ interface DatePickerProviderProps {
1045
1050
  locale?: string;
1046
1051
  /** Fixed `YYYY-MM-DD` today, for demos and tests. */
1047
1052
  today?: string;
1053
+ /** Closed-field format; omitted = Long (`Fri 20 Nov 2026`), Numeric = the locale's `20/11/2026`. */
1054
+ display?: DateDisplay;
1048
1055
  children: React.ReactNode;
1049
1056
  }
1050
1057
  /** Supplies picker labels, locale and an optional fixed today to every date control below it. */
1051
- declare function DatePickerProvider({ labels, locale, today, children }: DatePickerProviderProps): React.ReactElement;
1058
+ declare function DatePickerProvider({ labels, locale, today, display, children }: DatePickerProviderProps): React.ReactElement;
1052
1059
 
1053
1060
  declare const DEFAULT_DATE_PICKER_LABELS: DatePickerLabels;
1054
1061
 
@@ -1846,4 +1853,4 @@ declare const defaultDecisionVariant: (width: number) => DecisionPanelVariant;
1846
1853
  /** The outcomes with the lead one first; the rest keep their order. */
1847
1854
  declare const leadFirst: <T extends string>(outcomes: ReadonlyArray<DecisionOutcome<T>>, lead: T | undefined) => Array<DecisionOutcome<T>>;
1848
1855
 
1849
- export { ActionBar, type ActionBarProps, AddOnRequest, type AddOnRequestProps, AlignToControl, type AlignToControlProps, type AnchorRect, AnchoredMenu, type AnchoredMenuColors, type AnchoredMenuListbox, type AnchoredMenuPlacement, type AnchoredMenuProps, type AutoGrowRows, type BicDraft, BicInput, type BicInputProps, BicRejection, type BicRejectionLabels, type BicVerdict, type BlurVerdict, COUNTRIES, type ChecklistItem, ChipLabelWrap, type ChipOption, ChipSelector, type ChipSelectorProps, type ChipSingleSelectRole, type ChipVariant, type ControlOption, type Country, CountryField, type CountryFieldProps, CountryFlag, type CountryFlagProps, DEFAULT_DATE_PICKER_LABELS, DEFAULT_MAX_RECENTS, DEFAULT_OPTIONAL_LABEL, DEFAULT_TYPEAHEAD_MAX_SUGGESTIONS, DEFAULT_TYPEAHEAD_MIN_CHARS, DateField, type DateFieldProps, DateInput, type DateInputProps, type DatePickerLabels, DatePickerProvider, type DatePickerProviderProps, DateRangeControl, type DateRangeControlProps, type DateRangeValue, DateTimeField, type DateTimeFieldProps, type DecisionChecklist, type DecisionError, type DecisionOutcome, DecisionPanel, type DecisionPanelLabels, type DecisionPanelProps, type DecisionPanelVariant, type DecisionSubmission, type DecisionTone, type DropdownFrame, DropdownPlacement, FLAG_HEIGHT, FLAG_WIDTH, Field, type FieldChildContext, type FieldChildren, type FieldLabelVariant, type FieldMarker, type FieldProps, type FieldSpacing, FileInput, type FileInputProps, FixBar, type FixBarProps, type FlagShape, FlagShapeKind, type Focusable, type FocusableRefs, FormActions, type FormActionsProps, FormCell, type FormCellProps, FormCheckbox, type FormCheckboxProps, FormField, type FormFieldProps, FormGrid, type FormGridProps, FormSection, type FormSectionProps, FormStack, type FormStackProps, FormStatusLine, type FormStatusLineProps, FormSwitch, type FormSwitchProps, GatedChecklist, type GatedChecklistProps, type GroupSelection, IBAN_MAX_LENGTH, IBAN_REGISTERED_COUNTRY_COUNT, INLINE_FIELD_ROW_MIN_WIDTH, type IbanDraft, IbanInput, type IbanInputProps, IbanRejection, type IbanRejectionLabels, type IbanVerdict, InlineFieldRow, type InlineFieldRowLayout, type InlineFieldRowProps, LINE_ITEMS_WIDE_MIN_WIDTH, type LineItemCell, type LineItemColumn, LineItems, type LineItemsLabels, type LineItemsProps, PHONE_MAX_WIDTH, RESPONSIVE_FORM_DEFAULT_BREAKPOINT, RadioList, type RadioListProps, type RadioOption, type RadioRowIdentity, type RecentValues, ResponsiveFormLayout, type ResponsiveFormLayoutProps, SEGMENT_BESIDE_FIELD, SEGMENT_BESIDE_TEXT_INPUT, SearchSelect, type SearchSelectLabels, type SearchSelectProps, type SearchSelectSections, type SearchSelectState, type SearchSelectTrigger, SelectControl, type SelectControlProps, SelectField, type SelectFieldProps, type SelectMenuAnchor, type SelectMotion, SelectSurface, type StepNeighbours, StepperNav, type StepperNavLabels, type StepperNavProps, type StepperStep, StepperTabs, type StepperTabsProps, type ThemedInput, ThemedTextInput, type ThemedTextInputProps, TypeaheadControl, type TypeaheadControlProps, type TypeaheadSearch, type TypeaheadSearchProps, UploadWithLinkField, type UploadWithLinkFieldProps, type UploadWithLinkLabels, type UseThemedInputOptions, actionBarPosition, buildSearchSelectSections, canRemoveLine, controlStyles, countryFieldOptions, countryFlag, countryOptions, defaultDecisionVariant, draftBic, draftIban, dropdownFrame, findOption, fitDropdownWidth, flagShapes, groupAriaChecked, groupInFours, highlightAfterQuery, ibanCounter, ibanLengthFor, inlineFieldRowLayout, isAddOnOpen, isChecklistComplete, isFallbackFlag, isFixBarVisible, isLineItemsWide, isOutside, isUnmatched, isWideFormLayout, leadFirst, lineItemColumnFlex, lineNumberOf, moveHighlight, nextHighlight, placeDropdown, radioRowIdentity, rejectionMessage, resolveGroupSelection, resolveSelectMotion, resolveStepNeighbours, rowsForText, suggestOptions, toCountryValue, toggleGroupSelection, useAutoGrowRows, useBlurVerdict, useDeferredFocus, useFocusFirstInvalid, useKeepInView, useOutsidePress, useRecentValues, useReducedMotion, useSearchSelectState, useThemedInput, validateBic, validateDecision, validateIban };
1856
+ export { ActionBar, type ActionBarProps, AddOnRequest, type AddOnRequestProps, AlignToControl, type AlignToControlProps, type AnchorRect, AnchoredMenu, type AnchoredMenuColors, type AnchoredMenuListbox, type AnchoredMenuPlacement, type AnchoredMenuProps, type AutoGrowRows, type BicDraft, BicInput, type BicInputProps, BicRejection, type BicRejectionLabels, type BicVerdict, type BlurVerdict, COUNTRIES, type ChecklistItem, ChipLabelWrap, type ChipOption, ChipSelector, type ChipSelectorProps, type ChipSingleSelectRole, type ChipVariant, type ControlOption, type Country, CountryField, type CountryFieldProps, CountryFlag, type CountryFlagProps, DEFAULT_DATE_PICKER_LABELS, DEFAULT_MAX_RECENTS, DEFAULT_OPTIONAL_LABEL, DEFAULT_TYPEAHEAD_MAX_SUGGESTIONS, DEFAULT_TYPEAHEAD_MIN_CHARS, DateDisplay, DateField, type DateFieldProps, DateInput, type DateInputProps, type DatePickerLabels, DatePickerProvider, type DatePickerProviderProps, DateRangeControl, type DateRangeControlProps, type DateRangeValue, DateTimeField, type DateTimeFieldProps, type DecisionChecklist, type DecisionError, type DecisionOutcome, DecisionPanel, type DecisionPanelLabels, type DecisionPanelProps, type DecisionPanelVariant, type DecisionSubmission, type DecisionTone, type DropdownFrame, DropdownPlacement, FLAG_HEIGHT, FLAG_WIDTH, Field, type FieldChildContext, type FieldChildren, type FieldLabelVariant, type FieldMarker, type FieldProps, type FieldSpacing, FileInput, type FileInputProps, FixBar, type FixBarProps, type FlagShape, FlagShapeKind, type Focusable, type FocusableRefs, FormActions, type FormActionsProps, FormCell, type FormCellProps, FormCheckbox, type FormCheckboxProps, FormField, type FormFieldProps, FormGrid, type FormGridProps, FormSection, type FormSectionProps, FormStack, type FormStackProps, FormStatusLine, type FormStatusLineProps, FormSwitch, type FormSwitchProps, GatedChecklist, type GatedChecklistProps, type GroupSelection, IBAN_MAX_LENGTH, IBAN_REGISTERED_COUNTRY_COUNT, INLINE_FIELD_ROW_MIN_WIDTH, type IbanDraft, IbanInput, type IbanInputProps, IbanRejection, type IbanRejectionLabels, type IbanVerdict, InlineFieldRow, type InlineFieldRowLayout, type InlineFieldRowProps, LINE_ITEMS_WIDE_MIN_WIDTH, type LineItemCell, type LineItemColumn, LineItems, type LineItemsLabels, type LineItemsProps, PHONE_MAX_WIDTH, RESPONSIVE_FORM_DEFAULT_BREAKPOINT, RadioList, type RadioListProps, type RadioOption, type RadioRowIdentity, type RecentValues, ResponsiveFormLayout, type ResponsiveFormLayoutProps, SEGMENT_BESIDE_FIELD, SEGMENT_BESIDE_TEXT_INPUT, SearchSelect, type SearchSelectLabels, type SearchSelectProps, type SearchSelectSections, type SearchSelectState, type SearchSelectTrigger, SelectControl, type SelectControlProps, SelectField, type SelectFieldProps, type SelectMenuAnchor, type SelectMotion, SelectSurface, type StepNeighbours, StepperNav, type StepperNavLabels, type StepperNavProps, type StepperStep, StepperTabs, type StepperTabsProps, type ThemedInput, ThemedTextInput, type ThemedTextInputProps, TypeaheadControl, type TypeaheadControlProps, type TypeaheadSearch, type TypeaheadSearchProps, UploadWithLinkField, type UploadWithLinkFieldProps, type UploadWithLinkLabels, type UseThemedInputOptions, actionBarPosition, buildSearchSelectSections, canRemoveLine, controlStyles, countryFieldOptions, countryFlag, countryOptions, defaultDecisionVariant, draftBic, draftIban, dropdownFrame, findOption, fitDropdownWidth, flagShapes, groupAriaChecked, groupInFours, highlightAfterQuery, ibanCounter, ibanLengthFor, inlineFieldRowLayout, isAddOnOpen, isChecklistComplete, isFallbackFlag, isFixBarVisible, isLineItemsWide, isOutside, isUnmatched, isWideFormLayout, leadFirst, lineItemColumnFlex, lineNumberOf, moveHighlight, nextHighlight, placeDropdown, radioRowIdentity, rejectionMessage, resolveGroupSelection, resolveSelectMotion, resolveStepNeighbours, rowsForText, suggestOptions, toCountryValue, toggleGroupSelection, useAutoGrowRows, useBlurVerdict, useDeferredFocus, useFocusFirstInvalid, useKeepInView, useOutsidePress, useRecentValues, useReducedMotion, useSearchSelectState, useThemedInput, validateBic, validateDecision, validateIban };
package/dist/index.js CHANGED
@@ -2701,8 +2701,86 @@ function monthStart(iso) {
2701
2701
  return `${iso.slice(0, MONTH_PREFIX)}-01`;
2702
2702
  }
2703
2703
 
2704
- // src/DatePicker/utils/weekStart.ts
2704
+ // src/DatePicker/utils/formatDate.ts
2705
+ var SAMPLE_UTC = Date.UTC(2027, 5, 12);
2706
+ var TWO_DIGIT_YEAR = 100;
2707
+ var CENTURY = 2e3;
2708
+ var PART_COUNT = 3;
2709
+ var PAD3 = 2;
2705
2710
  var MONDAY2 = 1;
2711
+ var ISO_LIKE = /^\d{4}-\d{1,2}-\d{1,2}$/;
2712
+ var MONTH_INDEXES = Array.from({ length: 12 }, (_unused, index) => index);
2713
+ var WEEK_OFFSETS = Array.from({ length: 7 }, (_unused, index) => index);
2714
+ var UTC = "UTC";
2715
+ var PART_OF = { day: "day" /* Day */, month: "month" /* Month */, year: "year" /* Year */ };
2716
+ function utcOf(iso) {
2717
+ const parts = parseIso(iso);
2718
+ return parts === null ? null : new Date(Date.UTC(parts.year, parts.month - 1, parts.day));
2719
+ }
2720
+ function formatWith(iso, locale, options) {
2721
+ const date = utcOf(iso);
2722
+ if (date === null) return iso;
2723
+ return new Intl.DateTimeFormat(locale, { ...options, timeZone: UTC }).format(date).replace(/,/g, "");
2724
+ }
2725
+ function formatDisplay(iso, locale) {
2726
+ return formatWith(iso, locale, { weekday: "short", day: "numeric", month: "short", year: "numeric" });
2727
+ }
2728
+ function formatShort(iso, locale, withYear = true) {
2729
+ return formatWith(iso, locale, withYear ? { day: "numeric", month: "short", year: "numeric" } : { day: "numeric", month: "short" });
2730
+ }
2731
+ function formatMonthYear(iso, locale) {
2732
+ return formatWith(iso, locale, { month: "long", year: "numeric" });
2733
+ }
2734
+ function monthNames(locale) {
2735
+ const format = new Intl.DateTimeFormat(locale, { month: "long", timeZone: UTC });
2736
+ return MONTH_INDEXES.map((month) => format.format(new Date(Date.UTC(2024, month, 1))));
2737
+ }
2738
+ function weekdayNames(locale, firstDay = MONDAY2) {
2739
+ const format = new Intl.DateTimeFormat(locale, { weekday: "short", timeZone: UTC });
2740
+ return WEEK_OFFSETS.map((offset) => format.format(new Date(Date.UTC(2024, 0, firstDay + offset))));
2741
+ }
2742
+ function typedOrder(locale) {
2743
+ const parts = new Intl.DateTimeFormat(locale, { day: "numeric", month: "numeric", year: "numeric", timeZone: UTC }).formatToParts(new Date(SAMPLE_UTC));
2744
+ return parts.map((part) => PART_OF[part.type]).filter((part) => part !== void 0);
2745
+ }
2746
+ function formatTyped(iso, locale) {
2747
+ const parts = parseIso(iso);
2748
+ if (parts === null) return iso;
2749
+ const text = {
2750
+ ["day" /* Day */]: String(parts.day).padStart(PAD3, "0"),
2751
+ ["month" /* Month */]: String(parts.month).padStart(PAD3, "0"),
2752
+ ["year" /* Year */]: String(parts.year)
2753
+ };
2754
+ return typedOrder(locale).map((part) => text[part]).join("/");
2755
+ }
2756
+ function parseTyped(text, locale) {
2757
+ const trimmed = text.trim();
2758
+ if (ISO_LIKE.test(trimmed)) {
2759
+ const [year = 0, month = 0, day = 0] = trimmed.split("-").map(Number);
2760
+ const parts2 = { year, month, day };
2761
+ return isValidParts(parts2) ? toIso(parts2) : null;
2762
+ }
2763
+ const numbers2 = trimmed.split(/\D+/).filter((piece) => piece !== "").map(Number);
2764
+ if (numbers2.length !== PART_COUNT) return null;
2765
+ const order = typedOrder(locale);
2766
+ const read = (part) => numbers2[order.indexOf(part)] ?? 0;
2767
+ const rawYear = read("year" /* Year */);
2768
+ const parts = { year: rawYear < TWO_DIGIT_YEAR ? CENTURY + rawYear : rawYear, month: read("month" /* Month */), day: read("day" /* Day */) };
2769
+ return isValidParts(parts) ? toIso(parts) : null;
2770
+ }
2771
+
2772
+ // src/DatePicker/utils/DateDisplay.ts
2773
+ var DateDisplay = /* @__PURE__ */ ((DateDisplay2) => {
2774
+ DateDisplay2["Long"] = "long";
2775
+ DateDisplay2["Numeric"] = "numeric";
2776
+ return DateDisplay2;
2777
+ })(DateDisplay || {});
2778
+ function displayFormatter(display) {
2779
+ return display === "numeric" /* Numeric */ ? formatTyped : formatDisplay;
2780
+ }
2781
+
2782
+ // src/DatePicker/utils/weekStart.ts
2783
+ var MONDAY3 = 1;
2706
2784
  var SUNDAY2 = 7;
2707
2785
  var SUNDAY_REGIONS = /* @__PURE__ */ new Set(["US", "CA", "MX", "BR", "JP", "KR", "TW", "HK", "IL", "PH", "IN", "ZA", "SA", "PE", "CO", "VE", "GT", "HN", "PA", "PR", "DO", "SV", "TH", "ID"]);
2708
2786
  function weekFirstDay(locale) {
@@ -2711,20 +2789,20 @@ function weekFirstDay(locale) {
2711
2789
  const info = resolved;
2712
2790
  const first = info.getWeekInfo?.().firstDay ?? info.weekInfo?.firstDay;
2713
2791
  if (first !== void 0) return first;
2714
- return SUNDAY_REGIONS.has(resolved.maximize().region ?? "") ? SUNDAY2 : MONDAY2;
2792
+ return SUNDAY_REGIONS.has(resolved.maximize().region ?? "") ? SUNDAY2 : MONDAY3;
2715
2793
  } catch {
2716
- return MONDAY2;
2794
+ return MONDAY3;
2717
2795
  }
2718
2796
  }
2719
2797
  var DatePickerContext = React37.createContext({ labels: DEFAULT_DATE_PICKER_LABELS });
2720
- function DatePickerProvider({ labels, locale, today, children }) {
2721
- const value = React37.useMemo(() => ({ labels: { ...DEFAULT_DATE_PICKER_LABELS, ...labels }, locale, today }), [labels, locale, today]);
2798
+ function DatePickerProvider({ labels, locale, today, display, children }) {
2799
+ const value = React37.useMemo(() => ({ labels: { ...DEFAULT_DATE_PICKER_LABELS, ...labels }, locale, today, display }), [labels, locale, today, display]);
2722
2800
  return /* @__PURE__ */ jsxRuntime.jsx(DatePickerContext.Provider, { value, children });
2723
2801
  }
2724
2802
  function useDatePickerConfig() {
2725
2803
  const config = React37.useContext(DatePickerContext);
2726
2804
  const firstDay = React37.useMemo(() => weekFirstDay(config.locale), [config.locale]);
2727
- return { labels: config.labels, locale: config.locale, today: config.today ?? todayIso(), firstDay };
2805
+ return { labels: config.labels, locale: config.locale, today: config.today ?? todayIso(), firstDay, display: config.display ?? "long" /* Long */ };
2728
2806
  }
2729
2807
 
2730
2808
  // src/DatePicker/utils/motionStyles.ts
@@ -2769,14 +2847,14 @@ function PickerSurface({ anchorRef, phone, minWidth, label, testID, onDismiss, c
2769
2847
  // src/DatePicker/utils/calendarKeys.ts
2770
2848
  var DAYS_IN_WEEK2 = 7;
2771
2849
  var MONTHS_IN_YEAR2 = 12;
2772
- var MONDAY3 = 1;
2850
+ var MONDAY4 = 1;
2773
2851
  var DAY_STEPS = {
2774
2852
  ArrowLeft: -1,
2775
2853
  ArrowRight: 1,
2776
2854
  ArrowUp: -DAYS_IN_WEEK2,
2777
2855
  ArrowDown: DAYS_IN_WEEK2
2778
2856
  };
2779
- function nextFocusDay(iso, key, shiftKey = false, firstDay = MONDAY3) {
2857
+ function nextFocusDay(iso, key, shiftKey = false, firstDay = MONDAY4) {
2780
2858
  const step = DAY_STEPS[key];
2781
2859
  if (step !== void 0) return addDays(iso, step);
2782
2860
  const monthStep = shiftKey ? MONTHS_IN_YEAR2 : 1;
@@ -2864,74 +2942,6 @@ function DayCell({ iso, state, testID, label, hint, onPick, onKey }) {
2864
2942
  ) });
2865
2943
  }
2866
2944
 
2867
- // src/DatePicker/utils/formatDate.ts
2868
- var SAMPLE_UTC = Date.UTC(2027, 5, 12);
2869
- var TWO_DIGIT_YEAR = 100;
2870
- var CENTURY = 2e3;
2871
- var PART_COUNT = 3;
2872
- var PAD3 = 2;
2873
- var MONDAY4 = 1;
2874
- var ISO_LIKE = /^\d{4}-\d{1,2}-\d{1,2}$/;
2875
- var MONTH_INDEXES = Array.from({ length: 12 }, (_unused, index) => index);
2876
- var WEEK_OFFSETS = Array.from({ length: 7 }, (_unused, index) => index);
2877
- var UTC = "UTC";
2878
- var PART_OF = { day: "day" /* Day */, month: "month" /* Month */, year: "year" /* Year */ };
2879
- function utcOf(iso) {
2880
- const parts = parseIso(iso);
2881
- return parts === null ? null : new Date(Date.UTC(parts.year, parts.month - 1, parts.day));
2882
- }
2883
- function formatWith(iso, locale, options) {
2884
- const date = utcOf(iso);
2885
- if (date === null) return iso;
2886
- return new Intl.DateTimeFormat(locale, { ...options, timeZone: UTC }).format(date).replace(/,/g, "");
2887
- }
2888
- function formatDisplay(iso, locale) {
2889
- return formatWith(iso, locale, { weekday: "short", day: "numeric", month: "short", year: "numeric" });
2890
- }
2891
- function formatShort(iso, locale, withYear = true) {
2892
- return formatWith(iso, locale, withYear ? { day: "numeric", month: "short", year: "numeric" } : { day: "numeric", month: "short" });
2893
- }
2894
- function formatMonthYear(iso, locale) {
2895
- return formatWith(iso, locale, { month: "long", year: "numeric" });
2896
- }
2897
- function monthNames(locale) {
2898
- const format = new Intl.DateTimeFormat(locale, { month: "long", timeZone: UTC });
2899
- return MONTH_INDEXES.map((month) => format.format(new Date(Date.UTC(2024, month, 1))));
2900
- }
2901
- function weekdayNames(locale, firstDay = MONDAY4) {
2902
- const format = new Intl.DateTimeFormat(locale, { weekday: "short", timeZone: UTC });
2903
- return WEEK_OFFSETS.map((offset) => format.format(new Date(Date.UTC(2024, 0, firstDay + offset))));
2904
- }
2905
- function typedOrder(locale) {
2906
- const parts = new Intl.DateTimeFormat(locale, { day: "numeric", month: "numeric", year: "numeric", timeZone: UTC }).formatToParts(new Date(SAMPLE_UTC));
2907
- return parts.map((part) => PART_OF[part.type]).filter((part) => part !== void 0);
2908
- }
2909
- function formatTyped(iso, locale) {
2910
- const parts = parseIso(iso);
2911
- if (parts === null) return iso;
2912
- const text = {
2913
- ["day" /* Day */]: String(parts.day).padStart(PAD3, "0"),
2914
- ["month" /* Month */]: String(parts.month).padStart(PAD3, "0"),
2915
- ["year" /* Year */]: String(parts.year)
2916
- };
2917
- return typedOrder(locale).map((part) => text[part]).join("/");
2918
- }
2919
- function parseTyped(text, locale) {
2920
- const trimmed = text.trim();
2921
- if (ISO_LIKE.test(trimmed)) {
2922
- const [year = 0, month = 0, day = 0] = trimmed.split("-").map(Number);
2923
- const parts2 = { year, month, day };
2924
- return isValidParts(parts2) ? toIso(parts2) : null;
2925
- }
2926
- const numbers2 = trimmed.split(/\D+/).filter((piece) => piece !== "").map(Number);
2927
- if (numbers2.length !== PART_COUNT) return null;
2928
- const order = typedOrder(locale);
2929
- const read = (part) => numbers2[order.indexOf(part)] ?? 0;
2930
- const rawYear = read("year" /* Year */);
2931
- const parts = { year: rawYear < TWO_DIGIT_YEAR ? CENTURY + rawYear : rawYear, month: read("month" /* Month */), day: read("day" /* Day */) };
2932
- return isValidParts(parts) ? toIso(parts) : null;
2933
- }
2934
-
2935
2945
  // src/DatePicker/utils/monthGrid.ts
2936
2946
  var DAYS_IN_WEEK3 = 7;
2937
2947
  var MONDAY5 = 1;
@@ -3197,13 +3207,13 @@ var ICON_SLOT = { position: "absolute", right: 2, top: 0, bottom: 0, display: "f
3197
3207
  var anchorStyles = reactNative.StyleSheet.create({ wrap: { position: "relative", width: "100%" } });
3198
3208
  function DatePickerInput({ fieldProps, context, onTypedError }) {
3199
3209
  const { label, value, onChange, onSubmit, accessibilityHint, testID, required, disabled = false, min, max } = fieldProps;
3200
- const { labels } = useDatePickerConfig();
3210
+ const { labels, display } = useDatePickerConfig();
3201
3211
  const phone = useIsPhone();
3202
3212
  const [open, setOpen] = React37.useState(false);
3203
3213
  const anchorRef = React37.useRef(null);
3204
3214
  const inputRef = React37.useRef(null);
3205
3215
  const bounds = { min, max };
3206
- const typed = useTypedDate({ value, onChange, bounds, format: formatDisplay, onError: onTypedError, editOnType: true });
3216
+ const typed = useTypedDate({ value, onChange, bounds, format: displayFormatter(display), onError: onTypedError, editOnType: true });
3207
3217
  const edit = typedEditBind(typed);
3208
3218
  const { style, focusBind, hoverBind } = useThemedInput({ hasError: context.hasError, editable: !disabled });
3209
3219
  const focus = focusBind;
@@ -5759,6 +5769,7 @@ exports.DEFAULT_MAX_RECENTS = DEFAULT_MAX_RECENTS;
5759
5769
  exports.DEFAULT_OPTIONAL_LABEL = DEFAULT_OPTIONAL_LABEL;
5760
5770
  exports.DEFAULT_TYPEAHEAD_MAX_SUGGESTIONS = DEFAULT_TYPEAHEAD_MAX_SUGGESTIONS;
5761
5771
  exports.DEFAULT_TYPEAHEAD_MIN_CHARS = DEFAULT_TYPEAHEAD_MIN_CHARS;
5772
+ exports.DateDisplay = DateDisplay;
5762
5773
  exports.DateField = DateField;
5763
5774
  exports.DateInput = DateInput;
5764
5775
  exports.DatePickerProvider = DatePickerProvider;