@transferwise/components 0.0.0-experimental-ddde990 → 0.0.0-experimental-6dfede3
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 +5 -5
- package/build/index.esm.js.map +1 -1
- package/build/index.js +5 -5
- 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/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 +5 -2
- 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 +5 -7
- package/src/uploadInput/uploadButton/getAllowedFileTypes.ts +1 -1
package/build/index.js
CHANGED
|
@@ -7892,7 +7892,7 @@ function contains(property, query) {
|
|
|
7892
7892
|
return property && property.toLowerCase().includes(query.toLowerCase());
|
|
7893
7893
|
}
|
|
7894
7894
|
function sortOptionsLabelsToFirst(options, query) {
|
|
7895
|
-
return options.sort((first, second) => {
|
|
7895
|
+
return [...options].sort((first, second) => {
|
|
7896
7896
|
const firstContains = contains(first.label, query);
|
|
7897
7897
|
const secondContains = contains(second.label, query);
|
|
7898
7898
|
if (firstContains && secondContains) {
|
|
@@ -12366,7 +12366,7 @@ class Typeahead extends React.Component {
|
|
|
12366
12366
|
selected,
|
|
12367
12367
|
errorState
|
|
12368
12368
|
}, () => {
|
|
12369
|
-
onChange(selected);
|
|
12369
|
+
onChange([...selected]);
|
|
12370
12370
|
});
|
|
12371
12371
|
};
|
|
12372
12372
|
clear = event => {
|
|
@@ -13509,7 +13509,7 @@ const UploadButton = ({
|
|
|
13509
13509
|
if (fileTypes === '*') {
|
|
13510
13510
|
return fileTypes;
|
|
13511
13511
|
}
|
|
13512
|
-
return Array.isArray(fileTypes) ?
|
|
13512
|
+
return getAllowedFileTypes(Array.isArray(fileTypes) ? fileTypes : [fileTypes]).join(', ');
|
|
13513
13513
|
};
|
|
13514
13514
|
function getDescription() {
|
|
13515
13515
|
if (description) {
|
|
@@ -13525,7 +13525,7 @@ const UploadButton = ({
|
|
|
13525
13525
|
function getAcceptedTypes() {
|
|
13526
13526
|
const areAllFilesAllowed = getFileTypesDescription() === '*';
|
|
13527
13527
|
if (areAllFilesAllowed) {
|
|
13528
|
-
return
|
|
13528
|
+
return {}; //file input by default allows all files
|
|
13529
13529
|
}
|
|
13530
13530
|
if (Array.isArray(fileTypes)) {
|
|
13531
13531
|
return {
|
|
@@ -13991,7 +13991,7 @@ const UploadInput = ({
|
|
|
13991
13991
|
}, []);
|
|
13992
13992
|
React.useEffect(() => {
|
|
13993
13993
|
if (onFilesChange && mounted) {
|
|
13994
|
-
onFilesChange(uploadedFiles);
|
|
13994
|
+
onFilesChange([...uploadedFiles]);
|
|
13995
13995
|
}
|
|
13996
13996
|
}, [onFilesChange, uploadedFiles]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
13997
13997
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|