@transferwise/components 0.0.0-experimental-2d4d50d → 0.0.0-experimental-ddde990
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/build/index.esm.js +6 -6
- package/build/index.esm.js.map +1 -1
- package/build/index.js +6 -6
- package/build/index.js.map +1 -1
- package/build/types/accordion/Accordion.d.ts +1 -1
- package/build/types/accordion/Accordion.d.ts.map +1 -1
- package/build/types/chips/Chips.d.ts +2 -2
- package/build/types/chips/Chips.d.ts.map +1 -1
- package/build/types/dateLookup/getFocusableTime/getFocusableTime.d.ts +1 -1
- package/build/types/dateLookup/getFocusableTime/getFocusableTime.d.ts.map +1 -1
- package/build/types/decision/Decision.d.ts +1 -1
- package/build/types/decision/Decision.d.ts.map +1 -1
- package/build/types/flowNavigation/FlowNavigation.d.ts +1 -1
- package/build/types/flowNavigation/FlowNavigation.d.ts.map +1 -1
- package/build/types/flowNavigation/animatedLabel/AnimatedLabel.d.ts +1 -1
- package/build/types/flowNavigation/animatedLabel/AnimatedLabel.d.ts.map +1 -1
- package/build/types/instructionsList/InstructionsList.d.ts +4 -4
- package/build/types/instructionsList/InstructionsList.d.ts.map +1 -1
- package/build/types/markdown/Markdown.d.ts +2 -2
- package/build/types/markdown/Markdown.d.ts.map +1 -1
- package/build/types/phoneNumberInput/PhoneNumberInput.d.ts +1 -1
- package/build/types/phoneNumberInput/PhoneNumberInput.d.ts.map +1 -1
- package/build/types/phoneNumberInput/utils/excludeCountries/excludeCountries.d.ts +1 -1
- package/build/types/phoneNumberInput/utils/excludeCountries/excludeCountries.d.ts.map +1 -1
- package/build/types/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.d.ts +1 -1
- package/build/types/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.d.ts.map +1 -1
- package/build/types/phoneNumberInput/utils/longestMatchingPrefix/index.d.ts +1 -1
- package/build/types/phoneNumberInput/utils/longestMatchingPrefix/index.d.ts.map +1 -1
- package/build/types/phoneNumberInput/utils/sortArrayByProperty/sortArrayByProperty.d.ts +1 -1
- package/build/types/phoneNumberInput/utils/sortArrayByProperty/sortArrayByProperty.d.ts.map +1 -1
- package/build/types/radioGroup/RadioGroup.d.ts +1 -1
- package/build/types/radioGroup/RadioGroup.d.ts.map +1 -1
- package/build/types/segmentedControl/SegmentedControl.d.ts +3 -3
- package/build/types/segmentedControl/SegmentedControl.d.ts.map +1 -1
- package/build/types/stepper/Stepper.d.ts +1 -1
- package/build/types/stepper/Stepper.d.ts.map +1 -1
- package/build/types/typeahead/Typeahead.d.ts +5 -5
- package/build/types/typeahead/Typeahead.d.ts.map +1 -1
- package/build/types/typeahead/typeaheadInput/TypeaheadInput.d.ts +1 -1
- package/build/types/typeahead/typeaheadInput/TypeaheadInput.d.ts.map +1 -1
- package/build/types/uploadInput/UploadInput.d.ts +1 -1
- package/build/types/uploadInput/UploadInput.d.ts.map +1 -1
- package/build/types/uploadInput/uploadButton/UploadButton.d.ts +1 -1
- package/build/types/uploadInput/uploadButton/UploadButton.d.ts.map +1 -1
- package/build/types/uploadInput/uploadButton/getAllowedFileTypes.d.ts +1 -1
- package/build/types/uploadInput/uploadButton/getAllowedFileTypes.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/accordion/Accordion.tsx +1 -1
- package/src/chips/Chips.story.tsx +2 -2
- package/src/chips/Chips.tsx +2 -2
- package/src/dateLookup/dateTrigger/DateTrigger.js +1 -1
- package/src/dateLookup/dateTrigger/DateTrigger.spec.js +11 -3
- package/src/dateLookup/getFocusableTime/getFocusableTime.tsx +1 -1
- package/src/decision/Decision.tsx +1 -1
- package/src/flowNavigation/FlowNavigation.tsx +1 -1
- package/src/flowNavigation/animatedLabel/AnimatedLabel.tsx +1 -1
- package/src/instructionsList/InstructionsList.tsx +4 -4
- package/src/markdown/Markdown.tsx +3 -3
- package/src/moneyInput/MoneyInput.tsx +3 -3
- package/src/phoneNumberInput/PhoneNumberInput.tsx +1 -1
- package/src/phoneNumberInput/utils/excludeCountries/excludeCountries.ts +2 -5
- package/src/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.ts +1 -1
- package/src/phoneNumberInput/utils/longestMatchingPrefix/index.ts +1 -1
- package/src/phoneNumberInput/utils/sortArrayByProperty/sortArrayByProperty.ts +1 -1
- package/src/promoCard/PromoCardGroup.tsx +1 -1
- package/src/radioGroup/RadioGroup.tsx +1 -1
- package/src/segmentedControl/SegmentedControl.tsx +3 -3
- package/src/stepper/Stepper.tsx +1 -1
- package/src/typeahead/Typeahead.tsx +6 -6
- package/src/typeahead/typeaheadInput/TypeaheadInput.tsx +1 -1
- package/src/uploadInput/UploadInput.tsx +6 -6
- package/src/uploadInput/uploadButton/UploadButton.tsx +7 -5
- package/src/uploadInput/uploadButton/getAllowedFileTypes.ts +1 -1
package/build/index.esm.js
CHANGED
|
@@ -3261,7 +3261,7 @@ const DateTrigger = ({
|
|
|
3261
3261
|
className: "input-group-addon",
|
|
3262
3262
|
children: /*#__PURE__*/jsx(CloseButton, {
|
|
3263
3263
|
className: `clear-btn clear-btn--${size}`,
|
|
3264
|
-
"aria-label": formatMessage(dateTriggerMessages.ariaLabel)
|
|
3264
|
+
"aria-label": `${formatMessage(dateTriggerMessages.ariaLabel)} ${label}`,
|
|
3265
3265
|
size: Size.SMALL,
|
|
3266
3266
|
onClick: event => {
|
|
3267
3267
|
event.stopPropagation();
|
|
@@ -7859,7 +7859,7 @@ function contains(property, query) {
|
|
|
7859
7859
|
return property && property.toLowerCase().includes(query.toLowerCase());
|
|
7860
7860
|
}
|
|
7861
7861
|
function sortOptionsLabelsToFirst(options, query) {
|
|
7862
|
-
return
|
|
7862
|
+
return options.sort((first, second) => {
|
|
7863
7863
|
const firstContains = contains(first.label, query);
|
|
7864
7864
|
const secondContains = contains(second.label, query);
|
|
7865
7865
|
if (firstContains && secondContains) {
|
|
@@ -12333,7 +12333,7 @@ class Typeahead extends Component {
|
|
|
12333
12333
|
selected,
|
|
12334
12334
|
errorState
|
|
12335
12335
|
}, () => {
|
|
12336
|
-
onChange(
|
|
12336
|
+
onChange(selected);
|
|
12337
12337
|
});
|
|
12338
12338
|
};
|
|
12339
12339
|
clear = event => {
|
|
@@ -13476,7 +13476,7 @@ const UploadButton = ({
|
|
|
13476
13476
|
if (fileTypes === '*') {
|
|
13477
13477
|
return fileTypes;
|
|
13478
13478
|
}
|
|
13479
|
-
return
|
|
13479
|
+
return Array.isArray(fileTypes) ? getAllowedFileTypes(fileTypes).join(', ') : getAllowedFileTypes([fileTypes]).join(', ');
|
|
13480
13480
|
};
|
|
13481
13481
|
function getDescription() {
|
|
13482
13482
|
if (description) {
|
|
@@ -13492,7 +13492,7 @@ const UploadButton = ({
|
|
|
13492
13492
|
function getAcceptedTypes() {
|
|
13493
13493
|
const areAllFilesAllowed = getFileTypesDescription() === '*';
|
|
13494
13494
|
if (areAllFilesAllowed) {
|
|
13495
|
-
return
|
|
13495
|
+
return null; //file input by default allows all files
|
|
13496
13496
|
}
|
|
13497
13497
|
if (Array.isArray(fileTypes)) {
|
|
13498
13498
|
return {
|
|
@@ -13958,7 +13958,7 @@ const UploadInput = ({
|
|
|
13958
13958
|
}, []);
|
|
13959
13959
|
useEffect(() => {
|
|
13960
13960
|
if (onFilesChange && mounted) {
|
|
13961
|
-
onFilesChange(
|
|
13961
|
+
onFilesChange(uploadedFiles);
|
|
13962
13962
|
}
|
|
13963
13963
|
}, [onFilesChange, uploadedFiles]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
13964
13964
|
return /*#__PURE__*/jsxs(Fragment, {
|