@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.
@@ -1,4 +1,5 @@
1
1
  {
2
+ "neptune.Button.loadingAriaLabel": "loading",
2
3
  "neptune.Chips.ariaLabel": "Clear {choice}",
3
4
  "neptune.ClearButton.ariaLabel": "Clear",
4
5
  "neptune.CloseButton.ariaLabel": "Close",
@@ -763,7 +763,7 @@ const ActionOption = ({
763
763
  });
764
764
  };
765
765
 
766
- var messages$9 = defineMessages({
766
+ var messages$a = defineMessages({
767
767
  ariaLabel: {
768
768
  id: "neptune.CloseButton.ariaLabel"
769
769
  }
@@ -779,7 +779,7 @@ const CloseButton = /*#__PURE__*/forwardRef(function CloseButton({
779
779
  testId
780
780
  }, reference) {
781
781
  const intl = useIntl();
782
- ariaLabel ??= intl.formatMessage(messages$9.ariaLabel);
782
+ ariaLabel ??= intl.formatMessage(messages$a.ariaLabel);
783
783
  const Icon = filled ? CrossCircleFill : Cross;
784
784
  return /*#__PURE__*/jsx("button", {
785
785
  ref: reference,
@@ -799,7 +799,7 @@ const CloseButton = /*#__PURE__*/forwardRef(function CloseButton({
799
799
  });
800
800
  });
801
801
 
802
- var messages$8 = defineMessages({
802
+ var messages$9 = defineMessages({
803
803
  opensInNewTab: {
804
804
  id: "neptune.Link.opensInNewTab"
805
805
  }
@@ -828,7 +828,7 @@ const Link = ({
828
828
  onClick: onClick,
829
829
  ...props,
830
830
  children: [children, " ", isBlank && /*#__PURE__*/jsx(NavigateAway, {
831
- title: formatMessage(messages$8.opensInNewTab)
831
+ title: formatMessage(messages$9.opensInNewTab)
832
832
  })]
833
833
  });
834
834
  };
@@ -2068,6 +2068,12 @@ const BottomSheet$1 = props => {
2068
2068
  };
2069
2069
  var BottomSheet$2 = BottomSheet$1;
2070
2070
 
2071
+ var messages$8 = defineMessages({
2072
+ loadingAriaLabel: {
2073
+ id: "neptune.Button.loadingAriaLabel"
2074
+ }
2075
+ });
2076
+
2071
2077
  const typeClassMap$1 = {
2072
2078
  [ControlType.ACCENT]: 'btn-accent',
2073
2079
  [ControlType.POSITIVE]: 'btn-positive',
@@ -2134,6 +2140,7 @@ const Button = /*#__PURE__*/forwardRef(({
2134
2140
  type = ControlType.ACCENT,
2135
2141
  ...rest
2136
2142
  }, reference) => {
2143
+ const intl = useIntl();
2137
2144
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
2138
2145
  logDeprecationNotices({
2139
2146
  size,
@@ -2176,6 +2183,8 @@ const Button = /*#__PURE__*/forwardRef(({
2176
2183
  ref: reference,
2177
2184
  className: classes,
2178
2185
  ...props,
2186
+ "aria-live": loading ? 'polite' : 'off',
2187
+ "aria-label": loading ? intl.formatMessage(messages$8.loadingAriaLabel) : undefined,
2179
2188
  children: [children, loading && /*#__PURE__*/jsx("span", {
2180
2189
  className: classNames('btn-loader', {
2181
2190
  'm-l-2': !block
@@ -10610,6 +10619,7 @@ const LanguageProvider = ({
10610
10619
  };
10611
10620
 
10612
10621
  var en = {
10622
+ "neptune.Button.loadingAriaLabel": "loading",
10613
10623
  "neptune.Chips.ariaLabel": "Clear {choice}",
10614
10624
  "neptune.ClearButton.ariaLabel": "Clear",
10615
10625
  "neptune.CloseButton.ariaLabel": "Close",