@dloizides/ui-forms 1.44.0 → 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 +9 -2
- package/dist/index.d.ts +9 -2
- package/dist/index.js +101 -84
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +101 -85
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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
|
@@ -1812,7 +1812,10 @@ var ACTIVATION_KEYS = ["Enter", " ", "Spacebar"];
|
|
|
1812
1812
|
var HINT_FONT_SIZE2 = 12;
|
|
1813
1813
|
var BOX_SIZE = 20;
|
|
1814
1814
|
var BOX_RADIUS = 5;
|
|
1815
|
-
var
|
|
1815
|
+
var TICK_WIDTH = 6;
|
|
1816
|
+
var TICK_HEIGHT = 10;
|
|
1817
|
+
var TICK_STROKE = 2;
|
|
1818
|
+
var TICK_LIFT = -2;
|
|
1816
1819
|
var DISABLED_OPACITY = 0.5;
|
|
1817
1820
|
var FOCUS_RING_WIDTH = 2;
|
|
1818
1821
|
var WEB_NO_DEFAULT_OUTLINE = { outlineStyle: "none" };
|
|
@@ -1850,10 +1853,13 @@ var styles15 = reactNative.StyleSheet.create({
|
|
|
1850
1853
|
borderWidth: FOCUS_RING_WIDTH,
|
|
1851
1854
|
borderRadius: BOX_RADIUS - FOCUS_RING_INSET
|
|
1852
1855
|
},
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1856
|
+
tick: {
|
|
1857
|
+
width: TICK_WIDTH,
|
|
1858
|
+
height: TICK_HEIGHT,
|
|
1859
|
+
marginTop: TICK_LIFT,
|
|
1860
|
+
borderRightWidth: TICK_STROKE,
|
|
1861
|
+
borderBottomWidth: TICK_STROKE,
|
|
1862
|
+
transform: [{ rotate: "45deg" }]
|
|
1857
1863
|
},
|
|
1858
1864
|
textColumn: {
|
|
1859
1865
|
flex: 1
|
|
@@ -1933,7 +1939,7 @@ var FormCheckbox = ({
|
|
|
1933
1939
|
children: [
|
|
1934
1940
|
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles15.box, value ? themeStyles.boxOn : themeStyles.boxOff], testID: `${testID}-box`, children: [
|
|
1935
1941
|
focused ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { pointerEvents: "none", style: [styles15.focusRing, themeStyles.ring], testID: `${testID}-focus-ring` }) : null,
|
|
1936
|
-
value ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.
|
|
1942
|
+
value ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityElementsHidden: true, pointerEvents: "none", style: [styles15.tick, { borderColor: colors.surface }], testID: `${testID}-tick` }) : null
|
|
1937
1943
|
] }),
|
|
1938
1944
|
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles15.textColumn, children: [
|
|
1939
1945
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles15.label, themeStyles.label], children: label }),
|
|
@@ -2695,8 +2701,86 @@ function monthStart(iso) {
|
|
|
2695
2701
|
return `${iso.slice(0, MONTH_PREFIX)}-01`;
|
|
2696
2702
|
}
|
|
2697
2703
|
|
|
2698
|
-
// src/DatePicker/utils/
|
|
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;
|
|
2699
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;
|
|
2700
2784
|
var SUNDAY2 = 7;
|
|
2701
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"]);
|
|
2702
2786
|
function weekFirstDay(locale) {
|
|
@@ -2705,20 +2789,20 @@ function weekFirstDay(locale) {
|
|
|
2705
2789
|
const info = resolved;
|
|
2706
2790
|
const first = info.getWeekInfo?.().firstDay ?? info.weekInfo?.firstDay;
|
|
2707
2791
|
if (first !== void 0) return first;
|
|
2708
|
-
return SUNDAY_REGIONS.has(resolved.maximize().region ?? "") ? SUNDAY2 :
|
|
2792
|
+
return SUNDAY_REGIONS.has(resolved.maximize().region ?? "") ? SUNDAY2 : MONDAY3;
|
|
2709
2793
|
} catch {
|
|
2710
|
-
return
|
|
2794
|
+
return MONDAY3;
|
|
2711
2795
|
}
|
|
2712
2796
|
}
|
|
2713
2797
|
var DatePickerContext = React37.createContext({ labels: DEFAULT_DATE_PICKER_LABELS });
|
|
2714
|
-
function DatePickerProvider({ labels, locale, today, children }) {
|
|
2715
|
-
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]);
|
|
2716
2800
|
return /* @__PURE__ */ jsxRuntime.jsx(DatePickerContext.Provider, { value, children });
|
|
2717
2801
|
}
|
|
2718
2802
|
function useDatePickerConfig() {
|
|
2719
2803
|
const config = React37.useContext(DatePickerContext);
|
|
2720
2804
|
const firstDay = React37.useMemo(() => weekFirstDay(config.locale), [config.locale]);
|
|
2721
|
-
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 */ };
|
|
2722
2806
|
}
|
|
2723
2807
|
|
|
2724
2808
|
// src/DatePicker/utils/motionStyles.ts
|
|
@@ -2763,14 +2847,14 @@ function PickerSurface({ anchorRef, phone, minWidth, label, testID, onDismiss, c
|
|
|
2763
2847
|
// src/DatePicker/utils/calendarKeys.ts
|
|
2764
2848
|
var DAYS_IN_WEEK2 = 7;
|
|
2765
2849
|
var MONTHS_IN_YEAR2 = 12;
|
|
2766
|
-
var
|
|
2850
|
+
var MONDAY4 = 1;
|
|
2767
2851
|
var DAY_STEPS = {
|
|
2768
2852
|
ArrowLeft: -1,
|
|
2769
2853
|
ArrowRight: 1,
|
|
2770
2854
|
ArrowUp: -DAYS_IN_WEEK2,
|
|
2771
2855
|
ArrowDown: DAYS_IN_WEEK2
|
|
2772
2856
|
};
|
|
2773
|
-
function nextFocusDay(iso, key, shiftKey = false, firstDay =
|
|
2857
|
+
function nextFocusDay(iso, key, shiftKey = false, firstDay = MONDAY4) {
|
|
2774
2858
|
const step = DAY_STEPS[key];
|
|
2775
2859
|
if (step !== void 0) return addDays(iso, step);
|
|
2776
2860
|
const monthStep = shiftKey ? MONTHS_IN_YEAR2 : 1;
|
|
@@ -2858,74 +2942,6 @@ function DayCell({ iso, state, testID, label, hint, onPick, onKey }) {
|
|
|
2858
2942
|
) });
|
|
2859
2943
|
}
|
|
2860
2944
|
|
|
2861
|
-
// src/DatePicker/utils/formatDate.ts
|
|
2862
|
-
var SAMPLE_UTC = Date.UTC(2027, 5, 12);
|
|
2863
|
-
var TWO_DIGIT_YEAR = 100;
|
|
2864
|
-
var CENTURY = 2e3;
|
|
2865
|
-
var PART_COUNT = 3;
|
|
2866
|
-
var PAD3 = 2;
|
|
2867
|
-
var MONDAY4 = 1;
|
|
2868
|
-
var ISO_LIKE = /^\d{4}-\d{1,2}-\d{1,2}$/;
|
|
2869
|
-
var MONTH_INDEXES = Array.from({ length: 12 }, (_unused, index) => index);
|
|
2870
|
-
var WEEK_OFFSETS = Array.from({ length: 7 }, (_unused, index) => index);
|
|
2871
|
-
var UTC = "UTC";
|
|
2872
|
-
var PART_OF = { day: "day" /* Day */, month: "month" /* Month */, year: "year" /* Year */ };
|
|
2873
|
-
function utcOf(iso) {
|
|
2874
|
-
const parts = parseIso(iso);
|
|
2875
|
-
return parts === null ? null : new Date(Date.UTC(parts.year, parts.month - 1, parts.day));
|
|
2876
|
-
}
|
|
2877
|
-
function formatWith(iso, locale, options) {
|
|
2878
|
-
const date = utcOf(iso);
|
|
2879
|
-
if (date === null) return iso;
|
|
2880
|
-
return new Intl.DateTimeFormat(locale, { ...options, timeZone: UTC }).format(date).replace(/,/g, "");
|
|
2881
|
-
}
|
|
2882
|
-
function formatDisplay(iso, locale) {
|
|
2883
|
-
return formatWith(iso, locale, { weekday: "short", day: "numeric", month: "short", year: "numeric" });
|
|
2884
|
-
}
|
|
2885
|
-
function formatShort(iso, locale, withYear = true) {
|
|
2886
|
-
return formatWith(iso, locale, withYear ? { day: "numeric", month: "short", year: "numeric" } : { day: "numeric", month: "short" });
|
|
2887
|
-
}
|
|
2888
|
-
function formatMonthYear(iso, locale) {
|
|
2889
|
-
return formatWith(iso, locale, { month: "long", year: "numeric" });
|
|
2890
|
-
}
|
|
2891
|
-
function monthNames(locale) {
|
|
2892
|
-
const format = new Intl.DateTimeFormat(locale, { month: "long", timeZone: UTC });
|
|
2893
|
-
return MONTH_INDEXES.map((month) => format.format(new Date(Date.UTC(2024, month, 1))));
|
|
2894
|
-
}
|
|
2895
|
-
function weekdayNames(locale, firstDay = MONDAY4) {
|
|
2896
|
-
const format = new Intl.DateTimeFormat(locale, { weekday: "short", timeZone: UTC });
|
|
2897
|
-
return WEEK_OFFSETS.map((offset) => format.format(new Date(Date.UTC(2024, 0, firstDay + offset))));
|
|
2898
|
-
}
|
|
2899
|
-
function typedOrder(locale) {
|
|
2900
|
-
const parts = new Intl.DateTimeFormat(locale, { day: "numeric", month: "numeric", year: "numeric", timeZone: UTC }).formatToParts(new Date(SAMPLE_UTC));
|
|
2901
|
-
return parts.map((part) => PART_OF[part.type]).filter((part) => part !== void 0);
|
|
2902
|
-
}
|
|
2903
|
-
function formatTyped(iso, locale) {
|
|
2904
|
-
const parts = parseIso(iso);
|
|
2905
|
-
if (parts === null) return iso;
|
|
2906
|
-
const text = {
|
|
2907
|
-
["day" /* Day */]: String(parts.day).padStart(PAD3, "0"),
|
|
2908
|
-
["month" /* Month */]: String(parts.month).padStart(PAD3, "0"),
|
|
2909
|
-
["year" /* Year */]: String(parts.year)
|
|
2910
|
-
};
|
|
2911
|
-
return typedOrder(locale).map((part) => text[part]).join("/");
|
|
2912
|
-
}
|
|
2913
|
-
function parseTyped(text, locale) {
|
|
2914
|
-
const trimmed = text.trim();
|
|
2915
|
-
if (ISO_LIKE.test(trimmed)) {
|
|
2916
|
-
const [year = 0, month = 0, day = 0] = trimmed.split("-").map(Number);
|
|
2917
|
-
const parts2 = { year, month, day };
|
|
2918
|
-
return isValidParts(parts2) ? toIso(parts2) : null;
|
|
2919
|
-
}
|
|
2920
|
-
const numbers2 = trimmed.split(/\D+/).filter((piece) => piece !== "").map(Number);
|
|
2921
|
-
if (numbers2.length !== PART_COUNT) return null;
|
|
2922
|
-
const order = typedOrder(locale);
|
|
2923
|
-
const read = (part) => numbers2[order.indexOf(part)] ?? 0;
|
|
2924
|
-
const rawYear = read("year" /* Year */);
|
|
2925
|
-
const parts = { year: rawYear < TWO_DIGIT_YEAR ? CENTURY + rawYear : rawYear, month: read("month" /* Month */), day: read("day" /* Day */) };
|
|
2926
|
-
return isValidParts(parts) ? toIso(parts) : null;
|
|
2927
|
-
}
|
|
2928
|
-
|
|
2929
2945
|
// src/DatePicker/utils/monthGrid.ts
|
|
2930
2946
|
var DAYS_IN_WEEK3 = 7;
|
|
2931
2947
|
var MONDAY5 = 1;
|
|
@@ -3191,13 +3207,13 @@ var ICON_SLOT = { position: "absolute", right: 2, top: 0, bottom: 0, display: "f
|
|
|
3191
3207
|
var anchorStyles = reactNative.StyleSheet.create({ wrap: { position: "relative", width: "100%" } });
|
|
3192
3208
|
function DatePickerInput({ fieldProps, context, onTypedError }) {
|
|
3193
3209
|
const { label, value, onChange, onSubmit, accessibilityHint, testID, required, disabled = false, min, max } = fieldProps;
|
|
3194
|
-
const { labels } = useDatePickerConfig();
|
|
3210
|
+
const { labels, display } = useDatePickerConfig();
|
|
3195
3211
|
const phone = useIsPhone();
|
|
3196
3212
|
const [open, setOpen] = React37.useState(false);
|
|
3197
3213
|
const anchorRef = React37.useRef(null);
|
|
3198
3214
|
const inputRef = React37.useRef(null);
|
|
3199
3215
|
const bounds = { min, max };
|
|
3200
|
-
const typed = useTypedDate({ value, onChange, bounds, format:
|
|
3216
|
+
const typed = useTypedDate({ value, onChange, bounds, format: displayFormatter(display), onError: onTypedError, editOnType: true });
|
|
3201
3217
|
const edit = typedEditBind(typed);
|
|
3202
3218
|
const { style, focusBind, hoverBind } = useThemedInput({ hasError: context.hasError, editable: !disabled });
|
|
3203
3219
|
const focus = focusBind;
|
|
@@ -5753,6 +5769,7 @@ exports.DEFAULT_MAX_RECENTS = DEFAULT_MAX_RECENTS;
|
|
|
5753
5769
|
exports.DEFAULT_OPTIONAL_LABEL = DEFAULT_OPTIONAL_LABEL;
|
|
5754
5770
|
exports.DEFAULT_TYPEAHEAD_MAX_SUGGESTIONS = DEFAULT_TYPEAHEAD_MAX_SUGGESTIONS;
|
|
5755
5771
|
exports.DEFAULT_TYPEAHEAD_MIN_CHARS = DEFAULT_TYPEAHEAD_MIN_CHARS;
|
|
5772
|
+
exports.DateDisplay = DateDisplay;
|
|
5756
5773
|
exports.DateField = DateField;
|
|
5757
5774
|
exports.DateInput = DateInput;
|
|
5758
5775
|
exports.DatePickerProvider = DatePickerProvider;
|