@wise/dynamic-flow-client-internal 5.13.3 → 5.13.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/main.mjs CHANGED
@@ -120,6 +120,12 @@ import { makeHttpClient } from "@wise/dynamic-flow-client";
120
120
  // src/dynamicFlow/DynamicFlow.tsx
121
121
  import { useDynamicFlow } from "@wise/dynamic-flow-client";
122
122
 
123
+ // src/dynamicFlow/telemetry/app-version.ts
124
+ var appVersion = (
125
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
126
+ typeof process !== "undefined" ? "5.13.5" : "0.0.0"
127
+ );
128
+
123
129
  // src/dynamicFlow/context-menu/useContextMenu.tsx
124
130
  import { useCallback, useEffect, useState } from "react";
125
131
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -172,16 +178,20 @@ var useMenuPosition = () => {
172
178
 
173
179
  // src/dynamicFlow/context-menu/useDFContextMenu.tsx
174
180
  var useDFContextMenu = (controller) => {
181
+ const getCurrentStep = () => {
182
+ const step = controller.getCurrentStep();
183
+ return step ? recursivelyRemoveNullish(step) : null;
184
+ };
175
185
  const getCurrentStepWithModel = async () => {
176
186
  const step = controller.getCurrentStep();
177
187
  if (!step) {
178
188
  return null;
179
189
  }
180
190
  const model = await controller.getSubmittableValue();
181
- return __spreadProps(__spreadValues({}, step), { model });
191
+ return recursivelyRemoveNullish(__spreadProps(__spreadValues({}, step), { model }));
182
192
  };
183
193
  const getEncodedCurrentStep = () => {
184
- const step = controller.getCurrentStep();
194
+ const step = getCurrentStep();
185
195
  return step ? toBase64(JSON.stringify(step, null, 2)) : null;
186
196
  };
187
197
  const getEncodedCurrentStepWithModel = async () => {
@@ -191,6 +201,12 @@ var useDFContextMenu = (controller) => {
191
201
  return useContextMenu({
192
202
  title: "DynamicFlow Menu (Dev/Staging only)",
193
203
  items: isDevOrStaging() ? [
204
+ {
205
+ label: `DF client version: ${appVersion}`,
206
+ onClick: () => {
207
+ openVersionPage(appVersion);
208
+ }
209
+ },
194
210
  {
195
211
  label: "Open in Sandbox",
196
212
  onClick: () => {
@@ -206,7 +222,7 @@ var useDFContextMenu = (controller) => {
206
222
  {
207
223
  label: "Copy step JSON",
208
224
  onClick: () => {
209
- copyToClipboard(controller.getCurrentStep());
225
+ copyToClipboard(getCurrentStep());
210
226
  }
211
227
  },
212
228
  {
@@ -225,12 +241,35 @@ var toBase64 = (str) => {
225
241
  };
226
242
  var openInSandbox = (base64Step) => {
227
243
  if (base64Step) {
228
- window.open(`https://df.wise.com/sandbox#${base64Step}`, "_blank");
244
+ window.open(`https://df.wise.com/sandbox#${base64Step}`, "_blank", "noopener,noreferrer");
229
245
  }
230
246
  };
231
- var copyToClipboard = (step) => {
232
- if (step) {
233
- void navigator.clipboard.writeText(JSON.stringify(step, null, 2));
247
+ var openVersionPage = (version) => {
248
+ const changelogUrl = getGitHubChangelogUrl(version);
249
+ if (changelogUrl) {
250
+ window.open(changelogUrl, "_blank", "noopener,noreferrer");
251
+ } else {
252
+ window.open(getNpmPackageUrl(version), "_blank", "noopener,noreferrer");
253
+ }
254
+ };
255
+ var getGitHubChangelogUrl = (version) => {
256
+ const semverRegex = /^\d+\.\d+\.\d+$/;
257
+ if (semverRegex.test(version)) {
258
+ const hash = version.replace(/\./g, "");
259
+ return `https://github.com/transferwise/dynamic-flow/blob/main/web/wise/CHANGELOG.md#${hash}`;
260
+ }
261
+ return void 0;
262
+ };
263
+ var getNpmPackageUrl = (version) => {
264
+ return `https://www.npmjs.com/package/@wise/dynamic-flow-client-internal/v/${version}`;
265
+ };
266
+ var copyToClipboard = (value) => {
267
+ if (typeof value === "string") {
268
+ void navigator.clipboard.writeText(value);
269
+ return;
270
+ }
271
+ if (value) {
272
+ void navigator.clipboard.writeText(JSON.stringify(value, null, 2));
234
273
  }
235
274
  };
236
275
  var isDevOrStaging = () => {
@@ -250,16 +289,24 @@ var isDevOrStaging = () => {
250
289
  return false;
251
290
  }
252
291
  };
292
+ var recursivelyRemoveNullish = (element) => {
293
+ if (Array.isArray(element)) {
294
+ return element.map(recursivelyRemoveNullish);
295
+ }
296
+ if (element !== null && typeof element === "object") {
297
+ return Object.entries(element).reduce((acc, [key, value]) => {
298
+ if (value !== null && value !== void 0) {
299
+ acc[key] = recursivelyRemoveNullish(value);
300
+ }
301
+ return acc;
302
+ }, {});
303
+ }
304
+ return element;
305
+ };
253
306
 
254
307
  // src/dynamicFlow/useWiseToCoreProps.tsx
255
308
  import { useMemo as useMemo2 } from "react";
256
309
 
257
- // src/dynamicFlow/telemetry/app-version.ts
258
- var appVersion = (
259
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
260
- typeof process !== "undefined" ? "5.13.3" : "0.0.0"
261
- );
262
-
263
310
  // src/dynamicFlow/telemetry/getLogEvent.ts
264
311
  var getLogEvent = (onLog) => (level, message, extra) => {
265
312
  const extraWithVersion = __spreadProps(__spreadValues({}, extra), {
@@ -435,7 +482,7 @@ function AddressValidationButtonComponent(props) {
435
482
  block: true,
436
483
  disabled,
437
484
  priority: "primary",
438
- size: "md",
485
+ size: "lg",
439
486
  loading: spinny,
440
487
  onClick: () => {
441
488
  setSpinny(true);
@@ -3560,14 +3607,103 @@ var useCustomTheme = (theme, trackEvent) => {
3560
3607
  }, []);
3561
3608
  };
3562
3609
 
3610
+ // ../renderers/src/step/StepFooter.tsx
3611
+ import { Button as Button7 } from "@transferwise/components";
3612
+ import { useEffect as useEffect10, useRef, useState as useState12 } from "react";
3613
+ import { useIntl as useIntl14 } from "react-intl";
3614
+
3615
+ // ../renderers/src/messages/step.messages.ts
3616
+ import { defineMessages as defineMessages11 } from "react-intl";
3617
+ var step_messages_default = defineMessages11({
3618
+ scrollToBottom: {
3619
+ id: "df.wise.step.scrollToBottom",
3620
+ defaultMessage: "Scroll to bottom",
3621
+ description: "Label for a button that appears when the content of a step is too long and the user needs to scroll to the bottom to see all the content."
3622
+ }
3623
+ });
3624
+
3625
+ // ../renderers/src/step/StepFooter.tsx
3626
+ import { Fragment as Fragment13, jsx as jsx76, jsxs as jsxs26 } from "react/jsx-runtime";
3627
+ var SCROLL_TO_BOTTOM = "scroll-to-bottom";
3628
+ var StepFooter = ({ footer, tags }) => {
3629
+ if (tags == null ? void 0 : tags.includes(SCROLL_TO_BOTTOM)) {
3630
+ return /* @__PURE__ */ jsx76(FooterWithScrollButton, { footer });
3631
+ }
3632
+ return /* @__PURE__ */ jsx76(DefaultFooter, { footer });
3633
+ };
3634
+ var DefaultFooter = ({ footer }) => {
3635
+ const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
3636
+ return hasFooter ? /* @__PURE__ */ jsx76("div", { className: "df-step-fixed__footer", children: footer }) : void 0;
3637
+ };
3638
+ var FooterWithScrollButton = ({ footer }) => {
3639
+ const { formatMessage } = useIntl14();
3640
+ const endOfLayoutRef = useRef(null);
3641
+ const isElementVisible = useIsElementVisible(endOfLayoutRef);
3642
+ const scrollButton = /* @__PURE__ */ jsx76(
3643
+ Button7,
3644
+ {
3645
+ className: "m-b-1",
3646
+ v2: true,
3647
+ block: true,
3648
+ priority: "tertiary",
3649
+ onClick: () => {
3650
+ var _a;
3651
+ (_a = endOfLayoutRef.current) == null ? void 0 : _a.scrollIntoView({ behavior: "smooth" });
3652
+ },
3653
+ children: formatMessage(step_messages_default.scrollToBottom)
3654
+ }
3655
+ );
3656
+ const hasStepFooterContent = footer && Array.isArray(footer) && footer.length > 0;
3657
+ if (isElementVisible && !hasStepFooterContent) {
3658
+ return /* @__PURE__ */ jsx76("div", { ref: endOfLayoutRef, "aria-hidden": "true" });
3659
+ }
3660
+ return /* @__PURE__ */ jsxs26(Fragment13, { children: [
3661
+ /* @__PURE__ */ jsx76("div", { ref: endOfLayoutRef, "aria-hidden": "true" }),
3662
+ /* @__PURE__ */ jsxs26("div", { className: "df-step-fixed__footer", children: [
3663
+ !isElementVisible && scrollButton,
3664
+ footer
3665
+ ] })
3666
+ ] });
3667
+ };
3668
+ var useIsElementVisible = (elementRef) => {
3669
+ const [isVisible, setIsVisible] = useState12(false);
3670
+ useEffect10(() => {
3671
+ const element = elementRef.current;
3672
+ if (!element) return;
3673
+ const observer = new IntersectionObserver(([entry]) => {
3674
+ setIsVisible(entry.isIntersecting);
3675
+ });
3676
+ observer.observe(element);
3677
+ return () => observer.disconnect();
3678
+ }, [elementRef]);
3679
+ return isVisible;
3680
+ };
3681
+
3682
+ // ../renderers/src/step/StepHeader.tsx
3683
+ import { Title as Title2 } from "@transferwise/components";
3684
+ import { Fragment as Fragment14, jsx as jsx77, jsxs as jsxs27 } from "react/jsx-runtime";
3685
+ var StepHeader = ({ title, description, tags }) => {
3686
+ const { titleType, alignmentClassName } = getHeaderStyle(tags);
3687
+ return /* @__PURE__ */ jsxs27(Fragment14, { children: [
3688
+ title ? /* @__PURE__ */ jsx77(Title2, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
3689
+ description ? /* @__PURE__ */ jsx77("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
3690
+ ] });
3691
+ };
3692
+ var getHeaderStyle = (tags) => {
3693
+ if (tags == null ? void 0 : tags.includes("root-screen")) {
3694
+ return { titleType: "title-screen", alignmentClassName: "text-xs-left" };
3695
+ }
3696
+ return { titleType: "title-section", alignmentClassName: "text-xs-center" };
3697
+ };
3698
+
3563
3699
  // ../renderers/src/step/topbar/BackButton.tsx
3564
3700
  import { IconButton } from "@transferwise/components";
3565
3701
  import { ArrowLeft } from "@transferwise/icons";
3566
- import { useIntl as useIntl14 } from "react-intl";
3702
+ import { useIntl as useIntl15 } from "react-intl";
3567
3703
 
3568
3704
  // ../renderers/src/messages/back.messages.ts
3569
- import { defineMessages as defineMessages11 } from "react-intl";
3570
- var back_messages_default = defineMessages11({
3705
+ import { defineMessages as defineMessages12 } from "react-intl";
3706
+ var back_messages_default = defineMessages12({
3571
3707
  back: {
3572
3708
  id: "df.wise.back.label",
3573
3709
  defaultMessage: "Back",
@@ -3576,30 +3712,30 @@ var back_messages_default = defineMessages11({
3576
3712
  });
3577
3713
 
3578
3714
  // ../renderers/src/step/topbar/BackButton.tsx
3579
- import { jsx as jsx76, jsxs as jsxs26 } from "react/jsx-runtime";
3715
+ import { jsx as jsx78, jsxs as jsxs28 } from "react/jsx-runtime";
3580
3716
  function BackButton({ title, onClick }) {
3581
- const { formatMessage } = useIntl14();
3582
- return /* @__PURE__ */ jsxs26(IconButton, { className: "df-back-button", priority: "tertiary", onClick, children: [
3583
- /* @__PURE__ */ jsx76("span", { className: "sr-only", children: title != null ? title : formatMessage(back_messages_default.back) }),
3584
- /* @__PURE__ */ jsx76(ArrowLeft, {})
3717
+ const { formatMessage } = useIntl15();
3718
+ return /* @__PURE__ */ jsxs28(IconButton, { className: "df-back-button", priority: "tertiary", onClick, children: [
3719
+ /* @__PURE__ */ jsx78("span", { className: "sr-only", children: title != null ? title : formatMessage(back_messages_default.back) }),
3720
+ /* @__PURE__ */ jsx78(ArrowLeft, {})
3585
3721
  ] });
3586
3722
  }
3587
3723
 
3588
3724
  // ../renderers/src/step/topbar/Toolbar.tsx
3589
- import { Button as Button7, IconButton as IconButton2 } from "@transferwise/components";
3590
- import { jsx as jsx77, jsxs as jsxs27 } from "react/jsx-runtime";
3725
+ import { Button as Button8, IconButton as IconButton2 } from "@transferwise/components";
3726
+ import { jsx as jsx79, jsxs as jsxs29 } from "react/jsx-runtime";
3591
3727
  var Toolbar = ({ items }) => {
3592
- return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ jsx77("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ jsx77(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
3728
+ return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ jsx79("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ jsx79(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
3593
3729
  };
3594
3730
  function ToolbarButton(props) {
3595
- return prefersMedia(props.control) ? /* @__PURE__ */ jsx77(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ jsx77(TextToolbarButton, __spreadValues({}, props));
3731
+ return prefersMedia(props.control) ? /* @__PURE__ */ jsx79(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ jsx79(TextToolbarButton, __spreadValues({}, props));
3596
3732
  }
3597
3733
  function MediaToolbarButton(props) {
3598
3734
  var _a;
3599
3735
  const { context, control, media, accessibilityDescription, disabled, onClick } = props;
3600
3736
  const priority = getIconButtonPriority(control);
3601
3737
  const type = getSentiment2(context);
3602
- return /* @__PURE__ */ jsxs27(
3738
+ return /* @__PURE__ */ jsxs29(
3603
3739
  IconButton2,
3604
3740
  {
3605
3741
  className: "df-toolbar-button",
@@ -3609,7 +3745,7 @@ function MediaToolbarButton(props) {
3609
3745
  type,
3610
3746
  onClick,
3611
3747
  children: [
3612
- accessibilityDescription ? /* @__PURE__ */ jsx77("span", { className: "sr-only", children: accessibilityDescription }) : null,
3748
+ accessibilityDescription ? /* @__PURE__ */ jsx79("span", { className: "sr-only", children: accessibilityDescription }) : null,
3613
3749
  media ? (_a = getAddonStartMedia(media)) == null ? void 0 : _a.value : null
3614
3750
  ]
3615
3751
  }
@@ -3620,8 +3756,8 @@ function TextToolbarButton(props) {
3620
3756
  const addonStart = media ? getAddonStartMedia(media) : void 0;
3621
3757
  const priority = getPriority2(control);
3622
3758
  const sentiment = getSentiment2(context);
3623
- return /* @__PURE__ */ jsx77(
3624
- Button7,
3759
+ return /* @__PURE__ */ jsx79(
3760
+ Button8,
3625
3761
  {
3626
3762
  v2: true,
3627
3763
  size: "sm",
@@ -3650,140 +3786,51 @@ var getIconButtonPriority = (control) => {
3650
3786
  };
3651
3787
 
3652
3788
  // ../renderers/src/step/topbar/TopBar.tsx
3653
- import { jsx as jsx78, jsxs as jsxs28 } from "react/jsx-runtime";
3789
+ import { jsx as jsx80, jsxs as jsxs30 } from "react/jsx-runtime";
3654
3790
  function TopBar({ back, toolbar }) {
3655
- return back || toolbar ? /* @__PURE__ */ jsxs28("div", { className: "d-flex m-b-2", children: [
3656
- back ? /* @__PURE__ */ jsx78(BackButton, __spreadValues({}, back)) : null,
3657
- toolbar ? /* @__PURE__ */ jsx78(Toolbar, __spreadValues({}, toolbar)) : null
3791
+ return back || toolbar ? /* @__PURE__ */ jsxs30("div", { className: "d-flex m-b-2", children: [
3792
+ back ? /* @__PURE__ */ jsx80(BackButton, __spreadValues({}, back)) : null,
3793
+ toolbar ? /* @__PURE__ */ jsx80(Toolbar, __spreadValues({}, toolbar)) : null
3658
3794
  ] }) : null;
3659
3795
  }
3660
3796
 
3661
- // ../renderers/src/step/StepFooter.tsx
3662
- import { Button as Button8 } from "@transferwise/components";
3663
- import { useEffect as useEffect10, useRef, useState as useState12 } from "react";
3664
- import { useIntl as useIntl15 } from "react-intl";
3665
-
3666
- // ../renderers/src/messages/step.messages.ts
3667
- import { defineMessages as defineMessages12 } from "react-intl";
3668
- var step_messages_default = defineMessages12({
3669
- scrollToBottom: {
3670
- id: "df.wise.step.scrollToBottom",
3671
- defaultMessage: "Scroll to bottom",
3672
- description: "Label for a button that appears when the content of a step is too long and the user needs to scroll to the bottom to see all the content."
3673
- }
3674
- });
3675
-
3676
- // ../renderers/src/step/StepFooter.tsx
3677
- import { Fragment as Fragment13, jsx as jsx79, jsxs as jsxs29 } from "react/jsx-runtime";
3678
- var SCROLL_TO_BOTTOM = "scroll-to-bottom";
3679
- var StepFooter = ({ footer, tags }) => {
3680
- if (tags == null ? void 0 : tags.includes(SCROLL_TO_BOTTOM)) {
3681
- return /* @__PURE__ */ jsx79(FooterWithScrollButton, { footer });
3682
- }
3683
- return /* @__PURE__ */ jsx79(DefaultFooter, { footer });
3684
- };
3685
- var DefaultFooter = ({ footer }) => {
3686
- const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
3687
- return hasFooter ? /* @__PURE__ */ jsx79("div", { className: "df-step-fixed__footer", children: footer }) : void 0;
3688
- };
3689
- var FooterWithScrollButton = ({ footer }) => {
3690
- const { formatMessage } = useIntl15();
3691
- const endOfLayoutRef = useRef(null);
3692
- const isElementVisible = useIsElementVisible(endOfLayoutRef);
3693
- const scrollButton = /* @__PURE__ */ jsx79(
3694
- Button8,
3695
- {
3696
- className: "m-b-1",
3697
- v2: true,
3698
- block: true,
3699
- priority: "tertiary",
3700
- onClick: () => {
3701
- var _a;
3702
- (_a = endOfLayoutRef.current) == null ? void 0 : _a.scrollIntoView({ behavior: "smooth" });
3703
- },
3704
- children: formatMessage(step_messages_default.scrollToBottom)
3705
- }
3706
- );
3707
- const hasStepFooterContent = footer && Array.isArray(footer) && footer.length > 0;
3708
- if (isElementVisible && !hasStepFooterContent) {
3709
- return /* @__PURE__ */ jsx79("div", { ref: endOfLayoutRef, "aria-hidden": "true" });
3710
- }
3711
- return /* @__PURE__ */ jsxs29(Fragment13, { children: [
3712
- /* @__PURE__ */ jsx79("div", { ref: endOfLayoutRef, "aria-hidden": "true" }),
3713
- /* @__PURE__ */ jsxs29("div", { className: "df-step-fixed__footer", children: [
3714
- !isElementVisible && scrollButton,
3715
- footer
3716
- ] })
3717
- ] });
3718
- };
3719
- var useIsElementVisible = (elementRef) => {
3720
- const [isVisible, setIsVisible] = useState12(false);
3721
- useEffect10(() => {
3722
- const element = elementRef.current;
3723
- if (!element) return;
3724
- const observer = new IntersectionObserver(([entry]) => {
3725
- setIsVisible(entry.isIntersecting);
3726
- });
3727
- observer.observe(element);
3728
- return () => observer.disconnect();
3729
- }, [elementRef]);
3730
- return isVisible;
3731
- };
3732
-
3733
3797
  // ../renderers/src/step/SplashCelebrationStepRenderer.tsx
3734
- import { jsx as jsx80, jsxs as jsxs30 } from "react/jsx-runtime";
3798
+ import { jsx as jsx81, jsxs as jsxs31 } from "react/jsx-runtime";
3735
3799
  var SplashCelebrationStepRenderer = {
3736
3800
  canRenderType: "step",
3737
3801
  canRender: ({ control }) => control === "splash-celebration",
3738
3802
  render: SplashCelebrationStepRendererComponent
3739
3803
  };
3740
3804
  function SplashCelebrationStepRendererComponent(props) {
3741
- const { back, toolbar, children, footer, tags, trackEvent } = props;
3805
+ const { back, title, description, toolbar, children, footer, tags, trackEvent } = props;
3742
3806
  useCustomTheme("forest-green", trackEvent);
3743
- return /* @__PURE__ */ jsxs30("div", { className: "splash-screen m-t-5", children: [
3744
- /* @__PURE__ */ jsx80(TopBar, { back, toolbar }),
3807
+ return /* @__PURE__ */ jsxs31("div", { className: "splash-screen m-t-5", children: [
3808
+ /* @__PURE__ */ jsx81(TopBar, { back, toolbar }),
3809
+ title || description ? /* @__PURE__ */ jsx81("div", { className: "m-b-4", children: /* @__PURE__ */ jsx81(StepHeader, { title, description, tags }) }) : void 0,
3745
3810
  children,
3746
- /* @__PURE__ */ jsx80(StepFooter, { footer, tags })
3811
+ /* @__PURE__ */ jsx81(StepFooter, { footer, tags })
3747
3812
  ] });
3748
3813
  }
3749
3814
 
3750
3815
  // ../renderers/src/step/SplashStepRenderer.tsx
3751
- import { jsx as jsx81, jsxs as jsxs31 } from "react/jsx-runtime";
3816
+ import { jsx as jsx82, jsxs as jsxs32 } from "react/jsx-runtime";
3752
3817
  var SplashStepRenderer = {
3753
3818
  canRenderType: "step",
3754
3819
  canRender: ({ control }) => control === "splash",
3755
3820
  render: SplashStepRendererComponent
3756
3821
  };
3757
3822
  function SplashStepRendererComponent(props) {
3758
- const { back, toolbar, children, footer, tags } = props;
3759
- return /* @__PURE__ */ jsxs31("div", { className: "splash-screen m-t-5", children: [
3760
- /* @__PURE__ */ jsx81(TopBar, { back, toolbar }),
3823
+ const { back, title, description, toolbar, children, footer, tags } = props;
3824
+ return /* @__PURE__ */ jsxs32("div", { className: "splash-screen m-t-5", children: [
3825
+ /* @__PURE__ */ jsx82(TopBar, { back, toolbar }),
3826
+ title || description ? /* @__PURE__ */ jsx82("div", { className: "m-b-4", children: /* @__PURE__ */ jsx82(StepHeader, { title, description, tags }) }) : void 0,
3761
3827
  children,
3762
- /* @__PURE__ */ jsx81(StepFooter, { footer, tags })
3828
+ /* @__PURE__ */ jsx82(StepFooter, { footer, tags })
3763
3829
  ] });
3764
3830
  }
3765
3831
 
3766
3832
  // ../renderers/src/step/StepRenderer.tsx
3767
3833
  import { Alert as Alert2 } from "@transferwise/components";
3768
-
3769
- // ../renderers/src/step/StepHeader.tsx
3770
- import { Title as Title2 } from "@transferwise/components";
3771
- import { Fragment as Fragment14, jsx as jsx82, jsxs as jsxs32 } from "react/jsx-runtime";
3772
- var StepHeader = ({ title, description, tags }) => {
3773
- const { titleType, alignmentClassName } = getHeaderStyle(tags);
3774
- return /* @__PURE__ */ jsxs32(Fragment14, { children: [
3775
- title ? /* @__PURE__ */ jsx82(Title2, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
3776
- description ? /* @__PURE__ */ jsx82("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
3777
- ] });
3778
- };
3779
- var getHeaderStyle = (tags) => {
3780
- if (tags == null ? void 0 : tags.includes("root-screen")) {
3781
- return { titleType: "title-screen", alignmentClassName: "text-xs-left" };
3782
- }
3783
- return { titleType: "title-section", alignmentClassName: "text-xs-center" };
3784
- };
3785
-
3786
- // ../renderers/src/step/StepRenderer.tsx
3787
3834
  import { jsx as jsx83, jsxs as jsxs33 } from "react/jsx-runtime";
3788
3835
  var StepRenderer = {
3789
3836
  canRenderType: "step",