@transferwise/components 0.0.0-experimental-35d02b6 → 0.0.0-experimental-7025851

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
@@ -3633,12 +3633,10 @@ const TableLink = ({
3633
3633
  disabled,
3634
3634
  today,
3635
3635
  autofocus,
3636
- onClick,
3637
- intl: {
3638
- formatMessage
3639
- }
3636
+ onClick
3640
3637
  }) => {
3641
3638
  const buttonRef = React.useRef(null);
3639
+ const intl = reactIntl.useIntl();
3642
3640
  React.useEffect(() => {
3643
3641
  if (autofocus) {
3644
3642
  setTimeout(() => {
@@ -3654,7 +3652,7 @@ const TableLink = ({
3654
3652
  };
3655
3653
  const calculateAriaLabel = () => {
3656
3654
  if (active) {
3657
- return `${longTitle || title || ''}, ${formatMessage(messages$6.selected)} ${formatMessage(messages$6[type])}`;
3655
+ return `${longTitle || title || ''}, ${intl.formatMessage(messages$6.selected)} ${intl.formatMessage(messages$6[type])}`;
3658
3656
  }
3659
3657
  return longTitle || title;
3660
3658
  };
@@ -3676,7 +3674,6 @@ const TableLink = ({
3676
3674
  })
3677
3675
  });
3678
3676
  };
3679
- var TableLink$1 = reactIntl.injectIntl(TableLink);
3680
3677
 
3681
3678
  const SHORT_DAY_FORMAT = {
3682
3679
  day: 'numeric'
@@ -3798,7 +3795,7 @@ class DayCalendarTable extends React.PureComponent {
3798
3795
  children: weeks.map((week, weekIndex) => /*#__PURE__*/jsxRuntime.jsx("tr", {
3799
3796
  children: week.map((day, dayIndex) => /*#__PURE__*/jsxRuntime.jsx("td", {
3800
3797
  className: dayIndex > 4 ? 'default' : '',
3801
- children: day && /*#__PURE__*/jsxRuntime.jsx(TableLink$1, {
3798
+ children: day && /*#__PURE__*/jsxRuntime.jsx(TableLink, {
3802
3799
  item: day,
3803
3800
  type: "day",
3804
3801
  title: formatting.formatDate(new Date(viewYear, viewMonth, day), locale, SHORT_DAY_FORMAT),
@@ -3922,7 +3919,7 @@ const MonthCalendarTable = ({
3922
3919
  locale
3923
3920
  } = reactIntl.useIntl();
3924
3921
  const getLink = month => {
3925
- return /*#__PURE__*/jsxRuntime.jsx(TableLink$1, {
3922
+ return /*#__PURE__*/jsxRuntime.jsx(TableLink, {
3926
3923
  item: month,
3927
3924
  type: "month",
3928
3925
  title: formatting.formatDate(new Date(viewYear, month), locale, MONTH_ONLY_FORMAT),
@@ -4071,7 +4068,7 @@ const YearCalendarTable = ({
4071
4068
  } = reactIntl.useIntl();
4072
4069
  const startYear = viewYear - viewYear % 20;
4073
4070
  const getLink = year => {
4074
- return /*#__PURE__*/jsxRuntime.jsx(TableLink$1, {
4071
+ return /*#__PURE__*/jsxRuntime.jsx(TableLink, {
4075
4072
  item: year,
4076
4073
  type: "year",
4077
4074
  title: formatting.formatDate(new Date(year, 0), locale, YEAR_ONLY_FORMAT),