@dloizides/ui-forms 1.58.0 → 1.60.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 +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +25 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -942,6 +942,13 @@ declare function SelectLookProvider({ look, borderColor, backgroundColor, textCo
|
|
|
942
942
|
* @param windowWidth the current window width in px
|
|
943
943
|
*/
|
|
944
944
|
declare function selectLookMetrics({ look, borderColor, backgroundColor, textColor }: SelectLookConfig, windowWidth: number): SelectLookMetrics | undefined;
|
|
945
|
+
/** The metrics of the nearest provider's look at the current window width; `undefined` for `default`. */
|
|
946
|
+
declare function useSelectLookMetrics(): SelectLookMetrics | undefined;
|
|
947
|
+
/**
|
|
948
|
+
* The text-input box of a look, so an input beside the look's selects shares their height, padding, font and radius.
|
|
949
|
+
* @param m the look metrics; `undefined` (the `default` look) returns no override
|
|
950
|
+
*/
|
|
951
|
+
declare function lookInputBox(m: SelectLookMetrics | undefined): TextStyle | undefined;
|
|
945
952
|
|
|
946
953
|
/** The row index an arrow key moves to: wraps at both ends, -1 when there are no rows. */
|
|
947
954
|
declare function nextHighlight(current: number, count: number, delta: number): number;
|
|
@@ -1108,6 +1115,8 @@ interface DatePickerLabels {
|
|
|
1108
1115
|
rangeDialog: string;
|
|
1109
1116
|
openCalendar: string;
|
|
1110
1117
|
openCalendarHint: string;
|
|
1118
|
+
/** PRE-LOCALIZED empty-field placeholder; empty = the locale's pattern, en-GB `dd/mm/yyyy`. */
|
|
1119
|
+
datePlaceholder: string;
|
|
1111
1120
|
previousMonth: string;
|
|
1112
1121
|
nextMonth: string;
|
|
1113
1122
|
monthHint: string;
|
|
@@ -2054,4 +2063,4 @@ declare function RevealToggle({ revealed, onToggle, onPressIn, showLabel, hideLa
|
|
|
2054
2063
|
declare function changedRules(previous: readonly PasswordRuleState[], next: readonly PasswordRuleState[]): PasswordRuleState[];
|
|
2055
2064
|
declare function ruleAnnouncement(changed: readonly PasswordRuleState[], labels: Pick<PasswordFieldLabels, 'met' | 'unmet'>): string;
|
|
2056
2065
|
|
|
2057
|
-
export { ActionBar, type ActionBarProps, AddOnRequest, type AddOnRequestProps, AlignToControl, type AlignToControlProps, type AnchorRect, AnchoredMenu, type AnchoredMenuColors, type AnchoredMenuListbox, type AnchoredMenuPlacement, type AnchoredMenuProps, type AssignedServerErrors, type AutoGrowRows, type BicDraft, BicInput, type BicInputProps, BicRejection, type BicRejectionLabels, type BicVerdict, type BlurVerdict, COUNTRIES, type CheckboxLook, CheckboxLookProvider, type ChecklistItem, ChipLabelWrap, type ChipOption, type ChipOutlineTone, ChipSelector, type ChipSelectorProps, type ChipSingleSelectRole, type ChipSize, type ChipVariant, type CodeFormatter, 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, type FormSwitchVariant, 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, type MultiSelectChipLabels, MultiSelectField, type MultiSelectFieldProps, PHONE_MAX_WIDTH, PasswordField, type PasswordFieldColors, type PasswordFieldLabels, type PasswordFieldProps, type PasswordRuleState, PasswordRules, PasswordRulesDisplay, type PasswordRulesProps, RESPONSIVE_FORM_DEFAULT_BREAKPOINT, RadioList, type RadioListProps, type RadioOption, type RadioRowIdentity, type RecentValues, ResponsiveFormLayout, type ResponsiveFormLayoutProps, RevealToggle, type RevealToggleProps, type RuleColors, RuleTone, 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 SelectLook, type SelectLookConfig, type SelectLookMetrics, SelectLookProvider, type SelectMenuAnchor, type SelectMotion, SelectSurface, type ServerFieldErrors, 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 UseServerFieldErrorsOptions, type UseThemedInputOptions, actionBarPosition, assignServerErrors, buildSearchSelectSections, canRemoveLine, changedRules, 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, ruleAnnouncement, ruleColorsFrom, ruleTone, selectLookMetrics, suggestOptions, toCountryValue, toggleGroupSelection, useAutoGrowRows, useBlurVerdict, useDeferredFocus, useFocusFirstInvalid, useKeepInView, useOutsidePress, useRecentValues, useReducedMotion, useSearchSelectState, useServerFieldErrors, useThemedInput, validateBic, validateDecision, validateIban };
|
|
2066
|
+
export { ActionBar, type ActionBarProps, AddOnRequest, type AddOnRequestProps, AlignToControl, type AlignToControlProps, type AnchorRect, AnchoredMenu, type AnchoredMenuColors, type AnchoredMenuListbox, type AnchoredMenuPlacement, type AnchoredMenuProps, type AssignedServerErrors, type AutoGrowRows, type BicDraft, BicInput, type BicInputProps, BicRejection, type BicRejectionLabels, type BicVerdict, type BlurVerdict, COUNTRIES, type CheckboxLook, CheckboxLookProvider, type ChecklistItem, ChipLabelWrap, type ChipOption, type ChipOutlineTone, ChipSelector, type ChipSelectorProps, type ChipSingleSelectRole, type ChipSize, type ChipVariant, type CodeFormatter, 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, type FormSwitchVariant, 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, type MultiSelectChipLabels, MultiSelectField, type MultiSelectFieldProps, PHONE_MAX_WIDTH, PasswordField, type PasswordFieldColors, type PasswordFieldLabels, type PasswordFieldProps, type PasswordRuleState, PasswordRules, PasswordRulesDisplay, type PasswordRulesProps, RESPONSIVE_FORM_DEFAULT_BREAKPOINT, RadioList, type RadioListProps, type RadioOption, type RadioRowIdentity, type RecentValues, ResponsiveFormLayout, type ResponsiveFormLayoutProps, RevealToggle, type RevealToggleProps, type RuleColors, RuleTone, 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 SelectLook, type SelectLookConfig, type SelectLookMetrics, SelectLookProvider, type SelectMenuAnchor, type SelectMotion, SelectSurface, type ServerFieldErrors, 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 UseServerFieldErrorsOptions, type UseThemedInputOptions, actionBarPosition, assignServerErrors, buildSearchSelectSections, canRemoveLine, changedRules, 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, lookInputBox, moveHighlight, nextHighlight, placeDropdown, radioRowIdentity, rejectionMessage, resolveGroupSelection, resolveSelectMotion, resolveStepNeighbours, rowsForText, ruleAnnouncement, ruleColorsFrom, ruleTone, selectLookMetrics, suggestOptions, toCountryValue, toggleGroupSelection, useAutoGrowRows, useBlurVerdict, useDeferredFocus, useFocusFirstInvalid, useKeepInView, useOutsidePress, useRecentValues, useReducedMotion, useSearchSelectState, useSelectLookMetrics, useServerFieldErrors, useThemedInput, validateBic, validateDecision, validateIban };
|
package/dist/index.d.ts
CHANGED
|
@@ -942,6 +942,13 @@ declare function SelectLookProvider({ look, borderColor, backgroundColor, textCo
|
|
|
942
942
|
* @param windowWidth the current window width in px
|
|
943
943
|
*/
|
|
944
944
|
declare function selectLookMetrics({ look, borderColor, backgroundColor, textColor }: SelectLookConfig, windowWidth: number): SelectLookMetrics | undefined;
|
|
945
|
+
/** The metrics of the nearest provider's look at the current window width; `undefined` for `default`. */
|
|
946
|
+
declare function useSelectLookMetrics(): SelectLookMetrics | undefined;
|
|
947
|
+
/**
|
|
948
|
+
* The text-input box of a look, so an input beside the look's selects shares their height, padding, font and radius.
|
|
949
|
+
* @param m the look metrics; `undefined` (the `default` look) returns no override
|
|
950
|
+
*/
|
|
951
|
+
declare function lookInputBox(m: SelectLookMetrics | undefined): TextStyle | undefined;
|
|
945
952
|
|
|
946
953
|
/** The row index an arrow key moves to: wraps at both ends, -1 when there are no rows. */
|
|
947
954
|
declare function nextHighlight(current: number, count: number, delta: number): number;
|
|
@@ -1108,6 +1115,8 @@ interface DatePickerLabels {
|
|
|
1108
1115
|
rangeDialog: string;
|
|
1109
1116
|
openCalendar: string;
|
|
1110
1117
|
openCalendarHint: string;
|
|
1118
|
+
/** PRE-LOCALIZED empty-field placeholder; empty = the locale's pattern, en-GB `dd/mm/yyyy`. */
|
|
1119
|
+
datePlaceholder: string;
|
|
1111
1120
|
previousMonth: string;
|
|
1112
1121
|
nextMonth: string;
|
|
1113
1122
|
monthHint: string;
|
|
@@ -2054,4 +2063,4 @@ declare function RevealToggle({ revealed, onToggle, onPressIn, showLabel, hideLa
|
|
|
2054
2063
|
declare function changedRules(previous: readonly PasswordRuleState[], next: readonly PasswordRuleState[]): PasswordRuleState[];
|
|
2055
2064
|
declare function ruleAnnouncement(changed: readonly PasswordRuleState[], labels: Pick<PasswordFieldLabels, 'met' | 'unmet'>): string;
|
|
2056
2065
|
|
|
2057
|
-
export { ActionBar, type ActionBarProps, AddOnRequest, type AddOnRequestProps, AlignToControl, type AlignToControlProps, type AnchorRect, AnchoredMenu, type AnchoredMenuColors, type AnchoredMenuListbox, type AnchoredMenuPlacement, type AnchoredMenuProps, type AssignedServerErrors, type AutoGrowRows, type BicDraft, BicInput, type BicInputProps, BicRejection, type BicRejectionLabels, type BicVerdict, type BlurVerdict, COUNTRIES, type CheckboxLook, CheckboxLookProvider, type ChecklistItem, ChipLabelWrap, type ChipOption, type ChipOutlineTone, ChipSelector, type ChipSelectorProps, type ChipSingleSelectRole, type ChipSize, type ChipVariant, type CodeFormatter, 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, type FormSwitchVariant, 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, type MultiSelectChipLabels, MultiSelectField, type MultiSelectFieldProps, PHONE_MAX_WIDTH, PasswordField, type PasswordFieldColors, type PasswordFieldLabels, type PasswordFieldProps, type PasswordRuleState, PasswordRules, PasswordRulesDisplay, type PasswordRulesProps, RESPONSIVE_FORM_DEFAULT_BREAKPOINT, RadioList, type RadioListProps, type RadioOption, type RadioRowIdentity, type RecentValues, ResponsiveFormLayout, type ResponsiveFormLayoutProps, RevealToggle, type RevealToggleProps, type RuleColors, RuleTone, 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 SelectLook, type SelectLookConfig, type SelectLookMetrics, SelectLookProvider, type SelectMenuAnchor, type SelectMotion, SelectSurface, type ServerFieldErrors, 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 UseServerFieldErrorsOptions, type UseThemedInputOptions, actionBarPosition, assignServerErrors, buildSearchSelectSections, canRemoveLine, changedRules, 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, ruleAnnouncement, ruleColorsFrom, ruleTone, selectLookMetrics, suggestOptions, toCountryValue, toggleGroupSelection, useAutoGrowRows, useBlurVerdict, useDeferredFocus, useFocusFirstInvalid, useKeepInView, useOutsidePress, useRecentValues, useReducedMotion, useSearchSelectState, useServerFieldErrors, useThemedInput, validateBic, validateDecision, validateIban };
|
|
2066
|
+
export { ActionBar, type ActionBarProps, AddOnRequest, type AddOnRequestProps, AlignToControl, type AlignToControlProps, type AnchorRect, AnchoredMenu, type AnchoredMenuColors, type AnchoredMenuListbox, type AnchoredMenuPlacement, type AnchoredMenuProps, type AssignedServerErrors, type AutoGrowRows, type BicDraft, BicInput, type BicInputProps, BicRejection, type BicRejectionLabels, type BicVerdict, type BlurVerdict, COUNTRIES, type CheckboxLook, CheckboxLookProvider, type ChecklistItem, ChipLabelWrap, type ChipOption, type ChipOutlineTone, ChipSelector, type ChipSelectorProps, type ChipSingleSelectRole, type ChipSize, type ChipVariant, type CodeFormatter, 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, type FormSwitchVariant, 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, type MultiSelectChipLabels, MultiSelectField, type MultiSelectFieldProps, PHONE_MAX_WIDTH, PasswordField, type PasswordFieldColors, type PasswordFieldLabels, type PasswordFieldProps, type PasswordRuleState, PasswordRules, PasswordRulesDisplay, type PasswordRulesProps, RESPONSIVE_FORM_DEFAULT_BREAKPOINT, RadioList, type RadioListProps, type RadioOption, type RadioRowIdentity, type RecentValues, ResponsiveFormLayout, type ResponsiveFormLayoutProps, RevealToggle, type RevealToggleProps, type RuleColors, RuleTone, 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 SelectLook, type SelectLookConfig, type SelectLookMetrics, SelectLookProvider, type SelectMenuAnchor, type SelectMotion, SelectSurface, type ServerFieldErrors, 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 UseServerFieldErrorsOptions, type UseThemedInputOptions, actionBarPosition, assignServerErrors, buildSearchSelectSections, canRemoveLine, changedRules, 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, lookInputBox, moveHighlight, nextHighlight, placeDropdown, radioRowIdentity, rejectionMessage, resolveGroupSelection, resolveSelectMotion, resolveStepNeighbours, rowsForText, ruleAnnouncement, ruleColorsFrom, ruleTone, selectLookMetrics, suggestOptions, toCountryValue, toggleGroupSelection, useAutoGrowRows, useBlurVerdict, useDeferredFocus, useFocusFirstInvalid, useKeepInView, useOutsidePress, useRecentValues, useReducedMotion, useSearchSelectState, useSelectLookMetrics, useServerFieldErrors, useThemedInput, validateBic, validateDecision, validateIban };
|
package/dist/index.js
CHANGED
|
@@ -2266,6 +2266,10 @@ function useSelectLookMetrics() {
|
|
|
2266
2266
|
const { width } = reactNative.useWindowDimensions();
|
|
2267
2267
|
return selectLookMetrics(config, width);
|
|
2268
2268
|
}
|
|
2269
|
+
function lookInputBox(m) {
|
|
2270
|
+
if (m === void 0) return void 0;
|
|
2271
|
+
return { minHeight: m.height, height: m.height, paddingHorizontal: m.paddingHorizontal, paddingVertical: m.paddingVertical, fontSize: m.fontSize, borderRadius: m.borderRadius };
|
|
2272
|
+
}
|
|
2269
2273
|
function chevronDataUri(color) {
|
|
2270
2274
|
const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="${color}" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M4 6l4 4 4-4"/></svg>`;
|
|
2271
2275
|
return `url("data:image/svg+xml,${encodeURIComponent(svg)}")`;
|
|
@@ -2864,6 +2868,7 @@ function TypeaheadControlImpl(props, ref) {
|
|
|
2864
2868
|
const options = "options" in props ? props.options : void 0;
|
|
2865
2869
|
const maxSuggestions = ("search" in props ? props.search.maxResults : props.maxSuggestions) ?? DEFAULT_TYPEAHEAD_MAX_SUGGESTIONS;
|
|
2866
2870
|
const { theme } = uiFeedback.useUi();
|
|
2871
|
+
const look = useSelectLookMetrics();
|
|
2867
2872
|
const { colors, palette } = theme;
|
|
2868
2873
|
const anchorRef = React41.useRef(null);
|
|
2869
2874
|
const state = useTypeaheadState({ options, search, value, minChars, maxSuggestions, onChange, onSubmit });
|
|
@@ -2895,7 +2900,7 @@ function TypeaheadControlImpl(props, ref) {
|
|
|
2895
2900
|
onBlur: handleBlur,
|
|
2896
2901
|
onKeyPress: state.handleKeyPress,
|
|
2897
2902
|
onSubmitEditing: state.handleSubmit,
|
|
2898
|
-
style: [controlStyles.input, { borderColor: hasError ? fieldErrorInk(theme) : colors.border, backgroundColor: colors.surface, color: colors.text }],
|
|
2903
|
+
style: [controlStyles.input, { borderColor: hasError ? fieldErrorInk(theme) : colors.border, backgroundColor: colors.surface, color: colors.text }, lookInputBox(look)],
|
|
2899
2904
|
testID: search?.inputTestID ?? `${testID}-input`
|
|
2900
2905
|
}
|
|
2901
2906
|
),
|
|
@@ -2925,8 +2930,8 @@ var NATIVE_INPUT_BOX = {
|
|
|
2925
2930
|
fontFamily: "inherit",
|
|
2926
2931
|
width: "100%"
|
|
2927
2932
|
};
|
|
2928
|
-
function buildNativeInputStyle(themed) {
|
|
2929
|
-
const { paddingHorizontal, paddingVertical, ...box } = reactNative.StyleSheet.flatten(controlStyles.input);
|
|
2933
|
+
function buildNativeInputStyle(themed, look) {
|
|
2934
|
+
const { paddingHorizontal, paddingVertical, ...box } = reactNative.StyleSheet.flatten([controlStyles.input, look]);
|
|
2930
2935
|
return {
|
|
2931
2936
|
...box,
|
|
2932
2937
|
...themed,
|
|
@@ -2938,6 +2943,7 @@ function buildNativeInputStyle(themed) {
|
|
|
2938
2943
|
function WebDateInput({ fieldProps, context, webInputType }) {
|
|
2939
2944
|
const { label, value, onChange, onSubmit, accessibilityHint, testID, required, disabled = false, min, max } = fieldProps;
|
|
2940
2945
|
const { style, focusBind, hoverBind } = useThemedInput({ hasError: context.hasError, editable: !disabled });
|
|
2946
|
+
const look = lookInputBox(useSelectLookMetrics());
|
|
2941
2947
|
const webA11y = webFieldA11y({
|
|
2942
2948
|
describedById: context.describedById,
|
|
2943
2949
|
hasError: context.hasError,
|
|
@@ -2961,7 +2967,7 @@ function WebDateInput({ fieldProps, context, webInputType }) {
|
|
|
2961
2967
|
id: context.controlId,
|
|
2962
2968
|
max,
|
|
2963
2969
|
min,
|
|
2964
|
-
style: buildNativeInputStyle(style),
|
|
2970
|
+
style: buildNativeInputStyle(style, look),
|
|
2965
2971
|
title: accessibilityHint,
|
|
2966
2972
|
type: webInputType,
|
|
2967
2973
|
value,
|
|
@@ -3118,6 +3124,7 @@ var DEFAULT_DATE_PICKER_LABELS = {
|
|
|
3118
3124
|
rangeDialog: "Choose a date range",
|
|
3119
3125
|
openCalendar: "Open calendar",
|
|
3120
3126
|
openCalendarHint: "Opens a calendar to pick the date",
|
|
3127
|
+
datePlaceholder: "",
|
|
3121
3128
|
previousMonth: "Previous month",
|
|
3122
3129
|
nextMonth: "Next month",
|
|
3123
3130
|
monthHint: "Shows another month",
|
|
@@ -3672,6 +3679,14 @@ function closedFieldMinWidth(text, iconRoom) {
|
|
|
3672
3679
|
return Math.ceil(chars * FONT_PX * GLYPH_EM) + PAD_INLINE + iconRoom + BORDER + BORDER;
|
|
3673
3680
|
}
|
|
3674
3681
|
|
|
3682
|
+
// src/DatePicker/utils/datePattern.ts
|
|
3683
|
+
var SAMPLE = new Date(Date.UTC(2027, 5, 12));
|
|
3684
|
+
var PART_TOKEN = { day: "dd", month: "mm", year: "yyyy" };
|
|
3685
|
+
function datePattern(locale) {
|
|
3686
|
+
const parts = new Intl.DateTimeFormat(locale, { day: "2-digit", month: "2-digit", year: "numeric", timeZone: "UTC" }).formatToParts(SAMPLE);
|
|
3687
|
+
return parts.map((part) => PART_TOKEN[part.type] ?? part.value).join("");
|
|
3688
|
+
}
|
|
3689
|
+
|
|
3675
3690
|
// src/DatePicker/utils/typedEdit.ts
|
|
3676
3691
|
var DELETE_KEYS = /* @__PURE__ */ new Set(["Backspace", "Delete"]);
|
|
3677
3692
|
function isPrintable(event) {
|
|
@@ -3722,7 +3737,7 @@ var ICON_SLOT = { position: "absolute", right: 2, top: 0, bottom: 0, display: "f
|
|
|
3722
3737
|
var anchorStyles = reactNative.StyleSheet.create({ wrap: { position: "relative", width: "100%" } });
|
|
3723
3738
|
function DatePickerInput({ fieldProps, context, onTypedError }) {
|
|
3724
3739
|
const { label, value, onChange, onSubmit, accessibilityHint, testID, required, disabled = false, min, max } = fieldProps;
|
|
3725
|
-
const { labels, display } = useDatePickerConfig();
|
|
3740
|
+
const { labels, display, locale } = useDatePickerConfig();
|
|
3726
3741
|
const phone = useIsPhone();
|
|
3727
3742
|
const [open, setOpen] = React41.useState(false);
|
|
3728
3743
|
const anchorRef = React41.useRef(null);
|
|
@@ -3731,6 +3746,7 @@ function DatePickerInput({ fieldProps, context, onTypedError }) {
|
|
|
3731
3746
|
const typed = useTypedDate({ value, onChange, bounds, format: displayFormatter(display), onError: onTypedError, editOnType: true });
|
|
3732
3747
|
const edit = typedEditBind(typed);
|
|
3733
3748
|
const { style, focusBind, hoverBind } = useThemedInput({ hasError: context.hasError, editable: !disabled });
|
|
3749
|
+
const look = lookInputBox(useSelectLookMetrics());
|
|
3734
3750
|
const focus = focusBind;
|
|
3735
3751
|
const webA11y = webFieldA11y({ describedById: context.describedById, hasError: context.hasError, required });
|
|
3736
3752
|
const close = React41.useCallback(() => setOpen(false), []);
|
|
@@ -3763,7 +3779,8 @@ function DatePickerInput({ fieldProps, context, onTypedError }) {
|
|
|
3763
3779
|
"data-testid": testID,
|
|
3764
3780
|
disabled,
|
|
3765
3781
|
id: context.controlId,
|
|
3766
|
-
|
|
3782
|
+
placeholder: labels.datePlaceholder !== "" ? labels.datePlaceholder : datePattern(locale),
|
|
3783
|
+
style: { ...buildNativeInputStyle(style, look), paddingInlineEnd: ICON_ROOM },
|
|
3767
3784
|
title: accessibilityHint,
|
|
3768
3785
|
type: "text",
|
|
3769
3786
|
value: typed.display,
|
|
@@ -6672,6 +6689,7 @@ exports.isWideFormLayout = isWideFormLayout;
|
|
|
6672
6689
|
exports.leadFirst = leadFirst;
|
|
6673
6690
|
exports.lineItemColumnFlex = lineItemColumnFlex;
|
|
6674
6691
|
exports.lineNumberOf = lineNumberOf;
|
|
6692
|
+
exports.lookInputBox = lookInputBox;
|
|
6675
6693
|
exports.moveHighlight = moveHighlight;
|
|
6676
6694
|
exports.nextHighlight = nextHighlight;
|
|
6677
6695
|
exports.placeDropdown = placeDropdown;
|
|
@@ -6697,6 +6715,7 @@ exports.useOutsidePress = useOutsidePress;
|
|
|
6697
6715
|
exports.useRecentValues = useRecentValues;
|
|
6698
6716
|
exports.useReducedMotion = useReducedMotion;
|
|
6699
6717
|
exports.useSearchSelectState = useSearchSelectState;
|
|
6718
|
+
exports.useSelectLookMetrics = useSelectLookMetrics;
|
|
6700
6719
|
exports.useServerFieldErrors = useServerFieldErrors;
|
|
6701
6720
|
exports.useThemedInput = useThemedInput;
|
|
6702
6721
|
exports.validateBic = validateBic;
|