@transferwise/components 0.0.0-experimental-cbd2a4c → 0.0.0-experimental-9dec57a

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.mjs CHANGED
@@ -4,7 +4,6 @@ import classNames from 'classnames';
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
  import { ChevronUp, CrossCircleFill, Cross, Check, Info as Info$1, Alert as Alert$1, ClockBorderless, NavigateAway, Briefcase, Person, ArrowRight, Download, ChevronLeft, ChevronRight, AlertCircleFill, AlertCircle, ArrowLeft, QuestionMarkCircle, Search, CrossCircle, ChevronDown, CheckCircleFill, ClockFill, Upload as Upload$2, Document, Plus, PlusCircle } from '@transferwise/icons';
6
6
  import { defineMessages, useIntl, injectIntl, IntlProvider } from 'react-intl';
7
- import PropTypes from 'prop-types';
8
7
  import commonmark from 'commonmark';
9
8
  import { useTheme, ThemeProvider } from '@wise/components-theming';
10
9
  import { CSSTransition } from 'react-transition-group';
@@ -17,6 +16,7 @@ import mergeProps from 'merge-props';
17
16
  import { useFloating, useDismiss, useRole, useInteractions, FloatingPortal, FloatingFocusManager, offset, flip, shift, size, autoUpdate } from '@floating-ui/react';
18
17
  import { usePreventScroll } from '@react-aria/overlays';
19
18
  import { usePopper } from 'react-popper';
19
+ import PropTypes from 'prop-types';
20
20
  import { Flag, Illustration } from '@wise/art';
21
21
  import clamp$2 from 'lodash.clamp';
22
22
  import debounce from 'lodash.debounce';
@@ -830,21 +830,14 @@ function stripNodes({
830
830
  }
831
831
 
832
832
  const allowList = [MarkdownNodeType.STRONG];
833
- const InlineMarkdown = props => {
833
+ function InlineMarkdown(props) {
834
834
  return /*#__PURE__*/jsx(Markdown, {
835
835
  ...props,
836
836
  as: "span",
837
837
  allowList: allowList,
838
838
  blockList: undefined
839
839
  });
840
- };
841
- InlineMarkdown.propTypes = {
842
- children: PropTypes.string.isRequired,
843
- className: PropTypes.string
844
- };
845
- InlineMarkdown.defaultProps = {
846
- className: undefined
847
- };
840
+ }
848
841
 
849
842
  var messages$c = defineMessages({
850
843
  opensInNewTab: {
@@ -2749,15 +2742,15 @@ const SlidingPanel = /*#__PURE__*/forwardRef(({
2749
2742
  }));
2750
2743
  });
2751
2744
 
2752
- const Drawer = ({
2745
+ function Drawer({
2753
2746
  children,
2754
2747
  className,
2755
2748
  footerContent,
2756
2749
  headerTitle,
2757
2750
  onClose,
2758
- open,
2759
- position
2760
- }) => {
2751
+ open = false,
2752
+ position = 'right'
2753
+ }) {
2761
2754
  logActionRequiredIf('Drawer now expects `onClose`, and will soon make this prop required. Please update your usage to provide it.', !onClose);
2762
2755
  const {
2763
2756
  isMobile
@@ -2795,32 +2788,7 @@ const Drawer = ({
2795
2788
  })
2796
2789
  })
2797
2790
  });
2798
- };
2799
- Drawer.propTypes = {
2800
- /** The content to appear in the drawer body. */
2801
- children: PropTypes.node,
2802
- className: PropTypes.string,
2803
- /** The content to appear in the drawer footer. */
2804
- footerContent: PropTypes.node,
2805
- /** The content to appear in the drawer header. */
2806
- headerTitle: PropTypes.node,
2807
- /** The status of Drawer either open or not. */
2808
- open: PropTypes.bool,
2809
- /** The placement of Drawer on the screen either left or right. On mobile it will default to bottom. */
2810
- position: PropTypes.oneOf(['left', 'right', 'bottom']),
2811
- /** The action to perform on close click. */
2812
- onClose: PropTypes.func
2813
- };
2814
- Drawer.defaultProps = {
2815
- children: null,
2816
- className: undefined,
2817
- footerContent: null,
2818
- headerTitle: null,
2819
- onClose: null,
2820
- open: false,
2821
- position: Position.RIGHT
2822
- };
2823
- var Drawer$1 = Drawer;
2791
+ }
2824
2792
 
2825
2793
  const INITIAL_Y_POSITION = 0;
2826
2794
  const CONTENT_SCROLL_THRESHOLD = 1;
@@ -2950,7 +2918,7 @@ const BottomSheet$1 = props => {
2950
2918
  };
2951
2919
  }
