@transferwise/components 0.0.0-experimental-170452f → 0.0.0-experimental-d565c6a

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, createElement, Component, PureComponent, createRef, isValidElement, Children, Fragment as Fragment$1 } from 'react';
4
+ import React__default, { forwardRef, cloneElement, useState, useRef, useMemo, useEffect, useCallback, useLayoutEffect, createContext, useContext, useImperativeHandle, createElement, Component, PureComponent, createRef, isValidElement, 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';
@@ -10,7 +10,6 @@ import { useTheme, ThemeProvider } from '@wise/components-theming';
10
10
  import { formatDate, formatNumber, formatMoney, formatAmount } from '@transferwise/formatting';
11
11
  import { Transition, Listbox } from '@headlessui/react';
12
12
  import mergeProps from 'merge-props';
13
- import mergeRefs from 'react-merge-refs';
14
13
  import { useSyncExternalStore } from 'use-sync-external-store/shim';
15
14
  import { useFloating, useDismiss, useRole, useInteractions, FloatingPortal, FloatingFocusManager, offset, flip, shift, size, autoUpdate } from '@floating-ui/react';
16
15
  import { FocusScope } from '@react-aria/focus';
@@ -1762,6 +1761,7 @@ const SlidingPanel = /*#__PURE__*/forwardRef(({
1762
1761
  ...rest
1763
1762
  }, reference) => {
1764
1763
  const localReference = useRef(null);
1764
+ useImperativeHandle(reference, () => localReference.current, []);
1765
1765
  return /*#__PURE__*/createElement(CSSTransition, {
1766
1766
  ...rest,
1767
1767
  key: `sliding-panel--open-${position}`,
@@ -1777,7 +1777,7 @@ const SlidingPanel = /*#__PURE__*/forwardRef(({
1777
1777
  appear: true,
1778
1778
  unmountOnExit: true
1779
1779
  }, /*#__PURE__*/jsx("div", {
1780
- ref: mergeRefs([reference, localReference]),
1780
+ ref: localReference,
1781
1781
  className: classNames('sliding-panel', `sliding-panel--open-${position}`, showSlidingPanelBorder && `sliding-panel--border-${position}`, slidingPanelPositionFixed && 'sliding-panel--fixed', className),
1782
1782
  children: children
1783
1783
  }));
@@ -6569,7 +6569,10 @@ function SelectInput({
6569
6569
  }) => /*#__PURE__*/jsx(SelectInputTriggerButtonPropsContext.Provider, {
6570
6570
  // eslint-disable-next-line react/jsx-no-constructed-context-values
6571
6571
  value: {
6572
- ref: mergeRefs([ref, triggerRef]),
6572
+ ref: node => {
6573
+ ref(node);
6574
+ triggerRef.current = node;
6575
+ },
6573
6576
  id,
6574
6577
  ...mergeProps({
6575
6578
  onClick: () => {