@transferwise/components 0.0.0-experimental-ded76ff → 0.0.0-experimental-adfacd1
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 +36 -31
- package/build/index.esm.js.map +1 -1
- package/build/index.js +36 -31
- package/build/index.js.map +1 -1
- package/build/main.css +1 -1
- package/build/styles/flowNavigation/FlowNavigation.css +1 -1
- package/build/styles/flowNavigation/animatedLabel/AnimatedLabel.css +1 -1
- package/build/styles/main.css +1 -1
- package/build/styles/overlayHeader/OverlayHeader.css +1 -1
- package/build/types/common/flowHeader/FlowHeader.d.ts.map +1 -1
- package/build/types/flowNavigation/FlowNavigation.d.ts.map +1 -1
- package/build/types/flowNavigation/animatedLabel/AnimatedLabel.d.ts +1 -2
- package/build/types/flowNavigation/animatedLabel/AnimatedLabel.d.ts.map +1 -1
- package/build/types/flowNavigation/backButton/BackButton.d.ts +10 -11
- package/build/types/flowNavigation/backButton/BackButton.d.ts.map +1 -1
- package/build/types/overlayHeader/OverlayHeader.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/common/flowHeader/FlowHeader.tsx +9 -3
- package/src/common/flowHeader/__snapshots__/FlowHeader.spec.js.snap +2 -2
- package/src/flowNavigation/FlowNavigation.css +1 -1
- package/src/flowNavigation/FlowNavigation.less +0 -9
- package/src/flowNavigation/FlowNavigation.spec.js +3 -3
- package/src/flowNavigation/FlowNavigation.story.js +24 -183
- package/src/flowNavigation/FlowNavigation.tsx +9 -13
- package/src/flowNavigation/__snapshots__/FlowNavigation.spec.js.snap +14 -11
- package/src/flowNavigation/animatedLabel/AnimatedLabel.css +1 -1
- package/src/flowNavigation/animatedLabel/AnimatedLabel.less +0 -6
- package/src/flowNavigation/animatedLabel/AnimatedLabel.spec.js +7 -21
- package/src/flowNavigation/animatedLabel/AnimatedLabel.tsx +8 -17
- package/src/flowNavigation/animatedLabel/__snapshots__/AnimatedLabel.spec.js.snap +4 -4
- package/src/flowNavigation/backButton/BackButton.js +14 -9
- package/src/flowNavigation/backButton/BackButton.spec.js +3 -2
- package/src/flowNavigation/backButton/__snapshots__/BackButton.spec.js.snap +28 -21
- package/src/main.css +1 -1
- package/src/overlayHeader/OverlayHeader.css +1 -1
- package/src/overlayHeader/OverlayHeader.js +4 -2
- package/src/overlayHeader/OverlayHeader.less +0 -8
- package/src/overlayHeader/OverlayHeader.spec.js +1 -1
- package/src/overlayHeader/__snapshots__/OverlayHeader.spec.js.snap +3 -3
package/build/index.js
CHANGED
|
@@ -5432,7 +5432,7 @@ const FlowHeader = /*#__PURE__*/React__namespace.forwardRef(({
|
|
|
5432
5432
|
ref: reference,
|
|
5433
5433
|
className: classNames__default.default('np-flow-header', 'd-flex', 'flex-wrap', 'align-items-center', className),
|
|
5434
5434
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
5435
|
-
className: classNames__default.default('np-flow-header__left', {
|
|
5435
|
+
className: classNames__default.default('np-flow-header__left', 'd-flex', 'align-items-center', 'justify-content-between', {
|
|
5436
5436
|
'flex__item--8': isVertical
|
|
5437
5437
|
}),
|
|
5438
5438
|
children: leftContent
|
|
@@ -5740,19 +5740,16 @@ var messages$5 = reactIntl.defineMessages({
|
|
|
5740
5740
|
const AnimatedLabel = ({
|
|
5741
5741
|
activeLabel,
|
|
5742
5742
|
className,
|
|
5743
|
-
labels
|
|
5744
|
-
'aria-label': ariaLabel
|
|
5743
|
+
labels
|
|
5745
5744
|
}) => {
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
className: classNames__default.default('np-animated-label', 'np-text-body-large-bold', className),
|
|
5745
|
+
return /*#__PURE__*/jsxRuntime.jsx(Body, {
|
|
5746
|
+
type: exports.Typography.BODY_LARGE_BOLD,
|
|
5747
|
+
className: classNames__default.default('np-animated-label', className),
|
|
5750
5748
|
children: labels.map((label, index) => {
|
|
5751
5749
|
const nextLabel = index - 1;
|
|
5752
5750
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
5753
|
-
className: classNames__default.default('text-xs-
|
|
5754
|
-
'np-animated-label--in': index === activeLabel
|
|
5755
|
-
'np-animated-label--out': nextLabel === activeLabel && nextLabel !== numberLabels
|
|
5751
|
+
className: classNames__default.default('text-xs-center', {
|
|
5752
|
+
'np-animated-label--in text-ellipsis': index === activeLabel
|
|
5756
5753
|
}),
|
|
5757
5754
|
children: label
|
|
5758
5755
|
}, nextLabel);
|
|
@@ -5761,18 +5758,24 @@ const AnimatedLabel = ({
|
|
|
5761
5758
|
};
|
|
5762
5759
|
|
|
5763
5760
|
const BackButton = ({
|
|
5764
|
-
label,
|
|
5765
5761
|
className,
|
|
5766
|
-
onClick
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
children:
|
|
5772
|
-
|
|
5773
|
-
|
|
5762
|
+
onClick,
|
|
5763
|
+
'aria-label': ariaLabel
|
|
5764
|
+
}) => /*#__PURE__*/jsxRuntime.jsx(Avatar, {
|
|
5765
|
+
type: exports.AvatarType.ICON,
|
|
5766
|
+
size: 40,
|
|
5767
|
+
children: /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
5768
|
+
type: "button",
|
|
5769
|
+
"aria-label": ariaLabel,
|
|
5770
|
+
className: classNames__default.default('np-back-button', 'btn-unstyled', className),
|
|
5771
|
+
onClick: onClick,
|
|
5772
|
+
children: /*#__PURE__*/jsxRuntime.jsx(icons.ArrowLeft, {
|
|
5773
|
+
size: 24
|
|
5774
|
+
})
|
|
5775
|
+
})
|
|
5774
5776
|
});
|
|
5775
5777
|
BackButton.propTypes = {
|
|
5778
|
+
'aria-label': PropTypes__default.default.string.isRequired,
|
|
5776
5779
|
className: PropTypes__default.default.string,
|
|
5777
5780
|
label: PropTypes__default.default.element,
|
|
5778
5781
|
onClick: PropTypes__default.default.func
|
|
@@ -5805,16 +5808,17 @@ const FlowNavigation = ({
|
|
|
5805
5808
|
const newAvatar = done ? null : avatar;
|
|
5806
5809
|
const getLeftContentSmall = () => {
|
|
5807
5810
|
const displayGoBack = onGoBack != null && activeStep > 0;
|
|
5808
|
-
return /*#__PURE__*/jsxRuntime.
|
|
5809
|
-
children: displayGoBack ? /*#__PURE__*/jsxRuntime.jsx(BackButton$1, {
|
|
5810
|
-
label:
|
|
5811
|
-
className: "m-x-1",
|
|
5812
|
-
labels: steps.map(step => step.label),
|
|
5813
|
-
activeLabel: activeStep - 1,
|
|
5814
|
-
"aria-label": intl.formatMessage(messages$5.back)
|
|
5815
|
-
}),
|
|
5811
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
5812
|
+
children: [displayGoBack ? /*#__PURE__*/jsxRuntime.jsx(BackButton$1, {
|
|
5813
|
+
"aria-label": intl.formatMessage(messages$5.back),
|
|
5816
5814
|
onClick: onGoBack
|
|
5817
|
-
}) : logo
|
|
5815
|
+
}) : logo, /*#__PURE__*/jsxRuntime.jsx(AnimatedLabel, {
|
|
5816
|
+
className: "m-x-1",
|
|
5817
|
+
labels: steps.map(step => step.label),
|
|
5818
|
+
activeLabel: activeStep
|
|
5819
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
5820
|
+
className: "m-x-1"
|
|
5821
|
+
})]
|
|
5818
5822
|
});
|
|
5819
5823
|
};
|
|
5820
5824
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
@@ -5823,7 +5827,7 @@ const FlowNavigation = ({
|
|
|
5823
5827
|
'np-flow-navigation--border-bottom': !done
|
|
5824
5828
|
}),
|
|
5825
5829
|
children: /*#__PURE__*/jsxRuntime.jsx(FlowHeader, {
|
|
5826
|
-
className: classNames__default.default('np-flow-navigation__content p-x-3', {
|
|
5830
|
+
className: classNames__default.default('np-flow-navigation__content', isSmall ? 'p-x-2' : 'p-x-3', {
|
|
5827
5831
|
'np-flow-navigation--hidden': !clientWidth,
|
|
5828
5832
|
'np-flow-navigation--xs-max': isSmall,
|
|
5829
5833
|
// Size switches on parent container which may or may not have the same size as the window.
|
|
@@ -5833,7 +5837,7 @@ const FlowNavigation = ({
|
|
|
5833
5837
|
leftContent: isSmall ? getLeftContentSmall() : logo,
|
|
5834
5838
|
rightContent: /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
5835
5839
|
children: [newAvatar, newAvatar && closeButton && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
5836
|
-
className: "
|
|
5840
|
+
className: "m-x-1"
|
|
5837
5841
|
}), closeButton]
|
|
5838
5842
|
}),
|
|
5839
5843
|
bottomContent: !done && /*#__PURE__*/jsxRuntime.jsx(Stepper, {
|
|
@@ -8846,6 +8850,7 @@ const OverlayHeader = ({
|
|
|
8846
8850
|
logo
|
|
8847
8851
|
}) => {
|
|
8848
8852
|
const closeButton = onClose && /*#__PURE__*/jsxRuntime.jsx(CloseButton, {
|
|
8853
|
+
size: exports.Size.LARGE,
|
|
8849
8854
|
onClick: onClose
|
|
8850
8855
|
});
|
|
8851
8856
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
@@ -8855,7 +8860,7 @@ const OverlayHeader = ({
|
|
|
8855
8860
|
leftContent: logo,
|
|
8856
8861
|
rightContent: /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8857
8862
|
children: [avatar, avatar && closeButton && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
8858
|
-
className:
|
|
8863
|
+
className: classNames__default.default('m-x-1')
|
|
8859
8864
|
}), closeButton]
|
|
8860
8865
|
})
|
|
8861
8866
|
})
|