@transferwise/components 0.0.0-experimental-7627eab → 0.0.0-experimental-3243eb8

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 (50) hide show
  1. package/build/index.esm.js +19 -6
  2. package/build/index.esm.js.map +1 -1
  3. package/build/index.js +20 -8
  4. package/build/index.js.map +1 -1
  5. package/build/types/emphasis/Emphasis.d.ts +1 -1
  6. package/build/types/emphasis/Emphasis.d.ts.map +1 -1
  7. package/build/types/emphasis/EmphasisHtmlTransformer.d.ts +1 -1
  8. package/build/types/emphasis/EmphasisHtmlTransformer.d.ts.map +1 -1
  9. package/build/types/emphasis/index.d.ts +0 -1
  10. package/build/types/emphasis/index.d.ts.map +1 -1
  11. package/build/types/index.d.ts +0 -5
  12. package/build/types/index.d.ts.map +1 -1
  13. package/build/types/inputs/SelectInput.d.ts.map +1 -1
  14. package/build/types/loader/Loader.d.ts +3 -3
  15. package/build/types/loader/Loader.d.ts.map +1 -1
  16. package/build/types/loader/index.d.ts +2 -2
  17. package/build/types/loader/index.d.ts.map +1 -1
  18. package/build/types/money/Money.d.ts +11 -8
  19. package/build/types/money/Money.d.ts.map +1 -1
  20. package/build/types/money/index.d.ts +1 -2
  21. package/build/types/money/index.d.ts.map +1 -1
  22. package/build/types/navigationOptionsList/NavigationOptionsList.d.ts +10 -7
  23. package/build/types/navigationOptionsList/NavigationOptionsList.d.ts.map +1 -1
  24. package/build/types/navigationOptionsList/index.d.ts +1 -2
  25. package/build/types/navigationOptionsList/index.d.ts.map +1 -1
  26. package/build/types/slidingPanel/SlidingPanel.d.ts.map +1 -1
  27. package/package.json +1 -2
  28. package/src/avatar/{Avatar.spec.tsx → Avatar.spec.js} +13 -6
  29. package/src/emphasis/{Emphasis.spec.tsx → Emphasis.spec.js} +1 -2
  30. package/src/emphasis/Emphasis.tsx +1 -1
  31. package/src/emphasis/{EmphasisHtmlTransformer.spec.tsx → EmphasisHtmlTransformer.spec.js} +12 -0
  32. package/src/emphasis/EmphasisHtmlTransformer.ts +1 -1
  33. package/src/emphasis/index.ts +0 -1
  34. package/src/index.ts +0 -5
  35. package/src/inputs/SelectInput.tsx +5 -3
  36. package/src/loader/Loader.tsx +3 -3
  37. package/src/loader/index.js +3 -0
  38. package/src/money/{Money.tsx → Money.js} +7 -6
  39. package/src/money/{Money.spec.tsx → Money.spec.js} +1 -1
  40. package/src/money/index.js +1 -0
  41. package/src/navigationOptionsList/NavigationOptionsList.js +20 -0
  42. package/src/navigationOptionsList/index.js +1 -0
  43. package/src/slidingPanel/SlidingPanel.tsx +4 -4
  44. package/src/loader/index.ts +0 -2
  45. package/src/money/index.ts +0 -2
  46. package/src/navigationOptionsList/NavigationOptionsList.tsx +0 -20
  47. package/src/navigationOptionsList/index.ts +0 -2
  48. /package/src/loader/{Loader.spec.tsx → Loader.spec.js} +0 -0
  49. /package/src/navigationOptionsList/{NavigationOptionsList.spec.tsx → NavigationOptionsList.spec.js} +0 -0
  50. /package/src/navigationOptionsList/{NavigationOptionsList.story.tsx → NavigationOptionsList.story.js} +0 -0
@@ -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: () => {
@@ -7410,6 +7413,7 @@ const getSupportedSize = size => {
7410
7413
  return Size.MEDIUM;
7411
7414
  }
7412
7415
  };
7416
+ var Loader$1 = Loader;
7413
7417
 
7414
7418
  const Money = ({
7415
7419
  amount,
@@ -7422,6 +7426,11 @@ const Money = ({
7422
7426
  children: formatMoney(amount, currency, locale)
7423
7427
  });
7424
7428
  };
7429
+ Money.propTypes = {
7430
+ amount: PropTypes.number.isRequired,
7431
+ currency: PropTypes.string.isRequired
7432
+ };
7433
+ var Money$1 = Money;
7425
7434
 
7426
7435
  var messages$4 = defineMessages({
7427
7436
  selectPlaceholder: {
@@ -7839,9 +7848,13 @@ const NavigationOptionList = ({
7839
7848
  children: Children.map(children, child => /*#__PURE__*/jsx("li", {
7840
7849
  className: "np-navigation-options-list__item",
7841
7850
  children: child
7842
- }, child?.toString()))
7851
+ }, child.key))
7843
7852
  });
7844
7853
  };
7854
+ NavigationOptionList.propTypes = {
7855
+ children: PropTypes.node.isRequired
7856
+ };
7857
+ var NavigationOptionList$1 = NavigationOptionList;
7845
7858
 
7846
7859
  const STORAGE_NAME = 'dismissedNudges';
