@transferwise/components 0.0.0-experimental-e3c198b → 0.0.0-experimental-c6325ed

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.
Files changed (73) hide show
  1. package/build/index.esm.js +14 -14
  2. package/build/index.esm.js.map +1 -1
  3. package/build/index.js +13 -13
  4. package/build/index.js.map +1 -1
  5. package/build/types/accordion/Accordion.d.ts +1 -1
  6. package/build/types/accordion/Accordion.d.ts.map +1 -1
  7. package/build/types/chips/Chips.d.ts +2 -2
  8. package/build/types/chips/Chips.d.ts.map +1 -1
  9. package/build/types/dateLookup/getFocusableTime/getFocusableTime.d.ts +1 -1
  10. package/build/types/dateLookup/getFocusableTime/getFocusableTime.d.ts.map +1 -1
  11. package/build/types/decision/Decision.d.ts +1 -1
  12. package/build/types/decision/Decision.d.ts.map +1 -1
  13. package/build/types/flowNavigation/FlowNavigation.d.ts +1 -1
  14. package/build/types/flowNavigation/FlowNavigation.d.ts.map +1 -1
  15. package/build/types/flowNavigation/animatedLabel/AnimatedLabel.d.ts +1 -1
  16. package/build/types/flowNavigation/animatedLabel/AnimatedLabel.d.ts.map +1 -1
  17. package/build/types/instructionsList/InstructionsList.d.ts +4 -4
  18. package/build/types/instructionsList/InstructionsList.d.ts.map +1 -1
  19. package/build/types/markdown/Markdown.d.ts +2 -2
  20. package/build/types/markdown/Markdown.d.ts.map +1 -1
  21. package/build/types/phoneNumberInput/PhoneNumberInput.d.ts +1 -1
  22. package/build/types/phoneNumberInput/PhoneNumberInput.d.ts.map +1 -1
  23. package/build/types/phoneNumberInput/utils/excludeCountries/excludeCountries.d.ts +1 -1
  24. package/build/types/phoneNumberInput/utils/excludeCountries/excludeCountries.d.ts.map +1 -1
  25. package/build/types/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.d.ts +1 -1
  26. package/build/types/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.d.ts.map +1 -1
  27. package/build/types/phoneNumberInput/utils/longestMatchingPrefix/index.d.ts +1 -1
  28. package/build/types/phoneNumberInput/utils/longestMatchingPrefix/index.d.ts.map +1 -1
  29. package/build/types/phoneNumberInput/utils/sortArrayByProperty/sortArrayByProperty.d.ts +1 -1
  30. package/build/types/phoneNumberInput/utils/sortArrayByProperty/sortArrayByProperty.d.ts.map +1 -1
  31. package/build/types/radioGroup/RadioGroup.d.ts +1 -1
  32. package/build/types/radioGroup/RadioGroup.d.ts.map +1 -1
  33. package/build/types/segmentedControl/SegmentedControl.d.ts +3 -3
  34. package/build/types/segmentedControl/SegmentedControl.d.ts.map +1 -1
  35. package/build/types/slidingPanel/SlidingPanel.d.ts.map +1 -1
  36. package/build/types/stepper/Stepper.d.ts +1 -1
  37. package/build/types/stepper/Stepper.d.ts.map +1 -1
  38. package/build/types/typeahead/Typeahead.d.ts +5 -5
  39. package/build/types/typeahead/Typeahead.d.ts.map +1 -1
  40. package/build/types/typeahead/typeaheadInput/TypeaheadInput.d.ts +1 -1
  41. package/build/types/typeahead/typeaheadInput/TypeaheadInput.d.ts.map +1 -1
  42. package/build/types/uploadInput/UploadInput.d.ts +1 -1
  43. package/build/types/uploadInput/UploadInput.d.ts.map +1 -1
  44. package/build/types/uploadInput/uploadButton/UploadButton.d.ts +1 -1
  45. package/build/types/uploadInput/uploadButton/UploadButton.d.ts.map +1 -1
  46. package/build/types/uploadInput/uploadButton/getAllowedFileTypes.d.ts +1 -1
  47. package/build/types/uploadInput/uploadButton/getAllowedFileTypes.d.ts.map +1 -1
  48. package/package.json +1 -1
  49. package/src/accordion/Accordion.tsx +1 -1
  50. package/src/chips/Chips.story.tsx +2 -2
  51. package/src/chips/Chips.tsx +2 -2
  52. package/src/dateLookup/getFocusableTime/getFocusableTime.tsx +1 -1
  53. package/src/decision/Decision.tsx +1 -1
  54. package/src/flowNavigation/FlowNavigation.tsx +1 -1
  55. package/src/flowNavigation/animatedLabel/AnimatedLabel.tsx +1 -1
  56. package/src/instructionsList/InstructionsList.tsx +4 -4
  57. package/src/markdown/Markdown.tsx +3 -3
  58. package/src/moneyInput/MoneyInput.tsx +3 -3
  59. package/src/phoneNumberInput/PhoneNumberInput.tsx +1 -1
  60. package/src/phoneNumberInput/utils/excludeCountries/excludeCountries.ts +5 -2
  61. package/src/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.ts +1 -1
  62. package/src/phoneNumberInput/utils/longestMatchingPrefix/index.ts +1 -1
  63. package/src/phoneNumberInput/utils/sortArrayByProperty/sortArrayByProperty.ts +1 -1
  64. package/src/promoCard/PromoCardGroup.tsx +1 -1
  65. package/src/radioGroup/RadioGroup.tsx +1 -1
  66. package/src/segmentedControl/SegmentedControl.tsx +3 -3
  67. package/src/slidingPanel/SlidingPanel.js +1 -0
  68. package/src/stepper/Stepper.tsx +1 -1
  69. package/src/typeahead/Typeahead.tsx +6 -6
  70. package/src/typeahead/typeaheadInput/TypeaheadInput.tsx +1 -1
  71. package/src/uploadInput/UploadInput.tsx +6 -6
  72. package/src/uploadInput/uploadButton/UploadButton.tsx +5 -7
  73. 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__*/jsxRuntime.jsx(reactTransitionGroup.CSSTransition, {
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
- children: /*#__PURE__*/jsxRuntime.jsx("div", {
1830
- ref: mergeRefs__default.default([reference, localReference]),
1831
- className: classNames__default.default('sliding-panel', `sliding-panel--open-${position}`, className),
1832
- children: children
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,
@@ -7893,7 +7893,7 @@ function contains(property, query) {
7893
7893
  return property && property.toLowerCase().includes(query.toLowerCase());
7894
7894
  }
7895
7895
  function sortOptionsLabelsToFirst(options, query) {
7896
- return options.sort((first, second) => {
7896
+ return [...options].sort((first, second) => {
7897
7897
  const firstContains = contains(first.label, query);
7898
7898
  const secondContains = contains(second.label, query);
7899
7899
  if (firstContains && secondContains) {
@@ -12372,7 +12372,7 @@ class Typeahead extends React.Component {
12372
12372
  selected,
12373
12373
  errorState
12374
12374
  }, () => {
12375
- onChange(selected);
12375
+ onChange([...selected]);
12376
12376
  });
12377
12377
  };
12378
12378
  clear = event => {
@@ -13515,7 +13515,7 @@ const UploadButton = ({
13515
13515
  if (fileTypes === '*') {
13516
13516
  return fileTypes;
13517
13517
  }
13518
- return Array.isArray(fileTypes) ? getAllowedFileTypes(fileTypes).join(', ') : getAllowedFileTypes([fileTypes]).join(', ');
13518
+ return getAllowedFileTypes(Array.isArray(fileTypes) ? fileTypes : [fileTypes]).join(', ');
13519
13519
  };
13520
13520
  function getDescription() {
13521
13521
  if (description) {
@@ -13531,7 +13531,7 @@ const UploadButton = ({
13531
13531
  function getAcceptedTypes() {
13532
13532
  const areAllFilesAllowed = getFileTypesDescription() === '*';
13533
13533
  if (areAllFilesAllowed) {
13534
- return null; //file input by default allows all files
13534
+ return {}; //file input by default allows all files
13535
13535
  }
13536
13536
  if (Array.isArray(fileTypes)) {
13537
13537
  return {
@@ -13997,7 +13997,7 @@ const UploadInput = ({
13997
13997
  }, []);
13998
13998
  React.useEffect(() => {
13999
13999
  if (onFilesChange && mounted) {
14000
- onFilesChange(uploadedFiles);
14000
+ onFilesChange([...uploadedFiles]);
14001
14001
  }
14002
14002
  }, [onFilesChange, uploadedFiles]); // eslint-disable-line react-hooks/exhaustive-deps
14003
14003
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {