@transferwise/components 46.15.0 → 46.16.0

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.
@@ -7382,23 +7382,31 @@ const InputWithDisplayFormat = props => /*#__PURE__*/jsx(WithDisplayFormat, {
7382
7382
 
7383
7383
  const InstructionsList = ({
7384
7384
  dos,
7385
- donts
7385
+ donts,
7386
+ sort = 'dosFirst'
7386
7387
  }) => {
7387
- return /*#__PURE__*/jsxs("div", {
7388
+ const dosInstructions = dos?.map((doThis, index) =>
7389
+ /*#__PURE__*/
7390
+ // eslint-disable-next-line react/no-array-index-key
7391
+ jsx(Instruction, {
7392
+ item: doThis,
7393
+ type: "do"
7394
+ }, index)) ?? null;
7395
+ const dontsInstructions = donts?.map((dont, index) =>
7396
+ /*#__PURE__*/
7397
+ // eslint-disable-next-line react/no-array-index-key
7398
+ jsx(Instruction, {
7399
+ item: dont,
7400
+ type: "dont"
7401
+ }, index)) ?? null;
7402
+ const orderedInstructions = sort === 'dosFirst' ? /*#__PURE__*/jsxs(Fragment, {
7403
+ children: [dosInstructions, dontsInstructions]
7404
+ }) : /*#__PURE__*/jsxs(Fragment, {
7405
+ children: [dontsInstructions, dosInstructions]
7406
+ });
7407
+ return /*#__PURE__*/jsx("div", {
7388
7408
  className: "tw-instructions",
7389
- children: [dos && dos.map((doThis, index) =>
7390
- /*#__PURE__*/
7391
- // eslint-disable-next-line react/no-array-index-key
7392
- jsx(Instruction, {
7393
- item: doThis,
7394
- type: "do"
7395
- }, index)), donts && donts.map((dont, index) =>
7396
- /*#__PURE__*/
7397
- // eslint-disable-next-line react/no-array-index-key
7398
- jsx(Instruction, {
7399
- item: dont,
7400
- type: "dont"
7401
- }, index))]
7409
+ children: orderedInstructions
7402
7410
  });
7403
7411
  };
7404
7412
  function Instruction({
@@ -7422,7 +7430,6 @@ function Instruction({
7422
7430
  })]
7423
7431
  });
7424
7432
  }
7425
- var InstructionsList$1 = InstructionsList;
7426
7433
 
7427
7434
  const Loader = ({
7428
7435
  small = false,
@@ -7757,6 +7764,7 @@ class MoneyInput extends Component {
7757
7764
  size,
7758
7765
  addon,
7759
7766
  id,
7767
+ 'aria-labelledby': ariaLabelledBy,
7760
7768
  selectProps,
7761
7769
  maxLengthOverride
7762
7770
  } = this.props;
@@ -7780,6 +7788,7 @@ class MoneyInput extends Component {
7780
7788
  const isFixedCurrency = !this.state.searchQuery && hasSingleCurrency() || !onCurrencyChange;
7781
7789
  const disabled = !this.props.onAmountChange;
7782
7790
  return /*#__PURE__*/jsxs("div", {
7791
+ "aria-labelledby": ariaLabelledBy,
7783
7792
  className: classNames(this.style('tw-money-input'), this.style('input-group'), this.style(`input-group-${size}`)),
7784
7793
  children: [/*#__PURE__*/jsx(Input, {
7785
7794
  id: id,
@@ -15148,5 +15157,5 @@ const translations = {
15148
15157
  'zh-HK': zhHK
15149
15158
  };
15150
15159
 
15151
- 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$1 as 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$1 as InstructionsList, LanguageProvider, Layout, Link, ListItem$1 as ListItem, Loader$1 as Loader, Logo$1 as Logo, LogoType, Markdown$1 as 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$2 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$1 as SlidingPanel, SnackbarConsumer, SnackbarContext, SnackbarPortal, SnackbarProvider, Status, StatusIcon, Stepper, Sticky$1 as Sticky, Summary, Switch, SwitchOption, Tabs$1 as Tabs, TextArea, TextareaWithDisplayFormat, Theme, Title, Tooltip$1 as Tooltip, Type, Typeahead, Typography, Upload$1 as Upload, UploadInput, UploadStep, Variant, Width, adjustLocale, getCountryFromLocale, getDirectionFromLocale, getLangFromLocale, isBrowser, isServerSide, translations, useDirection, useLayout, useScreenSize, useSnackbar };
15160
+ 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$1 as 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$1 as 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$2 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$1 as SlidingPanel, SnackbarConsumer, SnackbarContext, SnackbarPortal, SnackbarProvider, Status, StatusIcon, Stepper, Sticky$1 as Sticky, Summary, Switch, SwitchOption, Tabs$1 as Tabs, TextArea, TextareaWithDisplayFormat, Theme, Title, Tooltip$1 as Tooltip, Type, Typeahead, Typography, Upload$1 as Upload, UploadInput, UploadStep, Variant, Width, adjustLocale, getCountryFromLocale, getDirectionFromLocale, getLangFromLocale, isBrowser, isServerSide, translations, useDirection, useLayout, useScreenSize, useSnackbar };
15152
15161
  //# sourceMappingURL=index.esm.js.map