@transferwise/components 46.0.3 → 46.0.5

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.
@@ -4,8 +4,10 @@
4
4
  "neptune.ClearButton.ariaLabel": "Clear",
5
5
  "neptune.CloseButton.ariaLabel": "Close",
6
6
  "neptune.DateInput.day.label": "Day",
7
+ "neptune.DateInput.day.placeholder": "DD",
7
8
  "neptune.DateInput.month.label": "Month",
8
9
  "neptune.DateInput.year.label": "Year",
10
+ "neptune.DateInput.year.placeholder": "YYYY",
9
11
  "neptune.DateLookup.day": "day",
10
12
  "neptune.DateLookup.goTo20YearView": "Go to 20 year view",
11
13
  "neptune.DateLookup.month": "month",
@@ -2839,6 +2839,12 @@ var messages$8 = defineMessages({
2839
2839
  },
2840
2840
  yearLabel: {
2841
2841
  id: "neptune.DateInput.year.label"
2842
+ },
2843
+ dayPlaceholder: {
2844
+ id: "neptune.DateInput.day.placeholder"
2845
+ },
2846
+ yearPlaceholder: {
2847
+ id: "neptune.DateInput.year.placeholder"
2842
2848
  }
2843
2849
  });
2844
2850
 
@@ -2914,9 +2920,9 @@ const DateInput = ({
2914
2920
  monthLabel = monthLabel || formatMessage(messages$8.monthLabel);
2915
2921
  yearLabel = yearLabel || formatMessage(messages$8.yearLabel);
2916
2922
  placeholders = {
2917
- day: placeholders?.day || 'DD',
2923
+ day: placeholders?.day || formatMessage(messages$8.dayPlaceholder),
2918
2924
  month: placeholders?.month || formatMessage(messages$8.monthLabel),
2919
- year: placeholders?.year || 'YYYY'
2925
+ year: placeholders?.year || formatMessage(messages$8.yearPlaceholder)
2920
2926
  };
2921
2927
  const getDateAsString = date => {
2922
2928
  if (!isDateValid(date)) {
@@ -7856,7 +7862,6 @@ class MoneyInput extends Component {
7856
7862
  this.formatMessage = this.props.intl.formatMessage;
7857
7863
  this.state = {
7858
7864
  searchQuery: '',
7859
- selectedOption: this.props.selectedCurrency,
7860
7865
  formattedAmount: formatAmountIfSet(props.amount, props.selectedCurrency.currency, locale, props.maxLengthOverride),
7861
7866
  locale
7862
7867
  };
@@ -7963,9 +7968,6 @@ class MoneyInput extends Component {
7963
7968
  }
7964
7969
  handleSelectChange = value => {
7965
7970
  this.handleSearchChange('');
7966
- this.setState({
7967
- selectedOption: value
7968
- });
7969
7971
  this.props.onCurrencyChange(value);
7970
7972
  };
7971
7973
  handleCustomAction = () => {
@@ -8054,7 +8056,7 @@ class MoneyInput extends Component {
8054
8056
  className: classNames(this.style('input-group-btn'), this.style('amount-currency-select-btn')),
8055
8057
  children: /*#__PURE__*/jsx(SelectInput, {
8056
8058
  items: selectOptions,
8057
- value: this.state.selectedOption,
8059
+ value: selectedCurrency,
8058
8060
  compareValues: "currency",
8059
8061
  renderValue: (currency, withinTrigger) => {
8060
8062
  return /*#__PURE__*/jsx(SelectInputOptionContent, {
@@ -10195,8 +10197,10 @@ var en = {
10195
10197
  "neptune.ClearButton.ariaLabel": "Clear",
10196
10198
  "neptune.CloseButton.ariaLabel": "Close",
10197
10199
  "neptune.DateInput.day.label": "Day",
10200
+ "neptune.DateInput.day.placeholder": "DD",
10198
10201
  "neptune.DateInput.month.label": "Month",
10199
10202
  "neptune.DateInput.year.label": "Year",
10203
+ "neptune.DateInput.year.placeholder": "YYYY",
10200
10204
  "neptune.DateLookup.day": "day",
10201
10205
  "neptune.DateLookup.goTo20YearView": "Go to 20 year view",
10202
10206
  "neptune.DateLookup.month": "month",