@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.
package/build/index.js CHANGED
@@ -1540,7 +1540,6 @@ const FocusBoundary = ({
1540
1540
  })
1541
1541
  });
1542
1542
  };
1543
- var FocusBoundary$1 = FocusBoundary;
1544
1543
 
1545
1544
  function withNextPortalWrapper(Component) {
1546
1545
  return function (props) {
@@ -1682,7 +1681,7 @@ const Dimmer = ({
1682
1681
  onExited: onExited,
1683
1682
  children: /*#__PURE__*/jsxRuntime.jsx(DimmerContentWrapper, {
1684
1683
  scrollBody: !transparent,
1685
- children: /*#__PURE__*/jsxRuntime.jsx(FocusBoundary$1, {
1684
+ children: /*#__PURE__*/jsxRuntime.jsx(FocusBoundary, {
1686
1685
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
1687
1686
  ref: dimmerReference,
1688
1687
  className: classNames__default.default('dimmer', {
@@ -6296,10 +6295,10 @@ function formControlClassNameBase({
6296
6295
  return classNames__default.default('form-control',
6297
6296
  // TODO: Deprecate
6298
6297
  'np-form-control', {
6299
- 'np-form-control--size-auto np-text-body-large': size === 'auto',
6300
- 'np-form-control--size-sm np-text-body-default': size === 'sm',
6301
- 'np-form-control--size-md np-text-body-large': size === 'md',
6302
- 'np-form-control--size-lg np-text-title-subsection': size === 'lg'
6298
+ 'np-form-control--size-auto': size === 'auto',
6299
+ 'np-form-control--size-sm': size === 'sm',
6300
+ 'np-form-control--size-md': size === 'md',
6301
+ 'np-form-control--size-lg': size === 'lg'
6303
6302
  });
6304
6303
  }
6305
6304
 
@@ -6445,43 +6444,47 @@ function BottomSheet({
6445
6444
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
6446
6445
  className: "np-bottom-sheet-v2-backdrop"
6447
6446
  })
6448
- }), /*#__PURE__*/jsxRuntime.jsx(react.FloatingFocusManager, {
6449
- context: context,
6450
- initialFocus: initialFocusRef,
6451
- children: /*#__PURE__*/jsxRuntime.jsx("div", {
6452
- className: "np-bottom-sheet-v2",
6453
- children: /*#__PURE__*/jsxRuntime.jsx(react$1.Transition.Child, {
6454
- className: "np-bottom-sheet-v2-content",
6455
- enter: "np-bottom-sheet-v2-content--enter",
6456
- enterFrom: "np-bottom-sheet-v2-content--enter-from",
6457
- leave: "np-bottom-sheet-v2-content--leave",
6458
- leaveTo: "np-bottom-sheet-v2-content--leave-to",
6459
- children: /*#__PURE__*/jsxRuntime.jsxs("div", {
6460
- // Force inner state invalidation on open
6461
- ref: refs.setFloating,
6462
- className: "np-bottom-sheet-v2-content-inner-container",
6463
- ...getFloatingProps(),
6464
- children: [/*#__PURE__*/jsxRuntime.jsx("div", {
6465
- className: "np-bottom-sheet-v2-header",
6466
- children: /*#__PURE__*/jsxRuntime.jsx(CloseButton, {
6467
- size: exports.Size.SMALL,
6468
- onClick: () => {
6469
- onClose?.();
6470
- }
6471
- })
6472
- }), /*#__PURE__*/jsxRuntime.jsxs("div", {
6473
- className: classNames__default.default('np-bottom-sheet-v2-content-inner', title && 'np-bottom-sheet-v2-content-inner--has-title', {
6474
- 'np-bottom-sheet-v2-content-inner--padding-md': padding === 'md'
6475
- }),
6476
- children: [title ? /*#__PURE__*/jsxRuntime.jsx("h2", {
6477
- className: "np-bottom-sheet-v2-title np-text-title-body",
6478
- children: title
6479
- }) : null, /*#__PURE__*/jsxRuntime.jsx("div", {
6480
- className: "np-bottom-sheet-v2-body np-text-body-default",
6481
- children: children
6447
+ }), /*#__PURE__*/jsxRuntime.jsx(FocusBoundary, {
6448
+ children: /*#__PURE__*/jsxRuntime.jsx(react.FloatingFocusManager, {
6449
+ context: context,
6450
+ initialFocus: initialFocusRef,
6451
+ guards: false,
6452
+ modal: false,
6453
+ children: /*#__PURE__*/jsxRuntime.jsx("div", {
6454
+ className: "np-bottom-sheet-v2",
6455
+ children: /*#__PURE__*/jsxRuntime.jsx(react$1.Transition.Child, {
6456
+ className: "np-bottom-sheet-v2-content",
6457
+ enter: "np-bottom-sheet-v2-content--enter",
6458
+ enterFrom: "np-bottom-sheet-v2-content--enter-from",
6459
+ leave: "np-bottom-sheet-v2-content--leave",
6460
+ leaveTo: "np-bottom-sheet-v2-content--leave-to",
6461
+ children: /*#__PURE__*/jsxRuntime.jsxs("div", {
6462
+ // Force inner state invalidation on open
6463
+ ref: refs.setFloating,
6464
+ className: "np-bottom-sheet-v2-content-inner-container",
6465
+ ...getFloatingProps(),
6466
+ children: [/*#__PURE__*/jsxRuntime.jsx("div", {
6467
+ className: "np-bottom-sheet-v2-header",
6468
+ children: /*#__PURE__*/jsxRuntime.jsx(CloseButton, {
6469
+ size: exports.Size.SMALL,
6470
+ onClick: () => {
6471
+ onClose?.();
6472
+ }
6473
+ })
6474
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
6475
+ className: classNames__default.default('np-bottom-sheet-v2-content-inner', title && 'np-bottom-sheet-v2-content-inner--has-title', {
6476
+ 'np-bottom-sheet-v2-content-inner--padding-md': padding === 'md'
6477
+ }),
6478
+ children: [title ? /*#__PURE__*/jsxRuntime.jsx("h2", {
6479
+ className: "np-bottom-sheet-v2-title np-text-title-body",
6480
+ children: title
6481
+ }) : null, /*#__PURE__*/jsxRuntime.jsx("div", {
6482
+ className: "np-bottom-sheet-v2-body np-text-body-default",
6483
+ children: children
6484
+ })]
6482
6485
  })]
6483
- })]
6484
- }, floatingKey)
6486
+ }, floatingKey)
6487
+ })
6485
6488
  })
6486
6489
  })
6487
6490
  })]
@@ -6574,36 +6577,40 @@ function Popover({
6574
6577
  theme: theme,
6575
6578
  screenMode: screenMode,
6576
6579
  isNotRootProvider: true,
6577
- children: /*#__PURE__*/jsxRuntime.jsx(react.FloatingFocusManager, {
6578
- context: context,
6579
- children: /*#__PURE__*/jsxRuntime.jsx(react$1.Transition, {
6580
- show: open,
6581
- leave: "transition-opacity",
6582
- leaveTo: "opacity-0",
6583
- beforeEnter: () => {
6584
- setFloatingKey(prev => prev + 1);
6585
- },
6586
- children: /*#__PURE__*/jsxRuntime.jsx("div", {
6587
- // Force inner state invalidation on open
6588
- ref: refs.setFloating,
6589
- className: "np-popover-v2-container"
6590
- // eslint-disable-next-line react/forbid-dom-props
6591
- ,
6592
- style: floatingStyles,
6593
- ...getFloatingProps(),
6594
- children: /*#__PURE__*/jsxRuntime.jsxs("div", {
6595
- className: classNames__default.default('np-popover-v2', title && 'np-popover-v2--has-title', {
6596
- 'np-popover-v2--padding-md': padding === 'md'
6597
- }),
6598
- children: [title ? /*#__PURE__*/jsxRuntime.jsx("h2", {
6599
- className: "np-popover-v2-title np-text-title-body",
6600
- children: title
6601
- }) : null, /*#__PURE__*/jsxRuntime.jsx("div", {
6602
- className: "np-popover-v2-content np-text-body-default",
6603
- children: children
6604
- })]
6605
- })
6606
- }, floatingKey)
6580
+ children: /*#__PURE__*/jsxRuntime.jsx(react$1.Transition, {
6581
+ show: open,
6582
+ leave: "transition-opacity",
6583
+ leaveTo: "opacity-0",
6584
+ beforeEnter: () => {
6585
+ setFloatingKey(prev => prev + 1);
6586
+ },
6587
+ children: /*#__PURE__*/jsxRuntime.jsx(FocusBoundary, {
6588
+ children: /*#__PURE__*/jsxRuntime.jsx(react.FloatingFocusManager, {
6589
+ context: context,
6590
+ guards: false,
6591
+ modal: false,
6592
+ children: /*#__PURE__*/jsxRuntime.jsx("div", {
6593
+ // Force inner state invalidation on open
6594
+ ref: refs.setFloating,
6595
+ className: "np-popover-v2-container"
6596
+ // eslint-disable-next-line react/forbid-dom-props
6597
+ ,
6598
+ style: floatingStyles,
6599
+ ...getFloatingProps(),
6600
+ children: /*#__PURE__*/jsxRuntime.jsxs("div", {
6601
+ className: classNames__default.default('np-popover-v2', title && 'np-popover-v2--has-title', {
6602
+ 'np-popover-v2--padding-md': padding === 'md'
6603
+ }),
6604
+ children: [title ? /*#__PURE__*/jsxRuntime.jsx("h2", {
6605
+ className: "np-popover-v2-title np-text-title-body",
6606
+ children: title
6607
+ }) : null, /*#__PURE__*/jsxRuntime.jsx("div", {
6608
+ className: "np-popover-v2-content np-text-body-default",
6609
+ children: children
6610
+ })]
6611
+ })
6612
+ }, floatingKey)
6613
+ })
6607
6614
  })
6608
6615
  })
6609
6616
  })
@@ -6660,6 +6667,7 @@ const defaultRenderTrigger = ({
6660
6667
  placeholderShown,
6661
6668
  clear,
6662
6669
  disabled,
6670
+ size,
6663
6671
  className
6664
6672
  }) => /*#__PURE__*/jsxRuntime.jsx(InputGroup, {
6665
6673
  addonEnd: {
@@ -6687,6 +6695,7 @@ const defaultRenderTrigger = ({
6687
6695
  className: className,
6688
6696
  children: /*#__PURE__*/jsxRuntime.jsx(SelectInputTriggerButton, {
6689
6697
  as: ButtonInput,
6698
+ size: size,
6690
6699
  children: placeholderShown ? /*#__PURE__*/jsxRuntime.jsxs("span", {
6691
6700
  className: "np-select-input-placeholder",
6692
6701
  children: [" ", content]
@@ -6720,6 +6729,7 @@ function SelectInput({
6720
6729
  filterable,
6721
6730
  filterPlaceholder,
6722
6731
  disabled,
6732
+ size = 'md',
6723
6733
  className,
6724
6734
  onChange,
6725
6735
  onClear
@@ -6777,7 +6787,8 @@ function SelectInput({
6777
6787
  });
6778
6788
  } : undefined,
6779
6789
  disabled: uiDisabled,
6780
- className: classNames__default.default(className, 'np-text-body-large')
6790
+ size,
6791
+ className
6781
6792
  })
6782
6793
  }),
6783
6794
  initialFocusRef: controllerRef,
@@ -7023,7 +7034,7 @@ function SelectInputOptionContent({
7023
7034
  }) {
7024
7035
  const withinTrigger = React.useContext(SelectInputOptionContentWithinTriggerContext);
7025
7036
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
7026
- className: "np-select-input-option-content-container np-text-body-large",
7037
+ className: classNames__default.default('np-select-input-option-content-container', (note || description) && 'np-text-body-large'),
7027
7038
  children: [icon ? /*#__PURE__*/jsxRuntime.jsx("div", {
7028
7039
  className: classNames__default.default('np-select-input-option-content-icon', !withinTrigger && 'np-select-input-option-content-icon--not-within-trigger'),
7029
7040
  children: icon
@@ -7032,7 +7043,7 @@ function SelectInputOptionContent({
7032
7043
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
7033
7044
  className: classNames__default.default('np-select-input-option-content-text-line-1', withinTrigger && 'np-select-input-option-content-text-within-trigger'),
7034
7045
  children: [/*#__PURE__*/jsxRuntime.jsx("h4", {
7035
- className: "d-inline np-text-body-large",
7046
+ className: "np-select-input-option-content-text-primary d-inline",
7036
7047
  children: title
7037
7048
  }), note ? /*#__PURE__*/jsxRuntime.jsx("span", {
7038
7049
  className: "np-select-input-option-content-text-secondary np-text-body-default",
@@ -8143,7 +8154,6 @@ function Select({
8143
8154
  type: null,
8144
8155
  priority: null,
8145
8156
  disabled: disabled,
8146
- role: "combobox",
8147
8157
  "aria-controls": listboxId,
8148
8158
  "aria-expanded": open,
8149
8159
  "aria-autocomplete": "none",
@@ -15238,6 +15248,7 @@ exports.Section = Section;
15238
15248
  exports.Select = Select;
15239
15249
  exports.SelectInput = SelectInput;
15240
15250
  exports.SelectInputOptionContent = SelectInputOptionContent;
15251
+ exports.SelectInputTriggerButton = SelectInputTriggerButton;
15241
15252
  exports.SlidingPanel = SlidingPanel$1;
15242
15253
  exports.SnackbarConsumer = SnackbarConsumer;
15243
15254
  exports.SnackbarContext = SnackbarContext;