@transferwise/components 0.0.0-experimental-58573b9 → 0.0.0-experimental-f4a3384

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.
@@ -3512,7 +3512,11 @@ const TableLink = ({
3512
3512
  children: /*#__PURE__*/jsx("button", {
3513
3513
  ref: buttonRef,
3514
3514
  type: "button",
3515
- className: `tw-date-lookup-${type}-option ${active ? 'active' : ''} ${today ? 'today' : ''} np-text-body-default-bold`,
3515
+ className: classNames(`tw-date-lookup-${type}-option`, 'np-text-body-default-bold', {
3516
+ active: !!active
3517
+ }, {
3518
+ today: !!today
3519
+ }),
3516
3520
  disabled: disabled,
3517
3521
  "aria-label": calculateAriaLabel(),
3518
3522
  "aria-pressed": active,
@@ -3769,18 +3773,16 @@ const MonthCalendarTable = ({
3769
3773
  const {
3770
3774
  locale
3771
3775
  } = useIntl();
3772
- const getLink = month => {
3773
- return /*#__PURE__*/jsx(TableLink$1, {
3774
- item: month,
3775
- type: "month",
3776
- title: formatDate(new Date(viewYear, month), locale, MONTH_ONLY_FORMAT),
3777
- active: !!(selectedDate && month === selectedDate.getMonth() && viewYear === selectedDate.getFullYear()),
3778
- disabled: isDisabled(month),
3779
- today: viewYear === new Date().getFullYear() && month === new Date().getMonth(),
3780
- autofocus: autofocusMonth === month,
3781
- onClick: onSelect
3782
- });
3783
- };
3776
+ const getLink = month => /*#__PURE__*/jsx(TableLink$1, {
3777
+ item: month,
3778
+ type: "month",
3779
+ title: formatDate(new Date(viewYear, month), locale, MONTH_ONLY_FORMAT),
3780
+ active: !!(selectedDate && month === selectedDate.getMonth() && viewYear === selectedDate.getFullYear()),
3781
+ autofocus: autofocusMonth === month,
3782
+ disabled: isDisabled(month),
3783
+ today: viewYear === new Date().getFullYear() && month === new Date().getMonth(),
3784
+ onClick: onSelect
3785
+ });
3784
3786
  const isDisabled = month => {
3785
3787
  const date = new Date(viewYear, month);
3786
3788
  return !!(min && date < new Date(min.getFullYear(), min.getMonth()) || max && date > new Date(max.getFullYear(), max.getMonth()));
@@ -3920,18 +3922,16 @@ const YearCalendarTable = ({
3920
3922
  locale
3921
3923
  } = useIntl();
3922
3924
  const startYear = viewYear - viewYear % 20;
3923
- const getLink = year => {
3924
- return /*#__PURE__*/jsx(TableLink$1, {
3925
- item: year,
3926
- type: "year",
3927
- title: formatDate(new Date(year, 0), locale, YEAR_ONLY_FORMAT),
3928
- active: !!(selectedDate && year === selectedDate.getFullYear()),
3929
- disabled: isDisabled(year),
3930
- today: year === new Date().getFullYear(),
3931
- autofocus: autofocusYear === year,
3932
- onClick: onSelect
3933
- });
3934
- };
3925
+ const getLink = year => /*#__PURE__*/jsx(TableLink$1, {
3926
+ item: year,
3927
+ type: "year",
3928
+ title: formatDate(new Date(year, 0), locale, YEAR_ONLY_FORMAT),
3929
+ active: !!(selectedDate && year === selectedDate.getFullYear()),
3930
+ disabled: isDisabled(year),
3931
+ today: year === new Date().getFullYear(),
3932
+ autofocus: autofocusYear === year,
3933
+ onClick: onSelect
3934
+ });
3935
3935
  const isDisabled = year => {
3936
3936
  return !!(min && year < min.getFullYear() || max && year > max.getFullYear());
3937
3937
  };