@transferwise/components 45.18.0 → 45.19.1

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.
@@ -1506,7 +1506,6 @@ const FocusBoundary = ({
1506
1506
  })
1507
1507
  });
1508
1508
  };
1509
- var FocusBoundary$1 = FocusBoundary;
1510
1509
 
1511
1510
  function withNextPortalWrapper(Component) {
1512
1511
  return function (props) {
@@ -1648,7 +1647,7 @@ const Dimmer = ({
1648
1647
  onExited: onExited,
1649
1648
  children: /*#__PURE__*/jsx(DimmerContentWrapper, {
1650
1649
  scrollBody: !transparent,
1651
- children: /*#__PURE__*/jsx(FocusBoundary$1, {
1650
+ children: /*#__PURE__*/jsx(FocusBoundary, {
1652
1651
  children: /*#__PURE__*/jsx("div", {
1653
1652
  ref: dimmerReference,
1654
1653
  className: classNames('dimmer', {
@@ -6262,10 +6261,10 @@ function formControlClassNameBase({
6262
6261
  return classNames('form-control',
6263
6262
  // TODO: Deprecate
6264
6263
  'np-form-control', {
6265
- 'np-form-control--size-auto np-text-body-large': size === 'auto',
6266
- 'np-form-control--size-sm np-text-body-default': size === 'sm',
6267
- 'np-form-control--size-md np-text-body-large': size === 'md',
6268
- 'np-form-control--size-lg np-text-title-subsection': size === 'lg'
6264
+ 'np-form-control--size-auto': size === 'auto',
6265
+ 'np-form-control--size-sm': size === 'sm',
6266
+ 'np-form-control--size-md': size === 'md',
6267
+ 'np-form-control--size-lg': size === 'lg'
6269
6268
  });
6270
6269
  }
6271
6270
 
@@ -6411,43 +6410,47 @@ function BottomSheet({
6411
6410
  children: /*#__PURE__*/jsx("div", {
6412
6411
  className: "np-bottom-sheet-v2-backdrop"
6413
6412
  })
6414
- }), /*#__PURE__*/jsx(FloatingFocusManager, {
6415
- context: context,
6416
- initialFocus: initialFocusRef,
6417
- children: /*#__PURE__*/jsx("div", {
6418
- className: "np-bottom-sheet-v2",
6419
- children: /*#__PURE__*/jsx(Transition.Child, {
6420
- className: "np-bottom-sheet-v2-content",
6421
- enter: "np-bottom-sheet-v2-content--enter",
6422
- enterFrom: "np-bottom-sheet-v2-content--enter-from",
6423
- leave: "np-bottom-sheet-v2-content--leave",
6424
- leaveTo: "np-bottom-sheet-v2-content--leave-to",
6425
- children: /*#__PURE__*/jsxs("div", {
6426
- // Force inner state invalidation on open
6427
- ref: refs.setFloating,
6428
- className: "np-bottom-sheet-v2-content-inner-container",
6429
- ...getFloatingProps(),
6430
- children: [/*#__PURE__*/jsx("div", {
6431
- className: "np-bottom-sheet-v2-header",
6432
- children: /*#__PURE__*/jsx(CloseButton, {
6433
- size: Size.SMALL,
6434
- onClick: () => {
6435
- onClose?.();
6436
- }
6437
- })
6438
- }), /*#__PURE__*/jsxs("div", {
6439
- className: classNames('np-bottom-sheet-v2-content-inner', title && 'np-bottom-sheet-v2-content-inner--has-title', {
6440
- 'np-bottom-sheet-v2-content-inner--padding-md': padding === 'md'
6441
- }),
6442
- children: [title ? /*#__PURE__*/jsx("h2", {
6443
- className: "np-bottom-sheet-v2-title np-text-title-body",
6444
- children: title
6445
- }) : null, /*#__PURE__*/jsx("div", {
6446
- className: "np-bottom-sheet-v2-body np-text-body-default",
6447
- children: children
6413
+ }), /*#__PURE__*/jsx(FocusBoundary, {
6414
+ children: /*#__PURE__*/jsx(FloatingFocusManager, {
6415
+ context: context,
6416
+ initialFocus: initialFocusRef,
6417
+ guards: false,
6418
+ modal: false,
6419
+ children: /*#__PURE__*/jsx("div", {
6420
+ className: "np-bottom-sheet-v2",
6421
+ children: /*#__PURE__*/jsx(Transition.Child, {
6422
+ className: "np-bottom-sheet-v2-content",
6423
+ enter: "np-bottom-sheet-v2-content--enter",
6424
+ enterFrom: "np-bottom-sheet-v2-content--enter-from",
6425
+ leave: "np-bottom-sheet-v2-content--leave",
6426
+ leaveTo: "np-bottom-sheet-v2-content--leave-to",
6427
+ children: /*#__PURE__*/jsxs("div", {
6428
+ // Force inner state invalidation on open
6429
+ ref: refs.setFloating,
6430
+ className: "np-bottom-sheet-v2-content-inner-container",
6431
+ ...getFloatingProps(),
6432
+ children: [/*#__PURE__*/jsx("div", {
6433
+ className: "np-bottom-sheet-v2-header",
6434
+ children: /*#__PURE__*/jsx(CloseButton, {
6435
+ size: Size.SMALL,
6436
+ onClick: () => {
6437
+ onClose?.();
6438
+ }
6439
+ })
6440
+ }), /*#__PURE__*/jsxs("div", {
6441
+ className: classNames('np-bottom-sheet-v2-content-inner', title && 'np-bottom-sheet-v2-content-inner--has-title', {
6442
+ 'np-bottom-sheet-v2-content-inner--padding-md': padding === 'md'
6443
+ }),
6444
+ children: [title ? /*#__PURE__*/jsx("h2", {
6445
+ className: "np-bottom-sheet-v2-title np-text-title-body",
6446
+ children: title
6447
+ }) : null, /*#__PURE__*/jsx("div", {
6448
+ className: "np-bottom-sheet-v2-body np-text-body-default",
6449
+ children: children
6450
+ })]
6448
6451
  })]
6449
- })]
6450
- }, floatingKey)
6452
+ }, floatingKey)
6453
+ })
6451
6454
  })
6452
6455
  })
6453
6456
  })]
@@ -6540,36 +6543,40 @@ function Popover({
6540
6543
  theme: theme,
6541
6544
  screenMode: screenMode,
6542
6545
  isNotRootProvider: true,
6543
- children: /*#__PURE__*/jsx(FloatingFocusManager, {
6544
- context: context,
6545
- children: /*#__PURE__*/jsx(Transition, {
6546
- show: open,
6547
- leave: "transition-opacity",
6548
- leaveTo: "opacity-0",
6549
- beforeEnter: () => {
6550
- setFloatingKey(prev => prev + 1);
6551
- },
6552
- children: /*#__PURE__*/jsx("div", {
6553
- // Force inner state invalidation on open
6554
- ref: refs.setFloating,
6555
- className: "np-popover-v2-container"
6556
- // eslint-disable-next-line react/forbid-dom-props
6557
- ,
6558
- style: floatingStyles,
6559
- ...getFloatingProps(),
6560
- children: /*#__PURE__*/jsxs("div", {
6561
- className: classNames('np-popover-v2', title && 'np-popover-v2--has-title', {
6562
- 'np-popover-v2--padding-md': padding === 'md'
6563
- }),
6564
- children: [title ? /*#__PURE__*/jsx("h2", {
6565
- className: "np-popover-v2-title np-text-title-body",
6566
- children: title
6567
- }) : null, /*#__PURE__*/jsx("div", {
6568
- className: "np-popover-v2-content np-text-body-default",
6569
- children: children
6570
- })]
6571
- })
6572
- }, floatingKey)
6546
+ children: /*#__PURE__*/jsx(Transition, {
6547
+ show: open,
6548
+ leave: "transition-opacity",
6549
+ leaveTo: "opacity-0",
6550
+ beforeEnter: () => {
6551
+ setFloatingKey(prev => prev + 1);
6552
+ },
6553
+ children: /*#__PURE__*/jsx(FocusBoundary, {
6554
+ children: /*#__PURE__*/jsx(FloatingFocusManager, {
6555
+ context: context,
6556
+ guards: false,
6557
+ modal: false,
6558
+ children: /*#__PURE__*/jsx("div", {
6559
+ // Force inner state invalidation on open
6560
+ ref: refs.setFloating,
6561
+ className: "np-popover-v2-container"
6562
+ // eslint-disable-next-line react/forbid-dom-props
6563
+ ,
6564
+ style: floatingStyles,
6565
+ ...getFloatingProps(),
6566
+ children: /*#__PURE__*/jsxs("div", {
6567
+ className: classNames('np-popover-v2', title && 'np-popover-v2--has-title', {
6568
+ 'np-popover-v2--padding-md': padding === 'md'
6569
+ }),
6570
+ children: [title ? /*#__PURE__*/jsx("h2", {
6571
+ className: "np-popover-v2-title np-text-title-body",
6572
+ children: title
6573
+ }) : null, /*#__PURE__*/jsx("div", {
6574
+ className: "np-popover-v2-content np-text-body-default",
6575
+ children: children
6576
+ })]
6577
+ })
6578
+ }, floatingKey)
6579
+ })
6573
6580
  })
6574
6581
  })
6575
6582
  })
@@ -6626,6 +6633,7 @@ const defaultRenderTrigger = ({
6626
6633
  placeholderShown,
6627
6634
  clear,
6628
6635
  disabled,
6636
+ size,
6629
6637
  className
6630
6638
  }) => /*#__PURE__*/jsx(InputGroup, {
6631
6639
  addonEnd: {
@@ -6653,6 +6661,7 @@ const defaultRenderTrigger = ({
6653
6661
  className: className,
6654
6662
  children: /*#__PURE__*/jsx(SelectInputTriggerButton, {
6655
6663
  as: ButtonInput,
6664
+ size: size,
6656
6665
  children: placeholderShown ? /*#__PURE__*/jsxs("span", {
6657
6666
  className: "np-select-input-placeholder",
6658
6667
  children: [" ", content]
@@ -6686,6 +6695,7 @@ function SelectInput({
6686
6695
  filterable,
6687
6696
  filterPlaceholder,
6688
6697
  disabled,
6698
+ size = 'md',
6689
6699
  className,
6690
6700
  onChange,
6691
6701
  onClear
@@ -6743,7 +6753,8 @@ function SelectInput({
6743
6753
  });
6744
6754
  } : undefined,
6745
6755
  disabled: uiDisabled,
6746
- className: classNames(className, 'np-text-body-large')
6756
+ size,
6757
+ className
6747
6758
  })
6748
6759
  }),
6749
6760
  initialFocusRef: controllerRef,
@@ -6989,7 +7000,7 @@ function SelectInputOptionContent({
6989
7000
  }) {
6990
7001
  const withinTrigger = useContext(SelectInputOptionContentWithinTriggerContext);
6991
7002
  return /*#__PURE__*/jsxs("div", {
6992
- className: "np-select-input-option-content-container np-text-body-large",
7003
+ className: classNames('np-select-input-option-content-container', (note || description) && 'np-text-body-large'),
6993
7004
  children: [icon ? /*#__PURE__*/jsx("div", {
6994
7005
  className: classNames('np-select-input-option-content-icon', !withinTrigger && 'np-select-input-option-content-icon--not-within-trigger'),
6995
7006
  children: icon
@@ -6998,7 +7009,7 @@ function SelectInputOptionContent({
6998
7009
  children: [/*#__PURE__*/jsxs("div", {
6999
7010
  className: classNames('np-select-input-option-content-text-line-1', withinTrigger && 'np-select-input-option-content-text-within-trigger'),
7000
7011
  children: [/*#__PURE__*/jsx("h4", {
7001
- className: "d-inline np-text-body-large",
7012
+ className: "np-select-input-option-content-text-primary d-inline",
7002
7013
  children: title
7003
7014
  }), note ? /*#__PURE__*/jsx("span", {
7004
7015
  className: "np-select-input-option-content-text-secondary np-text-body-default",
@@ -8109,7 +8120,6 @@ function Select({
8109
8120
  type: null,
8110
8121
  priority: null,
8111
8122
  disabled: disabled,
8112
- role: "combobox",
8113
8123
  "aria-controls": listboxId,
8114
8124
  "aria-expanded": open,
8115
8125
  "aria-autocomplete": "none",
@@ -15130,5 +15140,5 @@ const translations = {
15130
15140
  zh
15131
15141
  };
15132
15142
 
15133
- 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$1 as Chevron, Chip, Chips, CircularButton$1 as CircularButton, ControlType, CriticalCommsBanner, DEFAULT_LANG, DEFAULT_LOCALE, DateInput$1 as DateInput, DateLookup$1 as DateLookup, DateMode, Decision$1 as Decision, Presentation as DecisionPresentation, Type as 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$1 as InputWithDisplayFormat, InstructionsList$1 as InstructionsList, LanguageProvider, Layout$1 as 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$1 as 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$1 as Radio, RadioGroup$1 as RadioGroup, RadioOption$1 as RadioOption, SUPPORTED_LANGUAGES, Scroll, SearchInput, Section, Select, SelectInput, SelectInputOptionContent, Sentiment, Size, SlidingPanel$1 as SlidingPanel, SnackbarConsumer, SnackbarContext, SnackbarPortal, SnackbarProvider$1 as SnackbarProvider, Status, StatusIcon, Stepper, Sticky$1 as Sticky, Summary, Switch, SwitchOption, Tabs$1 as Tabs, TextArea, TextareaWithDisplayFormat$1 as TextareaWithDisplayFormat, Theme, Title, Tooltip$1 as Tooltip, Type$1 as Type, Typeahead, Typography, Upload$1 as Upload, UploadInput, UploadStep, Variant, Width, adjustLocale, getCountryFromLocale, getDirectionFromLocale, getLangFromLocale, isBrowser, isServerSide, translations, useDirection, useLayout, useSnackbar };
15143
+ 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$1 as Chevron, Chip, Chips, CircularButton$1 as CircularButton, ControlType, CriticalCommsBanner, DEFAULT_LANG, DEFAULT_LOCALE, DateInput$1 as DateInput, DateLookup$1 as DateLookup, DateMode, Decision$1 as Decision, Presentation as DecisionPresentation, Type as 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$1 as InputWithDisplayFormat, InstructionsList$1 as InstructionsList, LanguageProvider, Layout$1 as 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$1 as 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$1 as Radio, RadioGroup$1 as RadioGroup, RadioOption$1 as RadioOption, SUPPORTED_LANGUAGES, Scroll, SearchInput, Section, Select, SelectInput, SelectInputOptionContent, SelectInputTriggerButton, Sentiment, Size, SlidingPanel$1 as SlidingPanel, SnackbarConsumer, SnackbarContext, SnackbarPortal, SnackbarProvider$1 as SnackbarProvider, Status, StatusIcon, Stepper, Sticky$1 as Sticky, Summary, Switch, SwitchOption, Tabs$1 as Tabs, TextArea, TextareaWithDisplayFormat$1 as TextareaWithDisplayFormat, Theme, Title, Tooltip$1 as Tooltip, Type$1 as Type, Typeahead, Typography, Upload$1 as Upload, UploadInput, UploadStep, Variant, Width, adjustLocale, getCountryFromLocale, getDirectionFromLocale, getLangFromLocale, isBrowser, isServerSide, translations, useDirection, useLayout, useSnackbar };
15134
15144
  //# sourceMappingURL=index.esm.js.map