@transferwise/components 0.0.0-experimental-33d55db → 0.0.0-experimental-a64b578

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
@@ -796,7 +796,7 @@ const ActionOption = ({
796
796
  });
797
797
  };
798
798
 
799
- var messages$9 = reactIntl.defineMessages({
799
+ var messages$a = reactIntl.defineMessages({
800
800
  ariaLabel: {
801
801
  id: "neptune.CloseButton.ariaLabel"
802
802
  }
@@ -812,7 +812,7 @@ const CloseButton = /*#__PURE__*/React.forwardRef(function CloseButton({
812
812
  testId
813
813
  }, reference) {
814
814
  const intl = reactIntl.useIntl();
815
- ariaLabel ??= intl.formatMessage(messages$9.ariaLabel);
815
+ ariaLabel ??= intl.formatMessage(messages$a.ariaLabel);
816
816
  const Icon = filled ? icons.CrossCircleFill : icons.Cross;
817
817
  return /*#__PURE__*/jsxRuntime.jsx("button", {
818
818
  ref: reference,
@@ -832,7 +832,7 @@ const CloseButton = /*#__PURE__*/React.forwardRef(function CloseButton({
832
832
  });
833
833
  });
834
834
 
835
- var messages$8 = reactIntl.defineMessages({
835
+ var messages$9 = reactIntl.defineMessages({
836
836
  opensInNewTab: {
837
837
  id: "neptune.Link.opensInNewTab"
838
838
  }
@@ -861,7 +861,7 @@ const Link = ({
861
861
  onClick: onClick,
862
862
  ...props,
863
863
  children: [children, " ", isBlank && /*#__PURE__*/jsxRuntime.jsx(icons.NavigateAway, {
864
- title: formatMessage(messages$8.opensInNewTab)
864
+ title: formatMessage(messages$9.opensInNewTab)
865
865
  })]
866
866
  });
867
867
  };
@@ -2101,6 +2101,12 @@ const BottomSheet$1 = props => {
2101
2101
  };
2102
2102
  var BottomSheet$2 = BottomSheet$1;
2103
2103
 
2104
+ var messages$8 = reactIntl.defineMessages({
2105
+ loadingAriaLabel: {
2106
+ id: "neptune.Button.loadingAriaLabel"
2107
+ }
2108
+ });
2109
+
2104
2110
  const typeClassMap$1 = {
2105
2111
  [exports.ControlType.ACCENT]: 'btn-accent',
2106
2112
  [exports.ControlType.POSITIVE]: 'btn-positive',
@@ -2167,6 +2173,7 @@ const Button = /*#__PURE__*/React.forwardRef(({
2167
2173
  type = exports.ControlType.ACCENT,
2168
2174
  ...rest
2169
2175
  }, reference) => {
2176
+ const intl = reactIntl.useIntl();
2170
2177
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
2171
2178
  logDeprecationNotices({
2172
2179
  size,
@@ -2209,6 +2216,8 @@ const Button = /*#__PURE__*/React.forwardRef(({
2209
2216
  ref: reference,
2210
2217
  className: classes,
2211
2218
  ...props,
2219
+ "aria-live": loading ? 'polite' : 'off',
2220
+ "aria-label": loading ? intl.formatMessage(messages$8.loadingAriaLabel) : undefined,
2212
2221
  children: [children, loading && /*#__PURE__*/jsxRuntime.jsx("span", {
2213
2222
  className: classNames__default.default('btn-loader', {
2214
2223
  'm-l-2': !block
@@ -10643,6 +10652,7 @@ const LanguageProvider = ({
10643
10652
  };
10644
10653
 
10645
10654
  var en = {
10655
+ "neptune.Button.loadingAriaLabel": "loading",
10646
10656
  "neptune.Chips.ariaLabel": "Clear {choice}",
10647
10657
  "neptune.ClearButton.ariaLabel": "Clear",
10648
10658
  "neptune.CloseButton.ariaLabel": "Close",