@transferwise/components 0.0.0-experimental-fdcd4f0 → 0.0.0-experimental-3f14884
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 +18 -3
- package/build/index.esm.js.map +1 -1
- package/build/index.js +18 -3
- package/build/index.js.map +1 -1
- package/build/types/link/Link.d.ts.map +1 -1
- package/build/types/link/Link.messages.d.ts +8 -0
- package/build/types/link/Link.messages.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/i18n/en.json +1 -0
- package/src/link/Link.messages.ts +8 -0
- package/src/link/Link.tsx +12 -2
package/build/index.js
CHANGED
|
@@ -792,7 +792,7 @@ const ActionOption = ({
|
|
|
792
792
|
});
|
|
793
793
|
};
|
|
794
794
|
|
|
795
|
-
var messages$
|
|
795
|
+
var messages$8 = reactIntl.defineMessages({
|
|
796
796
|
ariaLabel: {
|
|
797
797
|
id: "neptune.CloseButton.ariaLabel"
|
|
798
798
|
}
|
|
@@ -808,7 +808,7 @@ const CloseButton = /*#__PURE__*/React.forwardRef(function CloseButton({
|
|
|
808
808
|
testId
|
|
809
809
|
}, reference) {
|
|
810
810
|
const intl = reactIntl.useIntl();
|
|
811
|
-
ariaLabel ??= intl.formatMessage(messages$
|
|
811
|
+
ariaLabel ??= intl.formatMessage(messages$8.ariaLabel);
|
|
812
812
|
const Icon = filled ? icons.CrossCircleFill : icons.Cross;
|
|
813
813
|
return /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
814
814
|
ref: reference,
|
|
@@ -828,6 +828,12 @@ const CloseButton = /*#__PURE__*/React.forwardRef(function CloseButton({
|
|
|
828
828
|
});
|
|
829
829
|
});
|
|
830
830
|
|
|
831
|
+
var messages$7 = reactIntl.defineMessages({
|
|
832
|
+
opensInNewTab: {
|
|
833
|
+
id: "neptune.Link.opensInNewTab"
|
|
834
|
+
}
|
|
835
|
+
});
|
|
836
|
+
|
|
831
837
|
const Link = ({
|
|
832
838
|
className,
|
|
833
839
|
children,
|
|
@@ -839,6 +845,9 @@ const Link = ({
|
|
|
839
845
|
...props
|
|
840
846
|
}) => {
|
|
841
847
|
const isBlank = target === '_blank';
|
|
848
|
+
const {
|
|
849
|
+
formatMessage
|
|
850
|
+
} = reactIntl.useIntl();
|
|
842
851
|
return /*#__PURE__*/jsxRuntime.jsxs("a", {
|
|
843
852
|
href: href,
|
|
844
853
|
target: target,
|
|
@@ -847,7 +856,12 @@ const Link = ({
|
|
|
847
856
|
rel: isBlank ? 'noreferrer' : undefined,
|
|
848
857
|
onClick: onClick,
|
|
849
858
|
...props,
|
|
850
|
-
children: [children, isBlank && /*#__PURE__*/jsxRuntime.
|
|
859
|
+
children: [children, ' ', isBlank && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
860
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
861
|
+
className: "sr-only",
|
|
862
|
+
children: formatMessage(messages$7.opensInNewTab)
|
|
863
|
+
}), /*#__PURE__*/jsxRuntime.jsx(icons.NavigateAway, {})]
|
|
864
|
+
})]
|
|
851
865
|
});
|
|
852
866
|
};
|
|
853
867
|
|
|
@@ -9960,6 +9974,7 @@ var en = {
|
|
|
9960
9974
|
"neptune.DateInput.day.label": "Day",
|
|
9961
9975
|
"neptune.DateInput.month.label": "Month",
|
|
9962
9976
|
"neptune.DateInput.year.label": "Year",
|
|
9977
|
+
"neptune.Link.opensInNewTab": "(opens in new tab)",
|
|
9963
9978
|
"neptune.MoneyInput.Select.placeholder": "Select an option...",
|
|
9964
9979
|
"neptune.Select.searchPlaceholder": "Search...",
|
|
9965
9980
|
"neptune.Summary.statusDone": "Item done",
|