@dloizides/ui-forms 1.35.0 → 1.36.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/CHANGELOG.md +533 -533
- package/dist/index.d.mts +8 -11
- package/dist/index.d.ts +8 -11
- package/dist/index.js +11 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -580,6 +580,13 @@ declare function useRecentValues(key: string, max?: number): RecentValues;
|
|
|
580
580
|
/** Default cap on remembered values (most-recent-first). */
|
|
581
581
|
declare const DEFAULT_MAX_RECENTS = 10;
|
|
582
582
|
|
|
583
|
+
/** How a long chip label fits: `None` (default) grows the chip, `Wrap` and `Truncate` cap it at its container. */
|
|
584
|
+
declare const enum ChipLabelWrap {
|
|
585
|
+
None = "none",
|
|
586
|
+
Wrap = "wrap",
|
|
587
|
+
Truncate = "truncate"
|
|
588
|
+
}
|
|
589
|
+
|
|
583
590
|
/**
|
|
584
591
|
* Public + internal types for ChipSelector. Split out of `ChipSelector.tsx` so the component, its
|
|
585
592
|
* two chip variants and the radio keyboard hook can share them without a circular import.
|
|
@@ -594,8 +601,6 @@ type ChipVariant = 'solid' | 'outline';
|
|
|
594
601
|
* survive the package boundary for consumers compiled with `isolatedModules`.
|
|
595
602
|
*/
|
|
596
603
|
type ChipSingleSelectRole = 'button' | 'radio';
|
|
597
|
-
/** How a long chip label fits: `none` (default) grows the chip, `wrap` and `truncate` cap it at its container. */
|
|
598
|
-
type ChipLabelWrap = 'none' | 'wrap' | 'truncate';
|
|
599
604
|
interface ChipOption<T> {
|
|
600
605
|
value: T;
|
|
601
606
|
label: string;
|
|
@@ -674,14 +679,6 @@ interface ChipSelectorProps<T> {
|
|
|
674
679
|
|
|
675
680
|
declare const ChipSelector: <T extends string | number>({ label, options, value, onChange, multiple, disabled, variant, containerStyle, spacing, required, error, testID, chipTestIDPrefix, optionAccessibilityHint, singleSelectRole, }: ChipSelectorProps<T>) => React.ReactElement;
|
|
676
681
|
|
|
677
|
-
interface ChipLabelLayout {
|
|
678
|
-
boxStyle: ViewStyle | undefined;
|
|
679
|
-
textStyle: TextStyle | undefined;
|
|
680
|
-
numberOfLines: number | undefined;
|
|
681
|
-
}
|
|
682
|
-
/** Resolves a chip's box and label layout for its `labelWrap` mode; `none` keeps today's render. */
|
|
683
|
-
declare function chipLabelLayout(labelWrap: ChipLabelWrap | undefined): ChipLabelLayout;
|
|
684
|
-
|
|
685
682
|
/**
|
|
686
683
|
* Reusable form switch/toggle with an optional description.
|
|
687
684
|
*/
|
|
@@ -1569,4 +1566,4 @@ declare function useBlurVerdict<T>(validate: () => T): BlurVerdict<T>;
|
|
|
1569
1566
|
/** The pre-localized message for a refusal, or null when there is no verdict, it passed, or no labels were given. */
|
|
1570
1567
|
declare function rejectionMessage<R extends string, N extends R>(rejection: R | null, none: N, labels: Readonly<Record<Exclude<R, N>, string>> | undefined): string | null;
|
|
1571
1568
|
|
|
1572
|
-
export { AddOnRequest, type AddOnRequestProps, AlignToControl, type AlignToControlProps, type AnchorRect, AnchoredMenu, type AnchoredMenuColors, type AnchoredMenuListbox, type AnchoredMenuPlacement, type AnchoredMenuProps, type BicDraft, BicInput, type BicInputProps, BicRejection, type BicRejectionLabels, type BicVerdict, type BlurVerdict, COUNTRIES,
|
|
1569
|
+
export { AddOnRequest, type AddOnRequestProps, AlignToControl, type AlignToControlProps, type AnchorRect, AnchoredMenu, type AnchoredMenuColors, type AnchoredMenuListbox, type AnchoredMenuPlacement, type AnchoredMenuProps, type BicDraft, BicInput, type BicInputProps, BicRejection, type BicRejectionLabels, type BicVerdict, type BlurVerdict, COUNTRIES, ChipLabelWrap, type ChipOption, ChipSelector, type ChipSelectorProps, type ChipSingleSelectRole, type ChipVariant, type ControlOption, type Country, CountryField, type CountryFieldProps, CountryFlag, type CountryFlagProps, DEFAULT_MAX_RECENTS, DEFAULT_OPTIONAL_LABEL, DEFAULT_TYPEAHEAD_MAX_SUGGESTIONS, DEFAULT_TYPEAHEAD_MIN_CHARS, DateField, type DateFieldProps, DateInput, type DateInputProps, DateRangeControl, type DateRangeControlProps, type DateRangeValue, DateTimeField, type DateTimeFieldProps, type DropdownFrame, DropdownPlacement, FLAG_HEIGHT, FLAG_WIDTH, Field, type FieldChildContext, type FieldChildren, type FieldLabelVariant, type FieldMarker, type FieldProps, type FieldSpacing, 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 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, PHONE_MAX_WIDTH, RESPONSIVE_FORM_DEFAULT_BREAKPOINT, type RecentValues, ResponsiveFormLayout, type ResponsiveFormLayoutProps, SearchSelect, type SearchSelectLabels, type SearchSelectProps, type SearchSelectSections, type SearchSelectState, 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, buildSearchSelectSections, controlStyles, countryFlag, countryOptions, draftBic, draftIban, dropdownFrame, findOption, flagShapes, groupAriaChecked, groupInFours, highlightAfterQuery, ibanCounter, ibanLengthFor, inlineFieldRowLayout, isAddOnOpen, isFallbackFlag, isFixBarVisible, isOutside, isUnmatched, isWideFormLayout, moveHighlight, nextHighlight, placeDropdown, rejectionMessage, resolveGroupSelection, resolveSelectMotion, resolveStepNeighbours, suggestOptions, toCountryValue, toggleGroupSelection, useBlurVerdict, useDeferredFocus, useFocusFirstInvalid, useKeepInView, useOutsidePress, useRecentValues, useReducedMotion, useSearchSelectState, useThemedInput, validateBic, validateIban };
|
package/dist/index.d.ts
CHANGED
|
@@ -580,6 +580,13 @@ declare function useRecentValues(key: string, max?: number): RecentValues;
|
|
|
580
580
|
/** Default cap on remembered values (most-recent-first). */
|
|
581
581
|
declare const DEFAULT_MAX_RECENTS = 10;
|
|
582
582
|
|
|
583
|
+
/** How a long chip label fits: `None` (default) grows the chip, `Wrap` and `Truncate` cap it at its container. */
|
|
584
|
+
declare const enum ChipLabelWrap {
|
|
585
|
+
None = "none",
|
|
586
|
+
Wrap = "wrap",
|
|
587
|
+
Truncate = "truncate"
|
|
588
|
+
}
|
|
589
|
+
|
|
583
590
|
/**
|
|
584
591
|
* Public + internal types for ChipSelector. Split out of `ChipSelector.tsx` so the component, its
|
|
585
592
|
* two chip variants and the radio keyboard hook can share them without a circular import.
|
|
@@ -594,8 +601,6 @@ type ChipVariant = 'solid' | 'outline';
|
|
|
594
601
|
* survive the package boundary for consumers compiled with `isolatedModules`.
|
|
595
602
|
*/
|
|
596
603
|
type ChipSingleSelectRole = 'button' | 'radio';
|
|
597
|
-
/** How a long chip label fits: `none` (default) grows the chip, `wrap` and `truncate` cap it at its container. */
|
|
598
|
-
type ChipLabelWrap = 'none' | 'wrap' | 'truncate';
|
|
599
604
|
interface ChipOption<T> {
|
|
600
605
|
value: T;
|
|
601
606
|
label: string;
|
|
@@ -674,14 +679,6 @@ interface ChipSelectorProps<T> {
|
|
|
674
679
|
|
|
675
680
|
declare const ChipSelector: <T extends string | number>({ label, options, value, onChange, multiple, disabled, variant, containerStyle, spacing, required, error, testID, chipTestIDPrefix, optionAccessibilityHint, singleSelectRole, }: ChipSelectorProps<T>) => React.ReactElement;
|
|
676
681
|
|
|
677
|
-
interface ChipLabelLayout {
|
|
678
|
-
boxStyle: ViewStyle | undefined;
|
|
679
|
-
textStyle: TextStyle | undefined;
|
|
680
|
-
numberOfLines: number | undefined;
|
|
681
|
-
}
|
|
682
|
-
/** Resolves a chip's box and label layout for its `labelWrap` mode; `none` keeps today's render. */
|
|
683
|
-
declare function chipLabelLayout(labelWrap: ChipLabelWrap | undefined): ChipLabelLayout;
|
|
684
|
-
|
|
685
682
|
/**
|
|
686
683
|
* Reusable form switch/toggle with an optional description.
|
|
687
684
|
*/
|
|
@@ -1569,4 +1566,4 @@ declare function useBlurVerdict<T>(validate: () => T): BlurVerdict<T>;
|
|
|
1569
1566
|
/** The pre-localized message for a refusal, or null when there is no verdict, it passed, or no labels were given. */
|
|
1570
1567
|
declare function rejectionMessage<R extends string, N extends R>(rejection: R | null, none: N, labels: Readonly<Record<Exclude<R, N>, string>> | undefined): string | null;
|
|
1571
1568
|
|
|
1572
|
-
export { AddOnRequest, type AddOnRequestProps, AlignToControl, type AlignToControlProps, type AnchorRect, AnchoredMenu, type AnchoredMenuColors, type AnchoredMenuListbox, type AnchoredMenuPlacement, type AnchoredMenuProps, type BicDraft, BicInput, type BicInputProps, BicRejection, type BicRejectionLabels, type BicVerdict, type BlurVerdict, COUNTRIES,
|
|
1569
|
+
export { AddOnRequest, type AddOnRequestProps, AlignToControl, type AlignToControlProps, type AnchorRect, AnchoredMenu, type AnchoredMenuColors, type AnchoredMenuListbox, type AnchoredMenuPlacement, type AnchoredMenuProps, type BicDraft, BicInput, type BicInputProps, BicRejection, type BicRejectionLabels, type BicVerdict, type BlurVerdict, COUNTRIES, ChipLabelWrap, type ChipOption, ChipSelector, type ChipSelectorProps, type ChipSingleSelectRole, type ChipVariant, type ControlOption, type Country, CountryField, type CountryFieldProps, CountryFlag, type CountryFlagProps, DEFAULT_MAX_RECENTS, DEFAULT_OPTIONAL_LABEL, DEFAULT_TYPEAHEAD_MAX_SUGGESTIONS, DEFAULT_TYPEAHEAD_MIN_CHARS, DateField, type DateFieldProps, DateInput, type DateInputProps, DateRangeControl, type DateRangeControlProps, type DateRangeValue, DateTimeField, type DateTimeFieldProps, type DropdownFrame, DropdownPlacement, FLAG_HEIGHT, FLAG_WIDTH, Field, type FieldChildContext, type FieldChildren, type FieldLabelVariant, type FieldMarker, type FieldProps, type FieldSpacing, 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 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, PHONE_MAX_WIDTH, RESPONSIVE_FORM_DEFAULT_BREAKPOINT, type RecentValues, ResponsiveFormLayout, type ResponsiveFormLayoutProps, SearchSelect, type SearchSelectLabels, type SearchSelectProps, type SearchSelectSections, type SearchSelectState, 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, buildSearchSelectSections, controlStyles, countryFlag, countryOptions, draftBic, draftIban, dropdownFrame, findOption, flagShapes, groupAriaChecked, groupInFours, highlightAfterQuery, ibanCounter, ibanLengthFor, inlineFieldRowLayout, isAddOnOpen, isFallbackFlag, isFixBarVisible, isOutside, isUnmatched, isWideFormLayout, moveHighlight, nextHighlight, placeDropdown, rejectionMessage, resolveGroupSelection, resolveSelectMotion, resolveStepNeighbours, suggestOptions, toCountryValue, toggleGroupSelection, useBlurVerdict, useDeferredFocus, useFocusFirstInvalid, useKeepInView, useOutsidePress, useRecentValues, useReducedMotion, useSearchSelectState, useThemedInput, validateBic, validateIban };
|
package/dist/index.js
CHANGED
|
@@ -1203,14 +1203,22 @@ var CHIP_HIT_SLOP = { top: 10, bottom: 10, left: 4, right: 4 };
|
|
|
1203
1203
|
var CHIP_GUTTER = 8;
|
|
1204
1204
|
var DEFAULT_CHIP_TESTID_PREFIX = "chip-selector-chip";
|
|
1205
1205
|
|
|
1206
|
+
// src/ChipSelector/ChipLabelWrap.ts
|
|
1207
|
+
var ChipLabelWrap = /* @__PURE__ */ ((ChipLabelWrap2) => {
|
|
1208
|
+
ChipLabelWrap2["None"] = "none";
|
|
1209
|
+
ChipLabelWrap2["Wrap"] = "wrap";
|
|
1210
|
+
ChipLabelWrap2["Truncate"] = "truncate";
|
|
1211
|
+
return ChipLabelWrap2;
|
|
1212
|
+
})(ChipLabelWrap || {});
|
|
1213
|
+
|
|
1206
1214
|
// src/ChipSelector/utils/chipLabelLayout.ts
|
|
1207
1215
|
var CAPPED_BOX = { maxWidth: "100%", flexShrink: 1 };
|
|
1208
1216
|
var SHRINKING_TEXT = { flexShrink: 1 };
|
|
1209
1217
|
var SINGLE_LINE = 1;
|
|
1210
1218
|
function chipLabelLayout(labelWrap) {
|
|
1211
|
-
if (labelWrap === "wrap")
|
|
1219
|
+
if (labelWrap === "wrap" /* Wrap */)
|
|
1212
1220
|
return { boxStyle: CAPPED_BOX, textStyle: SHRINKING_TEXT, numberOfLines: void 0 };
|
|
1213
|
-
if (labelWrap === "truncate")
|
|
1221
|
+
if (labelWrap === "truncate" /* Truncate */)
|
|
1214
1222
|
return { boxStyle: CAPPED_BOX, textStyle: SHRINKING_TEXT, numberOfLines: SINGLE_LINE };
|
|
1215
1223
|
return { boxStyle: void 0, textStyle: void 0, numberOfLines: void 0 };
|
|
1216
1224
|
}
|
|
@@ -4085,6 +4093,7 @@ exports.AnchoredMenu = AnchoredMenu;
|
|
|
4085
4093
|
exports.BicInput = BicInput;
|
|
4086
4094
|
exports.BicRejection = BicRejection;
|
|
4087
4095
|
exports.COUNTRIES = COUNTRIES;
|
|
4096
|
+
exports.ChipLabelWrap = ChipLabelWrap;
|
|
4088
4097
|
exports.ChipSelector = ChipSelector;
|
|
4089
4098
|
exports.CountryField = CountryField;
|
|
4090
4099
|
exports.CountryFlag = CountryFlag;
|
|
@@ -4130,7 +4139,6 @@ exports.ThemedTextInput = ThemedTextInput;
|
|
|
4130
4139
|
exports.TypeaheadControl = TypeaheadControl;
|
|
4131
4140
|
exports.UploadWithLinkField = UploadWithLinkField;
|
|
4132
4141
|
exports.buildSearchSelectSections = buildSearchSelectSections;
|
|
4133
|
-
exports.chipLabelLayout = chipLabelLayout;
|
|
4134
4142
|
exports.controlStyles = controlStyles;
|
|
4135
4143
|
exports.countryFlag = countryFlag;
|
|
4136
4144
|
exports.countryOptions = countryOptions;
|