2952
2920
  const is400Zoom = useMedia(`(max-width: ${Breakpoint.ZOOM_400}px)`);
2953
- return is400Zoom ? /*#__PURE__*/jsx(Drawer$1, {
2921
+ return is400Zoom ? /*#__PURE__*/jsx(Drawer, {
2954
2922
  open: props.open,
2955
2923
  className: props.className,
2956
2924
  onClose: close,
@@ -5543,7 +5511,7 @@ const Modal = ({
5543
5511
  const noDivider = checkSpecialClasses('no-divider');
5544
5512
  const contentReference = useRef(null);
5545
5513
  const titleId = useId();
5546
- return !isMedium ? /*#__PURE__*/jsx(Drawer$1, {
5514
+ return !isMedium ? /*#__PURE__*/jsx(Drawer, {
5547
5515
  open: open,
5548
5516
  headerTitle: title,
5549
5517
  footerContent: footer,
@@ -10371,7 +10339,7 @@ function Select({
10371
10339
  , {
10372
10340
  className: classNames(s('tw-icon'), s('tw-chevron-up-icon'), s('tw-chevron'), s('bottom'), s('np-select-chevron'))
10373
10341
  })]
10374
- }), isMobile ? isSearchEnabled ? /*#__PURE__*/jsx(Drawer$1, {
10342
+ }), isMobile ? isSearchEnabled ? /*#__PURE__*/jsx(Drawer, {
10375
10343
  open: open,
10376
10344
  headerTitle: searchPlaceholder || formatMessage(messages$2.searchPlaceholder),
10377
10345
  onClose: handleCloseOptions,
@@ -14665,5 +14633,5 @@ const translations = {
14665
14633
  'zh-HK': zhHK
14666
14634
  };
14667
14635
 
14668
- export { Accordion, ActionButton, ActionOption, Alert, AlertArrowPosition, Avatar, AvatarType, AvatarWrapper, Badge, Card$2 as BaseCard, Body, BottomSheet$1 as BottomSheet, Breakpoint, Button, Card$1 as Card, Carousel, Checkbox, CheckboxButton, CheckboxOption, Chevron, Chip, Chips, CircularButton, ControlType, CriticalCommsBanner, DEFAULT_LANG, DEFAULT_LOCALE, DateInput, DateLookup$1 as DateLookup, DateMode, Decision, DecisionPresentation, DecisionType, DefinitionList, Dimmer$1 as Dimmer, Direction, DirectionProvider, Display, Drawer$1 as Drawer, DropFade, Emphasis, Field, FileType, FlowNavigation, Header, Image, Info, InfoPresentation, InlineAlert, Input, InputGroup, InputWithDisplayFormat, InstructionsList, Label, LanguageProvider, Layout, Link, ListItem$1 as ListItem, Loader, 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, ProfileType, Progress, ProgressBar, PromoCard$1 as PromoCard, PromoCardGroup$1 as PromoCardGroup, 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$1 as Typeahead, Typography, Upload$1 as Upload, UploadInput, UploadStep, Variant, Width, adjustLocale, getCountryFromLocale, getDirectionFromLocale, getLangFromLocale, isBrowser, isServerSide, translations, useDirection, useLayout, useScreenSize, useSnackbar };
14636
+ export { Accordion, ActionButton, ActionOption, Alert, AlertArrowPosition, Avatar, AvatarType, AvatarWrapper, Badge, Card$2 as BaseCard, Body, BottomSheet$1 as BottomSheet, Breakpoint, Button, Card$1 as Card, Carousel, Checkbox, CheckboxButton, CheckboxOption, Chevron, Chip, Chips, CircularButton, ControlType, CriticalCommsBanner, DEFAULT_LANG, DEFAULT_LOCALE, DateInput, DateLookup$1 as DateLookup, DateMode, Decision, DecisionPresentation, DecisionType, DefinitionList, Dimmer$1 as Dimmer, Direction, DirectionProvider, Display, Drawer, DropFade, Emphasis, Field, FileType, FlowNavigation, Header, Image, Info, InfoPresentation, InlineAlert, Input, InputGroup, InputWithDisplayFormat, InstructionsList, Label, LanguageProvider, Layout, Link, ListItem$1 as ListItem, Loader, 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, ProfileType, Progress, ProgressBar, PromoCard$1 as PromoCard, PromoCardGroup$1 as PromoCardGroup, 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$1 as Typeahead, Typography, Upload$1 as Upload, UploadInput, UploadStep, Variant, Width, adjustLocale, getCountryFromLocale, getDirectionFromLocale, getLangFromLocale, isBrowser, isServerSide, translations, useDirection, useLayout, useScreenSize, useSnackbar };
14669
14637
  //# sourceMappingURL=index.mjs.map