@wise/dynamic-flow-client-internal 5.20.0 → 5.21.1

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
@@ -64,7 +64,7 @@ var require_classnames = __commonJS({
64
64
  (function() {
65
65
  "use strict";
66
66
  var hasOwn = {}.hasOwnProperty;
67
- function classNames7() {
67
+ function classNames8() {
68
68
  var classes = "";
69
69
  for (var i = 0; i < arguments.length; i++) {
70
70
  var arg = arguments[i];
@@ -82,7 +82,7 @@ var require_classnames = __commonJS({
82
82
  return "";
83
83
  }
84
84
  if (Array.isArray(arg)) {
85
- return classNames7.apply(null, arg);
85
+ return classNames8.apply(null, arg);
86
86
  }
87
87
  if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
88
88
  return arg.toString();
@@ -105,14 +105,14 @@ var require_classnames = __commonJS({
105
105
  return value + newClass;
106
106
  }
107
107
  if (typeof module !== "undefined" && module.exports) {
108
- classNames7.default = classNames7;
109
- module.exports = classNames7;
108
+ classNames8.default = classNames8;
109
+ module.exports = classNames8;
110
110
  } else if (typeof define === "function" && typeof define.amd === "object" && define.amd) {
111
111
  define("classnames", [], function() {
112
- return classNames7;
112
+ return classNames8;
113
113
  });
114
114
  } else {
115
- window.classNames = classNames7;
115
+ window.classNames = classNames8;
116
116
  }
117
117
  })();
118
118
  }
@@ -127,7 +127,7 @@ import { useDynamicFlow } from "@wise/dynamic-flow-client";
127
127
  // src/dynamicFlow/telemetry/app-version.ts
128
128
  var appVersion = (
129
129
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
130
- typeof process !== "undefined" ? "5.20.0" : "0.0.0"
130
+ typeof process !== "undefined" ? "5.21.1" : "0.0.0"
131
131
  );
132
132
 
133
133
  // src/dynamicFlow/context-menu/useContextMenu.tsx
@@ -385,7 +385,7 @@ var BoxRenderer = {
385
385
  const contents = /* @__PURE__ */ jsx3(
386
386
  "div",
387
387
  {
388
- className: (0, import_classnames.default)({
388
+ className: (0, import_classnames.default)("df-box-renderer", {
389
389
  "df-box-renderer-border": hasBorder,
390
390
  [`df-box-renderer-width-${width}`]: hasFixedWidth,
391
391
  [getMargin(margin)]: !hasFixedWidth
@@ -851,11 +851,24 @@ var getPriority = (control, tags) => {
851
851
  return control && isButtonPriority(control) ? control : "secondary";
852
852
  };
853
853
 
854
+ // ../renderers/src/CheckboxInputRenderer.tsx
855
+ import { Checkbox, ListItem as ListItem3 } from "@transferwise/components";
856
+
854
857
  // ../renderers/src/components/FieldInput.tsx
855
858
  import { Field } from "@transferwise/components";
856
- import { useEffect as useEffect4, useRef } from "react";
857
859
 
858
- // ../renderers/src/utils/scroll-to-if-not-visible.ts
860
+ // ../renderers/src/utils/useScrollToError.ts
861
+ import { useEffect as useEffect4, useRef } from "react";
862
+ var useScrollToError = (validationState, features) => {
863
+ const ref = useRef(null);
864
+ const enabled = (features == null ? void 0 : features.scrollToError) !== false;
865
+ useEffect4(() => {
866
+ if ((validationState == null ? void 0 : validationState.status) === "invalid" && (validationState == null ? void 0 : validationState.message) && enabled) {
867
+ scrollToIfNotVisible(ref.current);
868
+ }
869
+ }, [validationState == null ? void 0 : validationState.status, validationState == null ? void 0 : validationState.message, enabled]);
870
+ return { ref };
871
+ };
859
872
  var scrollToIfNotVisible = (ref) => {
860
873
  const rect = ref == null ? void 0 : ref.getBoundingClientRect();
861
874
  if (!ref || !rect) {
@@ -919,22 +932,16 @@ function FieldInput({
919
932
  inlineAlert,
920
933
  features
921
934
  }) {
935
+ var _a;
922
936
  const labelContent = label && help ? /* @__PURE__ */ jsx19(LabelContentWithHelp, { text: label, help }) : label;
923
- const message = validation == null ? void 0 : validation.message;
924
- const ref = useRef(null);
925
- const shouldScrollToError = features.scrollToError !== false;
926
- useEffect4(() => {
927
- if (message && shouldScrollToError) {
928
- scrollToIfNotVisible(ref.current);
929
- }
930
- }, [message, shouldScrollToError]);
937
+ const { ref } = useScrollToError(validation, features);
931
938
  return /* @__PURE__ */ jsx19("div", { ref, children: /* @__PURE__ */ jsx19(
932
939
  Field,
933
940
  {
934
941
  id,
935
942
  label: labelContent,
936
943
  description,
937
- message: message != null ? message : inlineAlert == null ? void 0 : inlineAlert.content,
944
+ message: (_a = validation == null ? void 0 : validation.message) != null ? _a : inlineAlert == null ? void 0 : inlineAlert.content,
938
945
  messageLoading: loadingState !== "idle",
939
946
  sentiment: mapStatusToSentiment(validation, inlineAlert == null ? void 0 : inlineAlert.context),
940
947
  children
@@ -954,33 +961,30 @@ var mapStatusToSentiment = (validation, defaultContext) => {
954
961
  };
955
962
  var FieldInput_default = FieldInput;
956
963
 
957
- // ../renderers/src/CheckboxInputRenderer.tsx
958
- import { Checkbox, ListItem as ListItem3 } from "@transferwise/components";
959
-
960
- // ../renderers/src/utils/listItem/getMedia.tsx
961
- import { jsx as jsx20 } from "react/jsx-runtime";
962
- var getMedia = (media, preferAvatar) => media ? /* @__PURE__ */ jsx20(OptionMedia, { media, preferAvatar }) : void 0;
963
-
964
964
  // ../renderers/src/utils/listItem/getAdditionalText.tsx
965
965
  import { ListItem } from "@transferwise/components";
966
- import { jsx as jsx21 } from "react/jsx-runtime";
966
+ import { jsx as jsx20 } from "react/jsx-runtime";
967
967
  var getAdditionalText = (additionalText) => {
968
968
  if (!additionalText) {
969
969
  return void 0;
970
970
  }
971
- return /* @__PURE__ */ jsx21(ListItem.AdditionalInfo, { children: additionalText });
971
+ return /* @__PURE__ */ jsx20(ListItem.AdditionalInfo, { children: additionalText });
972
972
  };
973
973
 
974
+ // ../renderers/src/utils/listItem/getInlineAlert.tsx
975
+ import { ListItem as ListItem2 } from "@transferwise/components";
976
+ import { jsx as jsx21 } from "react/jsx-runtime";
977
+ var getInlineAlert = (inlineAlert) => inlineAlert ? /* @__PURE__ */ jsx21(ListItem2.Prompt, { sentiment: inlineAlert == null ? void 0 : inlineAlert.context, children: inlineAlert.content }) : void 0;
978
+
979
+ // ../renderers/src/utils/listItem/getMedia.tsx
980
+ import { jsx as jsx22 } from "react/jsx-runtime";
981
+ var getMedia = (media, preferAvatar) => media ? /* @__PURE__ */ jsx22(OptionMedia, { media, preferAvatar }) : void 0;
982
+
974
983
  // ../renderers/src/utils/listItem/getSupportingValues.ts
975
984
  var getSupportingValues = (supportingValues) => {
976
985
  return __spreadValues(__spreadValues({}, (supportingValues == null ? void 0 : supportingValues.value) ? { valueTitle: supportingValues.value } : {}), (supportingValues == null ? void 0 : supportingValues.subvalue) ? { valueSubtitle: supportingValues.subvalue } : {});
977
986
  };
978
987
 
979
- // ../renderers/src/utils/listItem/getInlineAlert.tsx
980
- import { ListItem as ListItem2 } from "@transferwise/components";
981
- import { jsx as jsx22 } from "react/jsx-runtime";
982
- var getInlineAlert = (inlineAlert) => inlineAlert ? /* @__PURE__ */ jsx22(ListItem2.Prompt, { sentiment: inlineAlert == null ? void 0 : inlineAlert.context, children: inlineAlert.content }) : void 0;
983
-
984
988
  // ../renderers/src/CheckboxInputRenderer.tsx
985
989
  import { jsx as jsx23 } from "react/jsx-runtime";
986
990
  var CheckboxInputRenderer = {
@@ -1044,9 +1048,11 @@ var CheckboxItemComponent = (props) => {
1044
1048
  title,
1045
1049
  validationState,
1046
1050
  value,
1051
+ features,
1047
1052
  onChange
1048
1053
  } = props;
1049
- return /* @__PURE__ */ jsx23(
1054
+ const { ref } = useScrollToError(validationState, features);
1055
+ return /* @__PURE__ */ jsx23("div", { ref, children: /* @__PURE__ */ jsx23(
1050
1056
  ListItem3,
1051
1057
  __spreadValues({
1052
1058
  title,
@@ -1057,7 +1063,7 @@ var CheckboxItemComponent = (props) => {
1057
1063
  prompt: getInlineAlertOrValidation(validationState, inlineAlert),
1058
1064
  control: /* @__PURE__ */ jsx23(ListItem3.Checkbox, { checked: value, onChange: () => onChange(!value) })
1059
1065
  }, getSupportingValues(supportingValues))
1060
- );
1066
+ ) });
1061
1067
  };
1062
1068
  var SwitchItemComponent = (props) => {
1063
1069
  const {
@@ -1070,9 +1076,11 @@ var SwitchItemComponent = (props) => {
1070
1076
  title,
1071
1077
  validationState,
1072
1078
  value,
1079
+ features,
1073
1080
  onChange
1074
1081
  } = props;
1075
- return /* @__PURE__ */ jsx23(
1082
+ const { ref } = useScrollToError(validationState, features);
1083
+ return /* @__PURE__ */ jsx23("div", { ref, children: /* @__PURE__ */ jsx23(
1076
1084
  ListItem3,
1077
1085
  __spreadValues({
1078
1086
  title,
@@ -1083,7 +1091,7 @@ var SwitchItemComponent = (props) => {
1083
1091
  prompt: getInlineAlertOrValidation(validationState, inlineAlert),
1084
1092
  control: /* @__PURE__ */ jsx23(ListItem3.Switch, { checked: value, onClick: () => onChange(!value) })
1085
1093
  }, getSupportingValues(supportingValues))
1086
- );
1094
+ ) });
1087
1095
  };
1088
1096
  var getInlineAlertOrValidation = (validationState, inlineAlert) => {
1089
1097
  if ((validationState == null ? void 0 : validationState.status) === "invalid") {
@@ -2045,13 +2053,17 @@ var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
2045
2053
 
2046
2054
  // ../renderers/src/MarkdownRenderer.tsx
2047
2055
  import { Markdown as Markdown3 } from "@transferwise/components";
2056
+ var import_classnames4 = __toESM(require_classnames());
2048
2057
  import { jsx as jsx48 } from "react/jsx-runtime";
2049
2058
  var MarkdownRenderer = {
2050
2059
  canRenderType: "markdown",
2051
2060
  render: ({ content, align, margin, size }) => /* @__PURE__ */ jsx48("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ jsx48(
2052
2061
  Markdown3,
2053
2062
  {
2054
- className: ["xs", "sm"].includes(size) ? "np-text-body-default" : "np-text-body-large",
2063
+ className: (0, import_classnames4.default)(
2064
+ "df-markdown",
2065
+ ["xs", "sm"].includes(size) ? "np-text-body-default" : "np-text-body-large"
2066
+ ),
2055
2067
  config: { link: { target: "_blank" } },
2056
2068
  children: content
2057
2069
  }
@@ -2493,9 +2505,8 @@ var MultiSelectInputRenderer = {
2493
2505
  import { Status, UploadInput } from "@transferwise/components";
2494
2506
 
2495
2507
  // ../renderers/src/components/UploadFieldInput.tsx
2496
- var import_classnames4 = __toESM(require_classnames());
2508
+ var import_classnames5 = __toESM(require_classnames());
2497
2509
  import { InlineAlert as InlineAlert2 } from "@transferwise/components";
2498
- import { useEffect as useEffect8, useRef as useRef2 } from "react";
2499
2510
  import { jsx as jsx57, jsxs as jsxs12 } from "react/jsx-runtime";
2500
2511
  function UploadFieldInput({
2501
2512
  id,
@@ -2508,19 +2519,12 @@ function UploadFieldInput({
2508
2519
  }) {
2509
2520
  const labelContent = label && help ? /* @__PURE__ */ jsx57(LabelContentWithHelp, { text: label, help }) : label;
2510
2521
  const descriptionId = description ? `${id}-description` : void 0;
2511
- const message = validation == null ? void 0 : validation.message;
2512
- const ref = useRef2(null);
2513
- const shouldScrollToError = features.scrollToError !== false;
2514
- useEffect8(() => {
2515
- if (message && shouldScrollToError) {
2516
- scrollToIfNotVisible(ref.current);
2517
- }
2518
- }, [message, shouldScrollToError]);
2522
+ const { ref } = useScrollToError(validation, features);
2519
2523
  return /* @__PURE__ */ jsxs12(
2520
2524
  "div",
2521
2525
  {
2522
2526
  ref,
2523
- className: (0, import_classnames4.default)("form-group d-block", {
2527
+ className: (0, import_classnames5.default)("form-group d-block", {
2524
2528
  "has-error": (validation == null ? void 0 : validation.status) === "invalid"
2525
2529
  }),
2526
2530
  children: [
@@ -2683,7 +2687,7 @@ function useSnackBarIfAvailable() {
2683
2687
  }
2684
2688
 
2685
2689
  // ../renderers/src/ParagraphRenderer.tsx
2686
- var import_classnames5 = __toESM(require_classnames());
2690
+ var import_classnames6 = __toESM(require_classnames());
2687
2691
  import { Button as Button5, Input as Input3 } from "@transferwise/components";
2688
2692
 
2689
2693
  // ../renderers/src/messages/paragraph.messages.ts
@@ -2736,7 +2740,7 @@ function CopyableParagraph({
2736
2740
  type: "text",
2737
2741
  value: text,
2738
2742
  readOnly: true,
2739
- className: (0, import_classnames5.default)("text-ellipsis", inputAlignmentClasses)
2743
+ className: (0, import_classnames6.default)("text-ellipsis", inputAlignmentClasses)
2740
2744
  }
2741
2745
  ),
2742
2746
  /* @__PURE__ */ jsx60(Button5, { v2: true, block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
@@ -2768,7 +2772,7 @@ var ProgressRenderer = {
2768
2772
  };
2769
2773
 
2770
2774
  // ../renderers/src/RepeatableRenderer.tsx
2771
- var import_classnames6 = __toESM(require_classnames());
2775
+ var import_classnames7 = __toESM(require_classnames());
2772
2776
  import { Button as Button6, Header as Header6, InlineAlert as InlineAlert3, Modal as Modal4, NavigationOption } from "@transferwise/components";
2773
2777
  import { Plus } from "@transferwise/icons";
2774
2778
  import { useState as useState9 } from "react";
@@ -2811,6 +2815,7 @@ function Repeatable(props) {
2811
2815
  description,
2812
2816
  editableItem,
2813
2817
  editItemTitle,
2818
+ features,
2814
2819
  items,
2815
2820
  title,
2816
2821
  validationState,
@@ -2821,6 +2826,7 @@ function Repeatable(props) {
2821
2826
  } = props;
2822
2827
  const { formatMessage } = useIntl9();
2823
2828
  const [openModalType, setOpenModalType] = useState9(null);
2829
+ const { ref } = useScrollToError(validationState, features);
2824
2830
  const onAddItem = () => {
2825
2831
  onAdd();
2826
2832
  setOpenModalType("add");
@@ -2843,29 +2849,31 @@ function Repeatable(props) {
2843
2849
  setOpenModalType(null);
2844
2850
  };
2845
2851
  return /* @__PURE__ */ jsxs14(Fragment5, { children: [
2846
- title && /* @__PURE__ */ jsx62(Header6, { title }),
2847
- description && /* @__PURE__ */ jsx62("p", { children: description }),
2848
- /* @__PURE__ */ jsxs14(
2849
- "div",
2850
- {
2851
- className: (0, import_classnames6.default)("form-group", {
2852
- "has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
2853
- }),
2854
- children: [
2855
- items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsx62(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
2856
- /* @__PURE__ */ jsx62(
2857
- NavigationOption,
2858
- {
2859
- media: /* @__PURE__ */ jsx62(Plus, {}),
2860
- title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
2861
- showMediaAtAllSizes: true,
2862
- onClick: () => onAddItem()
2863
- }
2864
- ),
2865
- (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ jsx62(InlineAlert3, { type: "negative", children: validationState.message })
2866
- ]
2867
- }
2868
- ),
2852
+ /* @__PURE__ */ jsxs14("div", { ref, children: [
2853
+ title && /* @__PURE__ */ jsx62(Header6, { title }),
2854
+ description && /* @__PURE__ */ jsx62("p", { children: description }),
2855
+ /* @__PURE__ */ jsxs14(
2856
+ "div",
2857
+ {
2858
+ className: (0, import_classnames7.default)("form-group", {
2859
+ "has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
2860
+ }),
2861
+ children: [
2862
+ items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsx62(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
2863
+ /* @__PURE__ */ jsx62(
2864
+ NavigationOption,
2865
+ {
2866
+ media: /* @__PURE__ */ jsx62(Plus, {}),
2867
+ title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
2868
+ showMediaAtAllSizes: true,
2869
+ onClick: () => onAddItem()
2870
+ }
2871
+ ),
2872
+ (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ jsx62(InlineAlert3, { type: "negative", children: validationState.message })
2873
+ ]
2874
+ }
2875
+ )
2876
+ ] }),
2869
2877
  /* @__PURE__ */ jsx62(
2870
2878
  Modal4,
2871
2879
  {
@@ -3381,7 +3389,7 @@ function RadioInputRendererComponent(props) {
3381
3389
 
3382
3390
  // ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
3383
3391
  import { Tabs } from "@transferwise/components";
3384
- import { useEffect as useEffect9 } from "react";
3392
+ import { useEffect as useEffect8 } from "react";
3385
3393
  import { Fragment as Fragment9, jsx as jsx71, jsxs as jsxs21 } from "react/jsx-runtime";
3386
3394
  function TabInputRendererComponent(props) {
3387
3395
  const {
@@ -3397,7 +3405,7 @@ function TabInputRendererComponent(props) {
3397
3405
  validationState,
3398
3406
  onSelect
3399
3407
  } = props;
3400
- useEffect9(() => {
3408
+ useEffect8(() => {
3401
3409
  if (!isValidIndex2(selectedIndex, options.length)) {
3402
3410
  onSelect(0);
3403
3411
  }
@@ -3513,7 +3521,7 @@ function SelectInputRendererComponent(props) {
3513
3521
  }
3514
3522
 
3515
3523
  // ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
3516
- import { useEffect as useEffect10 } from "react";
3524
+ import { useEffect as useEffect9 } from "react";
3517
3525
  import { SegmentedControl } from "@transferwise/components";
3518
3526
  import { Fragment as Fragment11, jsx as jsx73, jsxs as jsxs23 } from "react/jsx-runtime";
3519
3527
  function SegmentedInputRendererComponent(props) {
@@ -3529,7 +3537,7 @@ function SegmentedInputRendererComponent(props) {
3529
3537
  validationState,
3530
3538
  onSelect
3531
3539
  } = props;
3532
- useEffect10(() => {
3540
+ useEffect9(() => {
3533
3541
  if (!isValidIndex3(selectedIndex, options.length)) {
3534
3542
  onSelect(0);
3535
3543
  }
@@ -3568,13 +3576,14 @@ var isValidIndex3 = (index, options) => index !== null && index >= 0 && index <
3568
3576
 
3569
3577
  // ../renderers/src/SelectInputRenderer/RadioItemRendererComponent.tsx
3570
3578
  import { Header as Header8, InlineAlert as InlineAlert4, List as List2, ListItem as ListItem11 } from "@transferwise/components";
3571
- import { Fragment as Fragment12, jsx as jsx74, jsxs as jsxs24 } from "react/jsx-runtime";
3579
+ import { jsx as jsx74, jsxs as jsxs24 } from "react/jsx-runtime";
3572
3580
  function RadioItemRendererComponent(props) {
3573
3581
  const {
3574
3582
  id,
3575
3583
  children,
3576
3584
  description: rootDescription,
3577
3585
  disabled: rootDisabled,
3586
+ features,
3578
3587
  help,
3579
3588
  title: rootTitle,
3580
3589
  options,
@@ -3582,7 +3591,8 @@ function RadioItemRendererComponent(props) {
3582
3591
  validationState,
3583
3592
  onSelect
3584
3593
  } = props;
3585
- return /* @__PURE__ */ jsxs24(Fragment12, { children: [
3594
+ const { ref } = useScrollToError(validationState, features);
3595
+ return /* @__PURE__ */ jsxs24("div", { ref, children: [
3586
3596
  rootTitle && /* @__PURE__ */ jsx74(
3587
3597
  Header8,
3588
3598
  {
@@ -3695,12 +3705,12 @@ var StatusListRenderer_default = StatusListRenderer;
3695
3705
 
3696
3706
  // ../renderers/src/utils/useCustomTheme.ts
3697
3707
  import { useTheme } from "@wise/components-theming";
3698
- import { useEffect as useEffect11, useMemo } from "react";
3708
+ import { useEffect as useEffect10, useMemo } from "react";
3699
3709
  var ThemeRequiredEventName = "Theme Required";
3700
3710
  var useCustomTheme = (theme, trackEvent) => {
3701
3711
  const theming = useTheme();
3702
3712
  const previousTheme = useMemo(() => theming.theme, []);
3703
- useEffect11(() => {
3713
+ useEffect10(() => {
3704
3714
  theming.setTheme(theme);
3705
3715
  trackEvent(ThemeRequiredEventName, { theme });
3706
3716
  return theme !== previousTheme ? () => {
@@ -3713,7 +3723,7 @@ var useCustomTheme = (theme, trackEvent) => {
3713
3723
 
3714
3724
  // ../renderers/src/step/StepFooter.tsx
3715
3725
  import { Button as Button7 } from "@transferwise/components";
3716
- import { useEffect as useEffect12, useRef as useRef3, useState as useState12 } from "react";
3726
+ import { useEffect as useEffect11, useRef as useRef2, useState as useState12 } from "react";
3717
3727
  import { useIntl as useIntl14 } from "react-intl";
3718
3728
 
3719
3729
  // ../renderers/src/messages/step.messages.ts
@@ -3727,7 +3737,7 @@ var step_messages_default = defineMessages11({
3727
3737
  });
3728
3738
 
3729
3739
  // ../renderers/src/step/StepFooter.tsx
3730
- import { Fragment as Fragment13, jsx as jsx77, jsxs as jsxs26 } from "react/jsx-runtime";
3740
+ import { Fragment as Fragment12, jsx as jsx77, jsxs as jsxs26 } from "react/jsx-runtime";
3731
3741
  var SCROLL_TO_BOTTOM = "scroll-to-bottom";
3732
3742
  var StepFooter = ({ footer, tags }) => {
3733
3743
  if (tags == null ? void 0 : tags.includes(SCROLL_TO_BOTTOM)) {
@@ -3741,7 +3751,7 @@ var DefaultFooter = ({ footer }) => {
3741
3751
  };
3742
3752
  var FooterWithScrollButton = ({ footer }) => {
3743
3753
  const { formatMessage } = useIntl14();
3744
- const endOfLayoutRef = useRef3(null);
3754
+ const endOfLayoutRef = useRef2(null);
3745
3755
  const isElementVisible = useIsElementVisible(endOfLayoutRef);
3746
3756
  const scrollButton = /* @__PURE__ */ jsx77(
3747
3757
  Button7,
@@ -3761,7 +3771,7 @@ var FooterWithScrollButton = ({ footer }) => {
3761
3771
  if (isElementVisible && !hasStepFooterContent) {
3762
3772
  return /* @__PURE__ */ jsx77("div", { ref: endOfLayoutRef, "aria-hidden": "true" });
3763
3773
  }
3764
- return /* @__PURE__ */ jsxs26(Fragment13, { children: [
3774
+ return /* @__PURE__ */ jsxs26(Fragment12, { children: [
3765
3775
  /* @__PURE__ */ jsx77("div", { ref: endOfLayoutRef, "aria-hidden": "true" }),
3766
3776
  /* @__PURE__ */ jsxs26("div", { className: "df-step-fixed__footer", children: [
3767
3777
  !isElementVisible && scrollButton,
@@ -3771,7 +3781,7 @@ var FooterWithScrollButton = ({ footer }) => {
3771
3781
  };
3772
3782
  var useIsElementVisible = (elementRef) => {
3773
3783
  const [isVisible, setIsVisible] = useState12(false);
3774
- useEffect12(() => {
3784
+ useEffect11(() => {
3775
3785
  const element = elementRef.current;
3776
3786
  if (!element) return;
3777
3787
  const observer = new IntersectionObserver(([entry]) => {
@@ -3785,10 +3795,10 @@ var useIsElementVisible = (elementRef) => {
3785
3795
 
3786
3796
  // ../renderers/src/step/StepHeader.tsx
3787
3797
  import { Title as Title2 } from "@transferwise/components";
3788
- import { Fragment as Fragment14, jsx as jsx78, jsxs as jsxs27 } from "react/jsx-runtime";
3798
+ import { Fragment as Fragment13, jsx as jsx78, jsxs as jsxs27 } from "react/jsx-runtime";
3789
3799
  var StepHeader = ({ title, description, tags }) => {
3790
3800
  const { titleType, alignmentClassName } = getHeaderStyle(tags);
3791
- return /* @__PURE__ */ jsxs27(Fragment14, { children: [
3801
+ return /* @__PURE__ */ jsxs27(Fragment13, { children: [
3792
3802
  title ? /* @__PURE__ */ jsx78(Title2, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
3793
3803
  description ? /* @__PURE__ */ jsx78("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
3794
3804
  ] });
@@ -4335,7 +4345,7 @@ var supportedMediaNames = [
4335
4345
 
4336
4346
  // ../renderers/src/ButtonRenderer/CircularButtonRenderer.tsx
4337
4347
  import { CircularButton } from "@transferwise/components";
4338
- var import_classnames7 = __toESM(require_classnames());
4348
+ var import_classnames8 = __toESM(require_classnames());
4339
4349
  import { jsx as jsx90 } from "react/jsx-runtime";
4340
4350
  var CircularButtonRenderer = {
4341
4351
  canRenderType: "button",
@@ -4346,7 +4356,7 @@ function CircularButtonComponent(props) {
4346
4356
  var _a;
4347
4357
  const { context, disabled, margin, media, tags, title, onClick } = props;
4348
4358
  const priority = tags == null ? void 0 : tags.find((tag) => tag === "primary" || tag === "secondary");
4349
- return /* @__PURE__ */ jsx90("div", { className: (0, import_classnames7.default)(getMargin(margin), "df-button", "circular"), children: /* @__PURE__ */ jsx90(
4359
+ return /* @__PURE__ */ jsx90("div", { className: (0, import_classnames8.default)(getMargin(margin), "df-button", "circular"), children: /* @__PURE__ */ jsx90(
4350
4360
  CircularButton,
4351
4361
  {
4352
4362
  disabled,