@transferwise/components 45.22.0 → 45.24.0
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.esm.js +15 -12
- package/build/index.esm.js.map +1 -1
- package/build/index.js +15 -12
- package/build/index.js.map +1 -1
- package/build/main.css +1 -1
- package/build/styles/header/Header.css +1 -1
- package/build/styles/main.css +1 -1
- package/build/styles/nudge/Nudge.css +1 -1
- package/build/types/header/Header.d.ts +1 -1
- package/build/types/header/Header.d.ts.map +1 -1
- package/build/types/nudge/Nudge.d.ts +3 -10
- package/build/types/nudge/Nudge.d.ts.map +1 -1
- package/build/types/title/Title.d.ts +1 -1
- package/build/types/title/Title.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/header/Header.css +1 -1
- package/src/header/Header.less +5 -0
- package/src/header/Header.tsx +21 -2
- package/src/main.css +1 -1
- package/src/nudge/Nudge.css +1 -1
- package/src/nudge/Nudge.less +18 -22
- package/src/nudge/Nudge.spec.tsx +0 -18
- package/src/nudge/Nudge.story.tsx +31 -0
- package/src/nudge/Nudge.tsx +28 -36
- package/src/title/Title.tsx +1 -1
package/build/index.js
CHANGED
|
@@ -5885,6 +5885,18 @@ const Header = ({
|
|
|
5885
5885
|
title,
|
|
5886
5886
|
className
|
|
5887
5887
|
}) => {
|
|
5888
|
+
if (!action) {
|
|
5889
|
+
return /*#__PURE__*/jsxRuntime.jsx(Title, {
|
|
5890
|
+
as: as,
|
|
5891
|
+
type: exports.Typography.TITLE_GROUP,
|
|
5892
|
+
className: classNames__default.default('np-header', 'np-header__title', className),
|
|
5893
|
+
children: title
|
|
5894
|
+
});
|
|
5895
|
+
}
|
|
5896
|
+
if (as === 'legend') {
|
|
5897
|
+
// eslint-disable-next-line no-console
|
|
5898
|
+
console.warn('Legends should be the first child in a fieldset, and this is not possible when including an action');
|
|
5899
|
+
}
|
|
5888
5900
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
5889
5901
|
className: classNames__default.default('np-header', className),
|
|
5890
5902
|
children: [/*#__PURE__*/jsxRuntime.jsx(Title, {
|
|
@@ -5892,7 +5904,7 @@ const Header = ({
|
|
|
5892
5904
|
type: exports.Typography.TITLE_GROUP,
|
|
5893
5905
|
className: "np-header__title",
|
|
5894
5906
|
children: title
|
|
5895
|
-
}),
|
|
5907
|
+
}), /*#__PURE__*/jsxRuntime.jsx(HeaderAction, {
|
|
5896
5908
|
action: action
|
|
5897
5909
|
})]
|
|
5898
5910
|
});
|
|
@@ -8765,9 +8777,6 @@ const Nudge = ({
|
|
|
8765
8777
|
id,
|
|
8766
8778
|
className
|
|
8767
8779
|
}) => {
|
|
8768
|
-
const {
|
|
8769
|
-
isModern
|
|
8770
|
-
} = componentsTheming.useTheme();
|
|
8771
8780
|
const [isDismissed, setIsDismissed] = React.useState(false);
|
|
8772
8781
|
const [isMounted, setIsMounted] = React.useState(false);
|
|
8773
8782
|
const handleOnDismiss = () => {
|
|
@@ -8804,7 +8813,7 @@ const Nudge = ({
|
|
|
8804
8813
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
8805
8814
|
className: classNames__default.default('wds-nudge', className),
|
|
8806
8815
|
id: id,
|
|
8807
|
-
children: [
|
|
8816
|
+
children: [!!mediaName && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
8808
8817
|
className: "wds-nudge-media",
|
|
8809
8818
|
children: /*#__PURE__*/jsxRuntime.jsx(art.Illustration, {
|
|
8810
8819
|
name: mediaName,
|
|
@@ -8813,20 +8822,14 @@ const Nudge = ({
|
|
|
8813
8822
|
disablePadding: true,
|
|
8814
8823
|
alt: ""
|
|
8815
8824
|
})
|
|
8816
|
-
}) : /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
8817
|
-
className: "wds-nudge-media",
|
|
8818
|
-
children: media
|
|
8819
8825
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
8820
8826
|
className: "wds-nudge-container",
|
|
8821
8827
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
8822
8828
|
className: "wds-nudge-content",
|
|
8823
|
-
children: [
|
|
8829
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Body, {
|
|
8824
8830
|
type: exports.Typography.BODY_LARGE,
|
|
8825
8831
|
className: classNames__default.default('wds-nudge-body'),
|
|
8826
8832
|
children: title
|
|
8827
|
-
}) : /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
8828
|
-
className: "wds-nudge-title",
|
|
8829
|
-
children: title
|
|
8830
8833
|
}), link && /*#__PURE__*/jsxRuntime.jsx(Link, {
|
|
8831
8834
|
href: href,
|
|
8832
8835
|
type: exports.Typography.LINK_LARGE,
|