@transferwise/components 45.26.1 → 45.26.3
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/i18n/en.json +1 -0
- package/build/index.esm.js +39 -27
- package/build/index.esm.js.map +1 -1
- package/build/index.js +39 -27
- package/build/index.js.map +1 -1
- package/build/main.css +1 -1
- package/build/styles/main.css +1 -1
- package/build/styles/typeahead/typeaheadOption/TypeaheadOption.css +1 -1
- package/build/types/flowNavigation/FlowNavigation.d.ts.map +1 -1
- package/build/types/info/Info.d.ts +1 -1
- package/build/types/info/Info.d.ts.map +1 -1
- package/build/types/info/Info.messages.d.ts +8 -0
- package/build/types/info/Info.messages.d.ts.map +1 -0
- package/build/types/summary/Summary.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/flowNavigation/FlowNavigation.tsx +12 -2
- package/src/flowNavigation/__snapshots__/FlowNavigation.spec.js.snap +12 -8
- package/src/i18n/en.json +1 -0
- package/src/info/Info.messages.ts +8 -0
- package/src/info/Info.spec.js +10 -4
- package/src/info/Info.tsx +5 -2
- package/src/main.css +1 -1
- package/src/popover/Popover.js +1 -1
- package/src/popover/__snapshots__/Popover.spec.js.snap +2 -2
- package/src/summary/Summary.tsx +0 -1
- package/src/typeahead/Typeahead.story.js +6 -0
- package/src/typeahead/typeaheadOption/TypeaheadOption.css +1 -1
- package/src/typeahead/typeaheadOption/TypeaheadOption.js +1 -1
- package/src/typeahead/typeaheadOption/TypeaheadOption.less +2 -1
package/build/index.js
CHANGED
|
@@ -834,7 +834,7 @@ const ActionOption = ({
|
|
|
834
834
|
});
|
|
835
835
|
};
|
|
836
836
|
|
|
837
|
-
var messages$
|
|
837
|
+
var messages$c = reactIntl.defineMessages({
|
|
838
838
|
ariaLabel: {
|
|
839
839
|
id: "neptune.CloseButton.ariaLabel"
|
|
840
840
|
}
|
|
@@ -850,7 +850,7 @@ const CloseButton = /*#__PURE__*/React.forwardRef(function CloseButton({
|
|
|
850
850
|
testId
|
|
851
851
|
}, reference) {
|
|
852
852
|
const intl = reactIntl.useIntl();
|
|
853
|
-
ariaLabel ??= intl.formatMessage(messages$
|
|
853
|
+
ariaLabel ??= intl.formatMessage(messages$c.ariaLabel);
|
|
854
854
|
const Icon = filled ? icons.CrossCircleFill : icons.Cross;
|
|
855
855
|
return /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
856
856
|
ref: reference,
|
|
@@ -870,7 +870,7 @@ const CloseButton = /*#__PURE__*/React.forwardRef(function CloseButton({
|
|
|
870
870
|
});
|
|
871
871
|
});
|
|
872
872
|
|
|
873
|
-
var messages$
|
|
873
|
+
var messages$b = reactIntl.defineMessages({
|
|
874
874
|
opensInNewTab: {
|
|
875
875
|
id: "neptune.Link.opensInNewTab"
|
|
876
876
|
}
|
|
@@ -899,7 +899,7 @@ const Link = ({
|
|
|
899
899
|
onClick: onClick,
|
|
900
900
|
...props,
|
|
901
901
|
children: [children, " ", isBlank && /*#__PURE__*/jsxRuntime.jsx(icons.NavigateAway, {
|
|
902
|
-
title: formatMessage(messages$
|
|
902
|
+
title: formatMessage(messages$b.opensInNewTab)
|
|
903
903
|
})]
|
|
904
904
|
});
|
|
905
905
|
};
|
|
@@ -2346,7 +2346,7 @@ ProcessIndicator.defaultProps = {
|
|
|
2346
2346
|
};
|
|
2347
2347
|
var ProcessIndicator$1 = ProcessIndicator;
|
|
2348
2348
|
|
|
2349
|
-
var messages$
|
|
2349
|
+
var messages$a = reactIntl.defineMessages({
|
|
2350
2350
|
loadingAriaLabel: {
|
|
2351
2351
|
id: "neptune.Button.loadingAriaLabel"
|
|
2352
2352
|
}
|
|
@@ -2465,7 +2465,7 @@ const Button = /*#__PURE__*/React.forwardRef(({
|
|
|
2465
2465
|
className: classes,
|
|
2466
2466
|
...props,
|
|
2467
2467
|
"aria-live": loading ? 'polite' : 'off',
|
|
2468
|
-
"aria-label": loading ? intl.formatMessage(messages$
|
|
2468
|
+
"aria-label": loading ? intl.formatMessage(messages$a.loadingAriaLabel) : rest['aria-label'],
|
|
2469
2469
|
children: [children, loading && /*#__PURE__*/jsxRuntime.jsx(ProcessIndicator$1, {
|
|
2470
2470
|
size: processIndicatorSize(),
|
|
2471
2471
|
className: "btn-loader"
|
|
@@ -2758,7 +2758,7 @@ const Chip = ({
|
|
|
2758
2758
|
}, value);
|
|
2759
2759
|
};
|
|
2760
2760
|
|
|
2761
|
-
var messages$
|
|
2761
|
+
var messages$9 = reactIntl.defineMessages({
|
|
2762
2762
|
ariaLabel: {
|
|
2763
2763
|
id: "neptune.Chips.ariaLabel"
|
|
2764
2764
|
}
|
|
@@ -2790,7 +2790,7 @@ const Chips = ({
|
|
|
2790
2790
|
value: chip.value,
|
|
2791
2791
|
label: chip.label,
|
|
2792
2792
|
closeButton: {
|
|
2793
|
-
'aria-label': intl.formatMessage(messages$
|
|
2793
|
+
'aria-label': intl.formatMessage(messages$9.ariaLabel, {
|
|
2794
2794
|
choice: chip.label
|
|
2795
2795
|
})
|
|
2796
2796
|
},
|
|
@@ -2898,7 +2898,7 @@ const validDateObject = dateObject => dateObject instanceof Date && !isNaN(dateO
|
|
|
2898
2898
|
|
|
2899
2899
|
const isMonthAndYearFormat = dateString => validDateString(dateString) && dateString.split('-').length < 3;
|
|
2900
2900
|
|
|
2901
|
-
var messages$
|
|
2901
|
+
var messages$8 = reactIntl.defineMessages({
|
|
2902
2902
|
monthLabel: {
|
|
2903
2903
|
id: "neptune.DateInput.month.label"
|
|
2904
2904
|
},
|
|
@@ -2978,12 +2978,12 @@ const DateInput = ({
|
|
|
2978
2978
|
const [month, setMonth] = React.useState(() => getExplodedDate('month'));
|
|
2979
2979
|
const [year, setYear] = React.useState(() => getExplodedDate('year'));
|
|
2980
2980
|
const [lastBroadcastedValue, setLastBroadcastedValue] = React.useState(getDateObject);
|
|
2981
|
-
dayLabel = dayLabel || formatMessage(messages$
|
|
2982
|
-
monthLabel = monthLabel || formatMessage(messages$
|
|
2983
|
-
yearLabel = yearLabel || formatMessage(messages$
|
|
2981
|
+
dayLabel = dayLabel || formatMessage(messages$8.dayLabel);
|
|
2982
|
+
monthLabel = monthLabel || formatMessage(messages$8.monthLabel);
|
|
2983
|
+
yearLabel = yearLabel || formatMessage(messages$8.yearLabel);
|
|
2984
2984
|
placeholders = {
|
|
2985
2985
|
day: placeholders?.day || 'DD',
|
|
2986
|
-
month: placeholders?.month || formatMessage(messages$
|
|
2986
|
+
month: placeholders?.month || formatMessage(messages$8.monthLabel),
|
|
2987
2987
|
year: placeholders?.year || 'YYYY'
|
|
2988
2988
|
};
|
|
2989
2989
|
const getDateAsString = date => {
|
|
@@ -3516,7 +3516,7 @@ DateTrigger.defaultProps = {
|
|
|
3516
3516
|
};
|
|
3517
3517
|
var DateTrigger$1 = DateTrigger;
|
|
3518
3518
|
|
|
3519
|
-
var messages$
|
|
3519
|
+
var messages$7 = reactIntl.defineMessages({
|
|
3520
3520
|
next: {
|
|
3521
3521
|
id: "neptune.DateLookup.next"
|
|
3522
3522
|
},
|
|
@@ -3562,7 +3562,7 @@ const DateHeader = ({
|
|
|
3562
3562
|
children: /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
3563
3563
|
type: "button",
|
|
3564
3564
|
className: `d-inline-flex ${buttonClasses}`,
|
|
3565
|
-
"aria-label": `${intl.formatMessage(messages$
|
|
3565
|
+
"aria-label": `${intl.formatMessage(messages$7.previous)} ${dateMode}`,
|
|
3566
3566
|
onClick: onPreviousClick,
|
|
3567
3567
|
children: /*#__PURE__*/jsxRuntime.jsx(Chevron$1, {
|
|
3568
3568
|
orientation: exports.Position.LEFT,
|
|
@@ -3576,7 +3576,7 @@ const DateHeader = ({
|
|
|
3576
3576
|
children: /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
3577
3577
|
type: "button",
|
|
3578
3578
|
className: `tw-date-lookup-header-current ${buttonClasses}`,
|
|
3579
|
-
"aria-label": intl.formatMessage(messages$
|
|
3579
|
+
"aria-label": intl.formatMessage(messages$7.goTo20YearView),
|
|
3580
3580
|
onClick: onLabelClick,
|
|
3581
3581
|
children: label
|
|
3582
3582
|
})
|
|
@@ -3585,7 +3585,7 @@ const DateHeader = ({
|
|
|
3585
3585
|
children: /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
3586
3586
|
type: "button",
|
|
3587
3587
|
className: `d-inline-flex ${buttonClasses}`,
|
|
3588
|
-
"aria-label": `${reactIntl.useIntl().formatMessage(messages$
|
|
3588
|
+
"aria-label": `${reactIntl.useIntl().formatMessage(messages$7.next)} ${dateMode}`,
|
|
3589
3589
|
onClick: onNextClick,
|
|
3590
3590
|
children: /*#__PURE__*/jsxRuntime.jsx(Chevron$1, {
|
|
3591
3591
|
orientation: exports.Position.RIGHT,
|
|
@@ -3652,7 +3652,7 @@ const TableLink = ({
|
|
|
3652
3652
|
};
|
|
3653
3653
|
const calculateAriaLabel = () => {
|
|
3654
3654
|
if (active) {
|
|
3655
|
-
return `${longTitle || title || ''}, ${intl.formatMessage(messages$
|
|
3655
|
+
return `${longTitle || title || ''}, ${intl.formatMessage(messages$7.selected)} ${intl.formatMessage(messages$7[type])}`;
|
|
3656
3656
|
}
|
|
3657
3657
|
return longTitle || title;
|
|
3658
3658
|
};
|
|
@@ -3869,7 +3869,7 @@ class DayCalendar extends React.PureComponent {
|
|
|
3869
3869
|
month: monthFormat,
|
|
3870
3870
|
year: 'numeric'
|
|
3871
3871
|
}),
|
|
3872
|
-
dateMode: formatMessage(messages$
|
|
3872
|
+
dateMode: formatMessage(messages$7.month),
|
|
3873
3873
|
onLabelClick: onLabelClick,
|
|
3874
3874
|
onPreviousClick: this.selectPreviousMonth,
|
|
3875
3875
|
onNextClick: this.selectNextMonth
|
|
@@ -4015,7 +4015,7 @@ class MonthCalendar extends React.PureComponent {
|
|
|
4015
4015
|
} = this.props;
|
|
4016
4016
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
4017
4017
|
children: [/*#__PURE__*/jsxRuntime.jsx(DateHeader$1, {
|
|
4018
|
-
dateMode: formatMessage(messages$
|
|
4018
|
+
dateMode: formatMessage(messages$7.year),
|
|
4019
4019
|
label: formatting.formatDate(new Date(viewYear, 0), locale, {
|
|
4020
4020
|
year: 'numeric'
|
|
4021
4021
|
}),
|
|
@@ -4161,7 +4161,7 @@ class YearCalendar extends React.PureComponent {
|
|
|
4161
4161
|
} = this.props;
|
|
4162
4162
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
4163
4163
|
children: [/*#__PURE__*/jsxRuntime.jsx(DateHeader$1, {
|
|
4164
|
-
dateMode: formatMessage(messages$
|
|
4164
|
+
dateMode: formatMessage(messages$7.twentyYears),
|
|
4165
4165
|
onPreviousClick: this.selectPreviousYears,
|
|
4166
4166
|
onNextClick: this.selectNextYears
|
|
4167
4167
|
}), /*#__PURE__*/jsxRuntime.jsx(YearCalendarTable$1, {
|
|
@@ -5813,7 +5813,7 @@ const Stepper = ({
|
|
|
5813
5813
|
});
|
|
5814
5814
|
};
|
|
5815
5815
|
|
|
5816
|
-
var messages$
|
|
5816
|
+
var messages$6 = reactIntl.defineMessages({
|
|
5817
5817
|
back: {
|
|
5818
5818
|
id: "neptune.FlowNavigation.back"
|
|
5819
5819
|
}
|
|
@@ -5905,16 +5905,19 @@ const FlowNavigation = ({
|
|
|
5905
5905
|
}),
|
|
5906
5906
|
leftContent: /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
5907
5907
|
children: [isSmall && displayGoBack ? /*#__PURE__*/jsxRuntime.jsx(BackButton$1, {
|
|
5908
|
-
"aria-label": intl.formatMessage(messages$
|
|
5908
|
+
"aria-label": intl.formatMessage(messages$6.back),
|
|
5909
5909
|
onClick: onGoBack
|
|
5910
|
-
}) :
|
|
5910
|
+
}) : /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
5911
|
+
className: "np-flow-header__left",
|
|
5912
|
+
children: logo
|
|
5913
|
+
}), isSmall && /*#__PURE__*/jsxRuntime.jsx(AnimatedLabel, {
|
|
5911
5914
|
className: "m-x-1",
|
|
5912
5915
|
labels: steps.map(step => step.label),
|
|
5913
5916
|
activeLabel: activeStep
|
|
5914
5917
|
})]
|
|
5915
5918
|
}),
|
|
5916
5919
|
rightContent: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
5917
|
-
className: classNames__default.default('d-flex', 'align-items-center', {
|
|
5920
|
+
className: classNames__default.default('np-flow-header__right', 'd-flex', 'align-items-center', 'justify-content-end', {
|
|
5918
5921
|
'order-2': isLarge
|
|
5919
5922
|
}),
|
|
5920
5923
|
children: [newAvatar, newAvatar && closeButton && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
@@ -6172,7 +6175,7 @@ const Popover$1 = ({
|
|
|
6172
6175
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
6173
6176
|
className: isModern ? 'np-popover__content np-text-default-body' : 'np-popover__content',
|
|
6174
6177
|
"aria-hidden": !open,
|
|
6175
|
-
role: "
|
|
6178
|
+
role: "dialog",
|
|
6176
6179
|
children: [title && /*#__PURE__*/jsxRuntime.jsx(Title, {
|
|
6177
6180
|
type: exports.Typography.TITLE_BODY,
|
|
6178
6181
|
className: "m-b-1",
|
|
@@ -6211,6 +6214,12 @@ const deprecatedPlacements = {
|
|
|
6211
6214
|
};
|
|
6212
6215
|
var Popover$2 = Popover$1;
|
|
6213
6216
|
|
|
6217
|
+
var messages$5 = reactIntl.defineMessages({
|
|
6218
|
+
ariaLabel: {
|
|
6219
|
+
id: "neptune.Info.ariaLabel"
|
|
6220
|
+
}
|
|
6221
|
+
});
|
|
6222
|
+
|
|
6214
6223
|
const Info = ({
|
|
6215
6224
|
className = undefined,
|
|
6216
6225
|
content = undefined,
|
|
@@ -6221,7 +6230,9 @@ const Info = ({
|
|
|
6221
6230
|
'aria-label': ariaLabel,
|
|
6222
6231
|
preferredPlacement = exports.Position.BOTTOM
|
|
6223
6232
|
}) => {
|
|
6233
|
+
const intl = reactIntl.useIntl();
|
|
6224
6234
|
const [open, setOpen] = React.useState(false);
|
|
6235
|
+
ariaLabel ??= intl.formatMessage(messages$5.ariaLabel);
|
|
6225
6236
|
const isModal = presentation === exports.InfoPresentation.MODAL;
|
|
6226
6237
|
const isSmall = size === exports.Size.SMALL;
|
|
6227
6238
|
const buttonProps = {
|
|
@@ -10863,6 +10874,7 @@ var en = {
|
|
|
10863
10874
|
"neptune.DateLookup.twentyYears": "20 years",
|
|
10864
10875
|
"neptune.DateLookup.year": "year",
|
|
10865
10876
|
"neptune.FlowNavigation.back": "back to previous step",
|
|
10877
|
+
"neptune.Info.ariaLabel": "More information",
|
|
10866
10878
|
"neptune.Link.opensInNewTab": "(opens in new tab)",
|
|
10867
10879
|
"neptune.MoneyInput.Select.placeholder": "Select an option...",
|
|
10868
10880
|
"neptune.Select.searchPlaceholder": "Search...",
|
|
@@ -11464,7 +11476,6 @@ const Summary = ({
|
|
|
11464
11476
|
help,
|
|
11465
11477
|
icon,
|
|
11466
11478
|
illustration = null,
|
|
11467
|
-
// @ts-expect-error help is old and deprecated prop
|
|
11468
11479
|
info = help,
|
|
11469
11480
|
status,
|
|
11470
11481
|
title
|
|
@@ -12501,6 +12512,7 @@ const Option = props => {
|
|
|
12501
12512
|
children: /*#__PURE__*/jsxRuntime.jsxs("a", {
|
|
12502
12513
|
className: "dropdown-item",
|
|
12503
12514
|
href: "#",
|
|
12515
|
+
tabIndex: -1,
|
|
12504
12516
|
onClick: onClick,
|
|
12505
12517
|
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
12506
12518
|
children: hightlight(label, query)
|