7847
7860
  const getLocalStorage = () => {
@@ -15079,5 +15092,5 @@ const translations = {
15079
15092
  'zh-HK': zhHK
15080
15093
  };
15081
15094
 
15082
- export { Accordion, ActionButton, ActionOption, Alert$1 as Alert, ArrowPosition as AlertArrowPosition, Avatar, AvatarType, AvatarWrapper, Badge, Card as BaseCard, Body, BottomSheet$2 as BottomSheet, Breakpoint, Button, Card$2 as Card, Checkbox$1 as Checkbox, CheckboxButton$1 as CheckboxButton, CheckboxOption, Chevron, Chip, Chips, CircularButton, ControlType, CriticalCommsBanner, DEFAULT_LANG, DEFAULT_LOCALE, DateInput, DateLookup$1 as DateLookup, DateMode, Decision, DecisionPresentation, DecisionType, DefinitionList$1 as DefinitionList, Dimmer$1 as Dimmer, Direction, DirectionProvider, Display, Drawer$1 as Drawer, DropFade, DynamicFieldDefinitionList$1 as DynamicFieldDefinitionList, Emphasis, FileType, FlowNavigation, Header, Image, Info, InfoPresentation, InlineAlert, Input, InputGroup, InputWithDisplayFormat, InstructionsList, LanguageProvider, Layout, Link, ListItem$1 as ListItem, Loader, Logo$1 as Logo, LogoType, Markdown, MarkdownNodeType, Modal, Money, MoneyInput$1 as MoneyInput, MonthFormat, NavigationOption, NavigationOptionList as NavigationOptionsList, Nudge, Option$2 as Option, OverlayHeader$1 as OverlayHeader, PhoneNumberInput, Popover$1 as Popover, Position, Priority, ProcessIndicator$1 as ProcessIndicator, ProfileType, Progress, ProgressBar, PromoCard$1 as PromoCard, PromoCard$1 as PromoCardGroup, Provider$1 as Provider, RTL_LANGUAGES, Radio, RadioGroup, RadioOption, SUPPORTED_LANGUAGES, Scroll, SearchInput, Section, SegmentedControl, Select, SelectInput, SelectInputOptionContent, SelectInputTriggerButton, Sentiment, Size, SlidingPanel, SnackbarConsumer, SnackbarContext, SnackbarPortal, SnackbarProvider, Status, StatusIcon, Stepper, Sticky, Summary, Switch, SwitchOption, Tabs$1 as Tabs, TextArea, TextareaWithDisplayFormat, Theme, Title, Tooltip, Type, Typeahead, Typography, Upload$1 as Upload, UploadInput, UploadStep, Variant, Width, adjustLocale, getCountryFromLocale, getDirectionFromLocale, getLangFromLocale, isBrowser, isServerSide, translations, useDirection, useLayout, useScreenSize, useSnackbar };
15095
+ export { Accordion, ActionButton, ActionOption, Alert$1 as Alert, ArrowPosition as AlertArrowPosition, Avatar, AvatarType, AvatarWrapper, Badge, Card as BaseCard, Body, BottomSheet$2 as BottomSheet, Breakpoint, Button, Card$2 as Card, Checkbox$1 as Checkbox, CheckboxButton$1 as CheckboxButton, CheckboxOption, Chevron, Chip, Chips, CircularButton, ControlType, CriticalCommsBanner, DEFAULT_LANG, DEFAULT_LOCALE, DateInput, DateLookup$1 as DateLookup, DateMode, Decision, DecisionPresentation, DecisionType, DefinitionList$1 as DefinitionList, Dimmer$1 as Dimmer, Direction, DirectionProvider, Display, Drawer$1 as Drawer, DropFade, DynamicFieldDefinitionList$1 as DynamicFieldDefinitionList, Emphasis, FileType, FlowNavigation, Header, Image, Info, InfoPresentation, InlineAlert, Input, InputGroup, InputWithDisplayFormat, InstructionsList, LanguageProvider, Layout, Link, ListItem$1 as ListItem, Loader$1 as Loader, Logo$1 as Logo, LogoType, Markdown, MarkdownNodeType, Modal, Money$1 as Money, MoneyInput$1 as MoneyInput, MonthFormat, NavigationOption, NavigationOptionList$1 as NavigationOptionsList, Nudge, Option$2 as Option, OverlayHeader$1 as OverlayHeader, PhoneNumberInput, Popover$1 as Popover, Position, Priority, ProcessIndicator$1 as ProcessIndicator, ProfileType, Progress, ProgressBar, PromoCard$1 as PromoCard, PromoCard$1 as PromoCardGroup, Provider$1 as Provider, RTL_LANGUAGES, Radio, RadioGroup, RadioOption, SUPPORTED_LANGUAGES, Scroll, SearchInput, Section, SegmentedControl, Select, SelectInput, SelectInputOptionContent, SelectInputTriggerButton, Sentiment, Size, SlidingPanel, SnackbarConsumer, SnackbarContext, SnackbarPortal, SnackbarProvider, Status, StatusIcon, Stepper, Sticky, Summary, Switch, SwitchOption, Tabs$1 as Tabs, TextArea, TextareaWithDisplayFormat, Theme, Title, Tooltip, Type, Typeahead, Typography, Upload$1 as Upload, UploadInput, UploadStep, Variant, Width, adjustLocale, getCountryFromLocale, getDirectionFromLocale, getLangFromLocale, isBrowser, isServerSide, translations, useDirection, useLayout, useScreenSize, useSnackbar };
15083
15096
  //# sourceMappingURL=index.esm.js.map