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

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.
@@ -1,7 +1,7 @@
1
1
  import classNames from 'classnames';
2
2
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
3
  import * as React from 'react';
4
- import React__default, { forwardRef, cloneElement, useState, useRef, useMemo, useEffect, useCallback, useLayoutEffect, createContext, useContext, Component, PureComponent, createRef, Children, Fragment as Fragment$1 } from 'react';
4
+ import React__default, { forwardRef, cloneElement, useState, useRef, useMemo, useEffect, useCallback, useLayoutEffect, createContext, useContext, createElement, Component, PureComponent, createRef, Children, Fragment as Fragment$1 } from 'react';
5
5
  import { useId } from '@radix-ui/react-id';
6
6
  import { ChevronUp, CrossCircleFill, Cross, NavigateAway, Check, Info as Info$1, Alert as Alert$2, ClockBorderless, CheckCircle, InfoCircle, Warning, CrossCircle, Clock, Briefcase, Person, ArrowLeft, QuestionMarkCircle, AlertCircle, Search, ChevronDown, CheckCircleFill, ArrowRight, Download, ClockFill, Upload as Upload$2, Document, Plus, PlusCircle, AlertCircleFill } from '@transferwise/icons';
7
7
  import { defineMessages, useIntl, injectIntl, IntlProvider } from 'react-intl';
@@ -1778,8 +1778,9 @@ const SlidingPanel = /*#__PURE__*/forwardRef(({
1778
1778
  }, reference) => {
1779
1779
  /** @type {RefObject<HTMLDivElement>} */
1780
1780
  const localReference = useRef(null);
1781
- return /*#__PURE__*/jsx(CSSTransition, {
1781
+ return /*#__PURE__*/createElement(CSSTransition, {
1782
1782
  ...rest,
1783
+ key: `sliding-panel--open-${position}`,
1783
1784
  nodeRef: localReference,
1784
1785
  in: open
1785
1786
  // Wait for animation to finish before unmount.
@@ -1792,13 +1793,12 @@ const SlidingPanel = /*#__PURE__*/forwardRef(({
1792
1793
  'sliding-panel--fixed': slidingPanelPositionFixed
1793
1794
  }, 'sliding-panel'),
1794
1795
  appear: true,
1795
- unmountOnExit: true,
1796
- children: /*#__PURE__*/jsx("div", {
1797
- ref: mergeRefs([reference, localReference]),
1798
- className: classNames('sliding-panel', `sliding-panel--open-${position}`, className),
1799
- children: children
1800
- })
1801
- });
1796
+ unmountOnExit: true
1797
+ }, /*#__PURE__*/jsx("div", {
1798
+ ref: mergeRefs([reference, localReference]),
1799
+ className: classNames('sliding-panel', `sliding-panel--open-${position}`, className),
1800
+ children: children
1801
+ }));
1802
1802
  });
1803
1803
  SlidingPanel.propTypes = {
1804
1804
  children: PropTypes.node,
@@ -12266,12 +12266,7 @@ class Typeahead extends Component {
12266
12266
  query = item.label;
12267
12267
  }
12268
12268
  this.updateSelectedValue(selected);
12269
- if (!item.keepFocusOnSelect) {
12270
- this.hideMenu();
12271
- }
12272
- if (item.clearQueryOnSelect) {
12273
- query = '';
12274
- }
12269
+ this.hideMenu();
12275
12270
  this.setState({
12276
12271
  query
12277
12272
  });
@@ -12498,10 +12493,10 @@ class Typeahead extends Component {
12498
12493
  children: /*#__PURE__*/jsx(Cross, {})
12499
12494
  })
12500
12495
  })]
12501
- }), displayAlert ? /*#__PURE__*/jsx(InlineAlert, {
12496
+ }), displayAlert && /*#__PURE__*/jsx(InlineAlert, {
12502
12497
  type: alert.type,
12503
12498
  children: alert.message
12504
- }) : menu]
12499
+ }), menu]
12505
12500
  })
12506
12501
  });
12507
12502
  }