@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.
package/build/index.js CHANGED
@@ -2873,6 +2873,12 @@ var messages$8 = reactIntl.defineMessages({
2873
2873
  },
2874
2874
  yearLabel: {
2875
2875
  id: "neptune.DateInput.year.label"
2876
+ },
2877
+ dayPlaceholder: {
2878
+ id: "neptune.DateInput.day.placeholder"
2879
+ },
2880
+ yearPlaceholder: {
2881
+ id: "neptune.DateInput.year.placeholder"
2876
2882
  }
2877
2883
  });
2878
2884
 
@@ -2948,9 +2954,9 @@ const DateInput = ({
2948
2954
  monthLabel = monthLabel || formatMessage(messages$8.monthLabel);
2949
2955
  yearLabel = yearLabel || formatMessage(messages$8.yearLabel);
2950
2956
  placeholders = {
2951
- day: placeholders?.day || 'DD',
2957
+ day: placeholders?.day || formatMessage(messages$8.dayPlaceholder),
2952
2958
  month: placeholders?.month || formatMessage(messages$8.monthLabel),
2953
- year: placeholders?.year || 'YYYY'
2959
+ year: placeholders?.year || formatMessage(messages$8.yearPlaceholder)
2954
2960
  };
2955
2961
  const getDateAsString = date => {
2956
2962
  if (!isDateValid(date)) {
@@ -7890,7 +7896,6 @@ class MoneyInput extends React.Component {
7890
7896
  this.formatMessage = this.props.intl.formatMessage;
7891
7897
  this.state = {
7892
7898
  searchQuery: '',
7893
- selectedOption: this.props.selectedCurrency,
7894
7899
  formattedAmount: formatAmountIfSet(props.amount, props.selectedCurrency.currency, locale, props.maxLengthOverride),
7895
7900
  locale
7896
7901
  };
@@ -7997,9 +8002,6 @@ class MoneyInput extends React.Component {
7997
8002
  }
7998
8003
  handleSelectChange = value => {
7999
8004
  this.handleSearchChange('');
8000
- this.setState({
8001
- selectedOption: value
8002
- });
8003
8005
  this.props.onCurrencyChange(value);
8004
8006
  };
8005
8007
  handleCustomAction = () => {
@@ -8088,7 +8090,7 @@ class MoneyInput extends React.Component {
8088
8090
  className: classNames__default.default(this.style('input-group-btn'), this.style('amount-currency-select-btn')),
8089
8091
  children: /*#__PURE__*/jsxRuntime.jsx(SelectInput, {
8090
8092
  items: selectOptions,
8091
- value: this.state.selectedOption,
8093
+ value: selectedCurrency,
8092
8094
  compareValues: "currency",
8093
8095
  renderValue: (currency, withinTrigger) => {
8094
8096
  return /*#__PURE__*/jsxRuntime.jsx(SelectInputOptionContent, {
@@ -10229,8 +10231,10 @@ var en = {
10229
10231
  "neptune.ClearButton.ariaLabel": "Clear",
10230
10232
  "neptune.CloseButton.ariaLabel": "Close",
10231
10233
  "neptune.DateInput.day.label": "Day",
10234
+ "neptune.DateInput.day.placeholder": "DD",
10232
10235
  "neptune.DateInput.month.label": "Month",
10233
10236
  "neptune.DateInput.year.label": "Year",
10237
+ "neptune.DateInput.year.placeholder": "YYYY",
10234
10238
  "neptune.DateLookup.day": "day",
10235
10239
  "neptune.DateLookup.goTo20YearView": "Go to 20 year view",
10236
10240
  "neptune.DateLookup.month": "month",