@transferwise/components 46.17.1 → 46.17.3
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 +16 -15
- package/build/index.esm.js.map +1 -1
- package/build/index.js +15 -14
- 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/dateInput/DateInput.d.ts +2 -2
- package/build/types/dateInput/DateInput.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/slidingPanel/SlidingPanel.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/dateInput/DateInput.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/__snapshots__/FlowNavigation.spec.js.snap +6 -0
- 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/slidingPanel/SlidingPanel.js +1 -0
- package/src/stepper/Stepper.spec.js +16 -0
- package/src/stepper/Stepper.tsx +2 -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
|
@@ -1811,8 +1811,9 @@ const SlidingPanel = /*#__PURE__*/React.forwardRef(({
|
|
|
1811
1811
|
}, reference) => {
|
|
1812
1812
|
/** @type {RefObject<HTMLDivElement>} */
|
|
1813
1813
|
const localReference = React.useRef(null);
|
|
1814
|
-
return /*#__PURE__*/
|
|
1814
|
+
return /*#__PURE__*/React.createElement(reactTransitionGroup.CSSTransition, {
|
|
1815
1815
|
...rest,
|
|
1816
|
+
key: `sliding-panel--open-${position}`,
|
|
1816
1817
|
nodeRef: localReference,
|
|
1817
1818
|
in: open
|
|
1818
1819
|
// Wait for animation to finish before unmount.
|
|
@@ -1825,13 +1826,12 @@ const SlidingPanel = /*#__PURE__*/React.forwardRef(({
|
|
|
1825
1826
|
'sliding-panel--fixed': slidingPanelPositionFixed
|
|
1826
1827
|
}, 'sliding-panel'),
|
|
1827
1828
|
appear: true,
|
|
1828
|
-
unmountOnExit: true
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
});
|
|
1829
|
+
unmountOnExit: true
|
|
1830
|
+
}, /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1831
|
+
ref: mergeRefs__default.default([reference, localReference]),
|
|
1832
|
+
className: classNames__default.default('sliding-panel', `sliding-panel--open-${position}`, className),
|
|
1833
|
+
children: children
|
|
1834
|
+
}));
|
|
1835
1835
|
});
|
|
1836
1836
|
SlidingPanel.propTypes = {
|
|
1837
1837
|
children: PropTypes__default.default.node,
|
|
@@ -3294,7 +3294,7 @@ const DateTrigger = ({
|
|
|
3294
3294
|
className: "input-group-addon",
|
|
3295
3295
|
children: /*#__PURE__*/jsxRuntime.jsx(CloseButton, {
|
|
3296
3296
|
className: `clear-btn clear-btn--${size}`,
|
|
3297
|
-
"aria-label": formatMessage(dateTriggerMessages.ariaLabel)
|
|
3297
|
+
"aria-label": `${formatMessage(dateTriggerMessages.ariaLabel)} ${label}`,
|
|
3298
3298
|
size: exports.Size.SMALL,
|
|
3299
3299
|
onClick: event => {
|
|
3300
3300
|
event.stopPropagation();
|
|
@@ -5467,6 +5467,7 @@ const Stepper = ({
|
|
|
5467
5467
|
});
|
|
5468
5468
|
return /*#__PURE__*/jsxRuntime.jsx("li", {
|
|
5469
5469
|
className: classNames__default.default('hidden-xs', 'tw-stepper__step', active ? 'np-text-body-default-bold tw-stepper__step--active' : 'np-text-body-default', clickable && 'tw-stepper__step--clickable', step.hoverLabel && 'tw-stepper__step--has-tooltip'),
|
|
5470
|
+
"aria-current": active ? 'step' : false,
|
|
5470
5471
|
style: isRTL ? {
|
|
5471
5472
|
right: `${index * stepPercentage * 100}%`
|
|
5472
5473
|
} : {
|
|
@@ -7892,7 +7893,7 @@ function contains(property, query) {
|
|
|
7892
7893
|
return property && property.toLowerCase().includes(query.toLowerCase());
|
|
7893
7894
|
}
|
|
7894
7895
|
function sortOptionsLabelsToFirst(options, query) {
|
|
7895
|
-
return options.sort((first, second) => {
|
|
7896
|
+
return [...options].sort((first, second) => {
|
|
7896
7897
|
const firstContains = contains(first.label, query);
|
|
7897
7898
|
const secondContains = contains(second.label, query);
|
|
7898
7899
|
if (firstContains && secondContains) {
|
|
@@ -12366,7 +12367,7 @@ class Typeahead extends React.Component {
|
|
|
12366
12367
|
selected,
|
|
12367
12368
|
errorState
|
|
12368
12369
|
}, () => {
|
|
12369
|
-
onChange(selected);
|
|
12370
|
+
onChange([...selected]);
|
|
12370
12371
|
});
|
|
12371
12372
|
};
|
|
12372
12373
|
clear = event => {
|
|
@@ -13509,7 +13510,7 @@ const UploadButton = ({
|
|
|
13509
13510
|
if (fileTypes === '*') {
|
|
13510
13511
|
return fileTypes;
|
|
13511
13512
|
}
|
|
13512
|
-
return Array.isArray(fileTypes) ?
|
|
13513
|
+
return getAllowedFileTypes(Array.isArray(fileTypes) ? fileTypes : [fileTypes]).join(', ');
|
|
13513
13514
|
};
|
|
13514
13515
|
function getDescription() {
|
|
13515
13516
|
if (description) {
|
|
@@ -13525,7 +13526,7 @@ const UploadButton = ({
|
|
|
13525
13526
|
function getAcceptedTypes() {
|
|
13526
13527
|
const areAllFilesAllowed = getFileTypesDescription() === '*';
|
|
13527
13528
|
if (areAllFilesAllowed) {
|
|
13528
|
-
return
|
|
13529
|
+
return {}; //file input by default allows all files
|
|
13529
13530
|
}
|
|
13530
13531
|
if (Array.isArray(fileTypes)) {
|
|
13531
13532
|
return {
|
|
@@ -13991,7 +13992,7 @@ const UploadInput = ({
|
|
|
13991
13992
|
}, []);
|
|
13992
13993
|
React.useEffect(() => {
|
|
13993
13994
|
if (onFilesChange && mounted) {
|
|
13994
|
-
onFilesChange(uploadedFiles);
|
|
13995
|
+
onFilesChange([...uploadedFiles]);
|
|
13995
13996
|
}
|
|
13996
13997
|
}, [onFilesChange, uploadedFiles]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
13997
13998
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|