@wise/dynamic-flow-client 3.27.0 → 3.28.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
@@ -138,12 +138,12 @@ var init_clsx = __esm({
138
138
  }
139
139
  });
140
140
 
141
- // ../../node_modules/.pnpm/@wise+art@2.16.3_@transferwise+neptune-css@14.19.1_@types+react@18.3.12_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index-a91e5689.esm.js
141
+ // ../../node_modules/.pnpm/@wise+art@2.16.3_@transferwise+neptune-css@14.20.0_@types+react@18.3.12_react-dom@18.3.1_reac_ybxnuulsvhsfhz3tk3mxo6vlti/node_modules/@wise/art/dist/index-a91e5689.esm.js
142
142
  import { useState as useState2, useEffect as useEffect2, forwardRef, Suspense, lazy } from "react";
143
143
  import { jsx as jsx17, jsxs as jsxs4, Fragment as Fragment3 } from "react/jsx-runtime";
144
144
  var unknownFlagName, Flag, Sizes, ImageSizes, imageSizes, Assets, RenderMode;
145
145
  var init_index_a91e5689_esm = __esm({
146
- "../../node_modules/.pnpm/@wise+art@2.16.3_@transferwise+neptune-css@14.19.1_@types+react@18.3.12_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index-a91e5689.esm.js"() {
146
+ "../../node_modules/.pnpm/@wise+art@2.16.3_@transferwise+neptune-css@14.20.0_@types+react@18.3.12_react-dom@18.3.1_reac_ybxnuulsvhsfhz3tk3mxo6vlti/node_modules/@wise/art/dist/index-a91e5689.esm.js"() {
147
147
  "use strict";
148
148
  init_clsx();
149
149
  unknownFlagName = "wise";
@@ -494,7 +494,7 @@ var de_default = {
494
494
  "dynamicFlows.ExternalConfirmation.open": "In neuem Tab \xF6ffnen",
495
495
  "dynamicFlows.ExternalConfirmation.title": "Bitte best\xE4tigen",
496
496
  "dynamicFlows.FileUploadSchema.maxFileSizeError": "Diese Datei ist leider zu gro\xDF. Bitte lade eine kleinere Datei hoch.",
497
- "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Sorry, that file format is not supported. Please upload a different file.",
497
+ "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Das Dateiformat wird leider nicht unterst\xFCtzt. Bitte lade eine andere Datei hoch.",
498
498
  "dynamicFlows.Help.ariaLabel": "Klicke hier f\xFCr mehr Informationen.",
499
499
  "dynamicFlows.MultiSelect.summary": "{first} und {count} weitere",
500
500
  "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "Diese Datei ist leider zu gro\xDF. Bitte lade eine kleinere Datei hoch.",
@@ -812,7 +812,7 @@ var it_default = {
812
812
  "dynamicFlows.ExternalConfirmation.open": "Apri in una nuova scheda",
813
813
  "dynamicFlows.ExternalConfirmation.title": "Conferma",
814
814
  "dynamicFlows.FileUploadSchema.maxFileSizeError": "Spiacenti, il file \xE8 troppo grande. Carica un file di dimensioni inferiori.",
815
- "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Sorry, that file format is not supported. Please upload a different file.",
815
+ "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Siamo spiacenti, questo formato di file non \xE8 supportato. Carica un file diverso.",
816
816
  "dynamicFlows.Help.ariaLabel": "Clicca qui per maggiori informazioni.",
817
817
  "dynamicFlows.MultiSelect.summary": "{first} e altri {count}",
818
818
  "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "Spiacenti, il file \xE8 troppo grande. Carica un file di dimensioni inferiori.",
@@ -971,7 +971,7 @@ var pt_default = {
971
971
  "dynamicFlows.ExternalConfirmation.open": "Abrir em uma nova aba",
972
972
  "dynamicFlows.ExternalConfirmation.title": "Por favor, confirme",
973
973
  "dynamicFlows.FileUploadSchema.maxFileSizeError": "Este arquivo \xE9 muito grande. Por favor, envie um arquivo menor.",
974
- "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Sorry, that file format is not supported. Please upload a different file.",
974
+ "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Lamentamos, mas este formato de arquivo n\xE3o \xE9 aceito. Envie um arquivo diferente.",
975
975
  "dynamicFlows.Help.ariaLabel": "Clique aqui para mais informa\xE7\xF5es.",
976
976
  "dynamicFlows.MultiSelect.summary": "{first} e mais {count} ",
977
977
  "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "Este arquivo \xE9 muito grande. Por favor, envie um arquivo menor.",
@@ -1077,7 +1077,7 @@ var ru_default = {
1077
1077
  "dynamicFlows.ExternalConfirmation.open": "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u043D\u043E\u0432\u043E\u0439 \u0432\u043A\u043B\u0430\u0434\u043A\u0435",
1078
1078
  "dynamicFlows.ExternalConfirmation.title": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435",
1079
1079
  "dynamicFlows.FileUploadSchema.maxFileSizeError": "\u0418\u0437\u0432\u0438\u043D\u0438\u0442\u0435, \u0444\u0430\u0439\u043B \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0439. \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0444\u0430\u0439\u043B \u043C\u0435\u043D\u044C\u0448\u0435\u0433\u043E \u0440\u0430\u0437\u043C\u0435\u0440\u0430.",
1080
- "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Sorry, that file format is not supported. Please upload a different file.",
1080
+ "dynamicFlows.FileUploadSchema.wrongFileTypeError": "\u042D\u0442\u043E\u0442 \u0444\u043E\u0440\u043C\u0430\u0442 \u0444\u0430\u0439\u043B\u0430 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F. \u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u043E\u0439 \u0444\u0430\u0439\u043B.",
1081
1081
  "dynamicFlows.Help.ariaLabel": "\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \u0437\u0434\u0435\u0441\u044C \u0434\u043B\u044F \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u0438\u044F \u0434\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0439 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u0438.",
1082
1082
  "dynamicFlows.MultiSelect.summary": "{first} \u0438 \u0435\u0449\u0435 {count} \u0434\u0440\u0443\u0433\u0438\u0445",
1083
1083
  "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "\u0418\u0437\u0432\u0438\u043D\u0438\u0442\u0435, \u0444\u0430\u0439\u043B \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0439. \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0444\u0430\u0439\u043B \u043C\u0435\u043D\u044C\u0448\u0435\u0433\u043E \u0440\u0430\u0437\u043C\u0435\u0440\u0430.",
@@ -1130,7 +1130,7 @@ var th_default = {
1130
1130
  "dynamicFlows.ExternalConfirmation.open": "\u0E40\u0E1B\u0E34\u0E14\u0E43\u0E19\u0E41\u0E17\u0E47\u0E1A\u0E43\u0E2B\u0E21\u0E48",
1131
1131
  "dynamicFlows.ExternalConfirmation.title": "\u0E42\u0E1B\u0E23\u0E14\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19",
1132
1132
  "dynamicFlows.FileUploadSchema.maxFileSizeError": "\u0E02\u0E2D\u0E2D\u0E20\u0E31\u0E22 \u0E44\u0E1F\u0E25\u0E4C\u0E19\u0E31\u0E49\u0E19\u0E43\u0E2B\u0E0D\u0E48\u0E40\u0E01\u0E34\u0E19\u0E44\u0E1B \u0E42\u0E1B\u0E23\u0E14\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14\u0E44\u0E1F\u0E25\u0E4C\u0E17\u0E35\u0E48\u0E21\u0E35\u0E02\u0E19\u0E32\u0E14\u0E40\u0E25\u0E47\u0E01\u0E25\u0E07",
1133
- "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Sorry, that file format is not supported. Please upload a different file.",
1133
+ "dynamicFlows.FileUploadSchema.wrongFileTypeError": "\u0E02\u0E2D\u0E2D\u0E20\u0E31\u0E22 \u0E23\u0E30\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E23\u0E2D\u0E07\u0E23\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E1F\u0E25\u0E4C\u0E14\u0E31\u0E07\u0E01\u0E25\u0E48\u0E32\u0E27 \u0E42\u0E1B\u0E23\u0E14\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14\u0E44\u0E1F\u0E25\u0E4C\u0E2D\u0E37\u0E48\u0E19",
1134
1134
  "dynamicFlows.Help.ariaLabel": "\u0E04\u0E25\u0E34\u0E01\u0E17\u0E35\u0E48\u0E19\u0E35\u0E48\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E14\u0E39\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21",
1135
1135
  "dynamicFlows.MultiSelect.summary": "{first} \u0E41\u0E25\u0E30\u0E2D\u0E35\u0E01 {count}",
1136
1136
  "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "\u0E02\u0E2D\u0E2D\u0E20\u0E31\u0E22 \u0E44\u0E1F\u0E25\u0E4C\u0E19\u0E31\u0E49\u0E19\u0E43\u0E2B\u0E0D\u0E48\u0E40\u0E01\u0E34\u0E19\u0E44\u0E1B \u0E42\u0E1B\u0E23\u0E14\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14\u0E44\u0E1F\u0E25\u0E4C\u0E17\u0E35\u0E48\u0E21\u0E35\u0E02\u0E19\u0E32\u0E14\u0E40\u0E25\u0E47\u0E01\u0E25\u0E07",
@@ -1289,7 +1289,7 @@ var zh_HK_default = {
1289
1289
  "dynamicFlows.ExternalConfirmation.open": "\u5728\u65B0\u5206\u9801\u4E2D\u958B\u555F",
1290
1290
  "dynamicFlows.ExternalConfirmation.title": "\u8ACB\u78BA\u8A8D",
1291
1291
  "dynamicFlows.FileUploadSchema.maxFileSizeError": "\u62B1\u6B49\uFF0C\u8A72\u6A94\u6848\u592A\u5927\u3002\u8ACB\u4E0A\u8F09\u4E00\u500B\u8F03\u5C0F\u7684\u6A94\u6848\u3002",
1292
- "dynamicFlows.FileUploadSchema.wrongFileTypeError": "Sorry, that file format is not supported. Please upload a different file.",
1292
+ "dynamicFlows.FileUploadSchema.wrongFileTypeError": "\u62B1\u6B49\uFF0C\u7CFB\u7D71\u4E0D\u652F\u63F4\u8A72\u6A94\u6848\u3002\u8ACB\u4E0A\u8F09\u5176\u4ED6\u6A94\u6848\u3002",
1293
1293
  "dynamicFlows.Help.ariaLabel": "\u6309\u6B64\u67E5\u770B\u8A73\u60C5\u3002",
1294
1294
  "dynamicFlows.MultiSelect.summary": "{first}\u548C\u5176\u4ED6{count}\u9805",
1295
1295
  "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "\u62B1\u6B49\uFF0C\u8A72\u6A94\u6848\u592A\u5927\u3002\u8ACB\u4E0A\u8F09\u4E00\u500B\u8F03\u5C0F\u7684\u6A94\u6848\u3002",
@@ -1576,7 +1576,7 @@ var boxComponentToProps = ({ border, control, width, margin }, children) => ({ t
1576
1576
 
1577
1577
  // src/revamp/renderers/mappers/buttonComponentToProps.ts
1578
1578
  var buttonComponentToProps = (component) => {
1579
- const { title, control, context, disabled, margin, pinOrder, size, onClick } = component;
1579
+ const { title, control, context, disabled, margin, pinOrder, size: size2, onClick } = component;
1580
1580
  return {
1581
1581
  type: "button",
1582
1582
  title,
@@ -1585,7 +1585,7 @@ var buttonComponentToProps = (component) => {
1585
1585
  disabled,
1586
1586
  margin,
1587
1587
  pinOrder,
1588
- size,
1588
+ size: size2,
1589
1589
  onClick
1590
1590
  };
1591
1591
  };
@@ -1628,14 +1628,14 @@ var headingComponentToProps = ({
1628
1628
  align,
1629
1629
  control,
1630
1630
  margin,
1631
- size,
1631
+ size: size2,
1632
1632
  text
1633
1633
  }) => ({
1634
1634
  type: "heading",
1635
1635
  align,
1636
1636
  control,
1637
1637
  margin,
1638
- size,
1638
+ size: size2,
1639
1639
  text
1640
1640
  });
1641
1641
 
@@ -1649,14 +1649,14 @@ var imageComponentToProps = ({
1649
1649
  accessibilityDescription,
1650
1650
  control,
1651
1651
  margin,
1652
- size,
1652
+ size: size2,
1653
1653
  url
1654
1654
  }) => ({
1655
1655
  type: "image",
1656
1656
  accessibilityDescription,
1657
1657
  control,
1658
1658
  margin,
1659
- size,
1659
+ size: size2,
1660
1660
  url
1661
1661
  });
1662
1662
 
@@ -1685,12 +1685,12 @@ var integerInputComponentToProps = (component) => __spreadProps(__spreadValues({
1685
1685
  var loadingIndicatorComponentToProps = ({
1686
1686
  control,
1687
1687
  margin,
1688
- size
1688
+ size: size2
1689
1689
  }) => ({
1690
1690
  type: "loading-indicator",
1691
1691
  control,
1692
1692
  margin,
1693
- size
1693
+ size: size2
1694
1694
  });
1695
1695
 
1696
1696
  // src/revamp/renderers/mappers/markdownComponentToProps.ts
@@ -5032,8 +5032,8 @@ var ZodSet = class _ZodSet extends ZodType {
5032
5032
  maxSize: { value: maxSize, message: errorUtil.toString(message) }
5033
5033
  }));
5034
5034
  }
5035
- size(size, message) {
5036
- return this.min(size, message).max(size, message);
5035
+ size(size2, message) {
5036
+ return this.min(size2, message).max(size2, message);
5037
5037
  }
5038
5038
  nonempty(message) {
5039
5039
  return this.min(1, message);
@@ -7007,7 +7007,29 @@ var getComponentCallToAction = (callToAction, onAction) => {
7007
7007
  }
7008
7008
  const { accessibilityDescription, behavior, title } = callToAction;
7009
7009
  if ("type" in behavior) {
7010
- return void 0;
7010
+ switch (behavior.type) {
7011
+ case "action": {
7012
+ const { action } = behavior;
7013
+ return {
7014
+ type: "action",
7015
+ accessibilityDescription,
7016
+ title,
7017
+ onClick: () => {
7018
+ void onAction(action);
7019
+ }
7020
+ };
7021
+ }
7022
+ case "link": {
7023
+ return {
7024
+ type: "link",
7025
+ accessibilityDescription,
7026
+ href: behavior.url,
7027
+ title
7028
+ };
7029
+ }
7030
+ default:
7031
+ return void 0;
7032
+ }
7011
7033
  }
7012
7034
  if (behavior.link) {
7013
7035
  const { url } = behavior.link;
@@ -7108,11 +7130,26 @@ var buttonLayoutToComponent = (uid, button, mapperProps) => {
7108
7130
  };
7109
7131
  var buttonLayoutToComponentWithBehavior = (uid, button, mapperProps) => {
7110
7132
  const { onAction, onLink, step } = mapperProps;
7111
- const { context, control, disabled, margin = "md", pinOrder, size, title, behavior } = button;
7133
+ const { context, control, disabled, margin = "md", pinOrder, size: size2, title, behavior } = button;
7112
7134
  const getOnClick = () => {
7113
7135
  if ("type" in behavior) {
7114
- return () => {
7115
- };
7136
+ switch (behavior.type) {
7137
+ case "action": {
7138
+ const action2 = inlineAction(behavior.action, step == null ? void 0 : step.actions);
7139
+ return () => {
7140
+ void onAction(action2);
7141
+ };
7142
+ }
7143
+ case "link": {
7144
+ const { url } = behavior;
7145
+ return () => {
7146
+ onLink(url);
7147
+ };
7148
+ }
7149
+ default:
7150
+ return () => {
7151
+ };
7152
+ }
7116
7153
  }
7117
7154
  const { action, link } = behavior;
7118
7155
  const inlinedAction = action ? inlineAction(action, step == null ? void 0 : step.actions) : null;
@@ -7136,14 +7173,14 @@ var buttonLayoutToComponentWithBehavior = (uid, button, mapperProps) => {
7136
7173
  disabled: disabled != null ? disabled : false,
7137
7174
  margin,
7138
7175
  pinOrder,
7139
- size,
7176
+ size: size2,
7140
7177
  title: title != null ? title : "",
7141
7178
  onClick: getOnClick()
7142
7179
  });
7143
7180
  };
7144
7181
  var buttonLayoutToComponentWithAction = (uid, button, mapperProps) => {
7145
7182
  const { onAction, step } = mapperProps;
7146
- const { context, control, disabled, margin = "md", pinOrder, size, title } = button;
7183
+ const { context, control, disabled, margin = "md", pinOrder, size: size2, title } = button;
7147
7184
  const { action } = button;
7148
7185
  const inlinedAction = action ? inlineAction(action, step == null ? void 0 : step.actions) : {};
7149
7186
  const onClick = () => {
@@ -7156,13 +7193,13 @@ var buttonLayoutToComponentWithAction = (uid, button, mapperProps) => {
7156
7193
  disabled: getButtonDisabled({ disabled, action: inlinedAction }),
7157
7194
  margin,
7158
7195
  pinOrder,
7159
- size,
7196
+ size: size2,
7160
7197
  title: getButtonTitle({ title, action: inlinedAction }),
7161
7198
  onClick
7162
7199
  });
7163
7200
  };
7164
7201
  var buttonLayoutToComponentWithNoop = (uid, button) => {
7165
- const { context, control, disabled, margin = "md", pinOrder, size, title } = button;
7202
+ const { context, control, disabled, margin = "md", pinOrder, size: size2, title } = button;
7166
7203
  return createButtonComponent({
7167
7204
  uid,
7168
7205
  context: mapLegacyContext(context != null ? context : "neutral"),
@@ -7170,7 +7207,7 @@ var buttonLayoutToComponentWithNoop = (uid, button) => {
7170
7207
  disabled: disabled != null ? disabled : false,
7171
7208
  margin,
7172
7209
  pinOrder,
7173
- size,
7210
+ size: size2,
7174
7211
  title: title != null ? title : "",
7175
7212
  onClick: () => {
7176
7213
  }
@@ -10005,12 +10042,12 @@ var createHeadingComponent = (headingProps) => __spreadProps(__spreadValues({
10005
10042
  });
10006
10043
 
10007
10044
  // src/revamp/domain/mappers/layout/headingLayoutToComponent.ts
10008
- var headingLayoutToComponent = (uid, { align = "left", margin = "md", size = "md", control, text }) => createHeadingComponent({
10045
+ var headingLayoutToComponent = (uid, { align = "left", margin = "md", size: size2 = "md", control, text }) => createHeadingComponent({
10009
10046
  uid,
10010
10047
  align: mapLegacyAlign(align),
10011
10048
  control,
10012
10049
  margin,
10013
- size,
10050
+ size: size2,
10014
10051
  text
10015
10052
  });
10016
10053
 
@@ -10027,12 +10064,12 @@ var createImageComponent = (imageProps) => __spreadProps(__spreadValues({
10027
10064
  });
10028
10065
 
10029
10066
  // src/revamp/domain/mappers/layout/imageLayoutToComponent.ts
10030
- var imageLayoutToComponent = (uid, { accessibilityDescription, control, margin = "md", size = "md", text, url }) => createImageComponent({
10067
+ var imageLayoutToComponent = (uid, { accessibilityDescription, control, margin = "md", size: size2 = "md", text, url }) => createImageComponent({
10031
10068
  uid,
10032
10069
  accessibilityDescription: accessibilityDescription != null ? accessibilityDescription : text,
10033
10070
  control,
10034
10071
  margin,
10035
- size,
10072
+ size: size2,
10036
10073
  url
10037
10074
  });
10038
10075
 
@@ -10093,7 +10130,7 @@ var createLoadingIndicatorComponent = (loadingIndicatorProps) => __spreadProps(_
10093
10130
  });
10094
10131
 
10095
10132
  // src/revamp/domain/mappers/layout/loadingIndicatorLayoutToComponent.ts
10096
- var loadingIndicatorLayoutToComponent = (uid, { size = "md", margin = "md", control }) => createLoadingIndicatorComponent({ uid, size, control, margin });
10133
+ var loadingIndicatorLayoutToComponent = (uid, { size: size2 = "md", margin = "md", control }) => createLoadingIndicatorComponent({ uid, size: size2, control, margin });
10097
10134
 
10098
10135
  // src/revamp/domain/mappers/layout/markdownLayoutToComponent.ts
10099
10136
  var markdownLayoutToComponent = (uid, { align = "left", margin = "md", control, content }) => createMarkdownComponent({
@@ -10194,12 +10231,36 @@ var reviewLayoutToComponent = (uid, { fields, title, callToAction, control, marg
10194
10231
  });
10195
10232
  var getReviewAction = ({ onAction, onLink, callToAction, action }) => {
10196
10233
  if (callToAction) {
10197
- const { action: ctaAction, behavior, title } = callToAction;
10234
+ const { accessibilityDescription, action: ctaAction, behavior, title } = callToAction;
10198
10235
  if (behavior) {
10199
10236
  if ("type" in behavior) {
10200
- return void 0;
10237
+ switch (behavior.type) {
10238
+ case "action": {
10239
+ const { action: behaviorAction2 } = behavior;
10240
+ return {
10241
+ accessibilityDescription,
10242
+ title,
10243
+ onClick: () => {
10244
+ void onAction(behaviorAction2);
10245
+ }
10246
+ };
10247
+ }
10248
+ case "link": {
10249
+ const { url } = behavior;
10250
+ return {
10251
+ accessibilityDescription,
10252
+ href: url,
10253
+ title,
10254
+ onClick: () => {
10255
+ onLink(url);
10256
+ }
10257
+ };
10258
+ }
10259
+ default:
10260
+ return void 0;
10261
+ }
10201
10262
  }
10202
- const { accessibilityDescription, action: behaviorAction, link } = behavior;
10263
+ const { action: behaviorAction, link } = behavior;
10203
10264
  if (behaviorAction) {
10204
10265
  return {
10205
10266
  accessibilityDescription,
@@ -10434,7 +10495,31 @@ var getItemCallToAction = (callToAction, onAction, onLink) => {
10434
10495
  }
10435
10496
  const { accessibilityDescription, behavior, title } = callToAction;
10436
10497
  if ("type" in behavior) {
10437
- return void 0;
10498
+ switch (behavior.type) {
10499
+ case "action": {
10500
+ const { action } = behavior;
10501
+ return {
10502
+ accessibilityDescription,
10503
+ title,
10504
+ onClick: () => {
10505
+ void onAction(action);
10506
+ }
10507
+ };
10508
+ }
10509
+ case "link": {
10510
+ const { url } = behavior;
10511
+ return {
10512
+ accessibilityDescription,
10513
+ href: url,
10514
+ title,
10515
+ onClick: () => {
10516
+ void onLink(url);
10517
+ }
10518
+ };
10519
+ }
10520
+ default:
10521
+ return void 0;
10522
+ }
10438
10523
  }
10439
10524
  if (behavior.action) {
10440
10525
  const { action } = behavior;
@@ -11340,8 +11425,8 @@ var useRendererHttpClient = () => {
11340
11425
  import { Alert as Alert2 } from "@transferwise/components";
11341
11426
 
11342
11427
  // ../renderers/src/utils/layout-utils.ts
11343
- var getMargin = (size) => {
11344
- switch (size) {
11428
+ var getMargin = (size2) => {
11429
+ switch (size2) {
11345
11430
  case "xs":
11346
11431
  return "m-b-0";
11347
11432
  case "sm":
@@ -11515,13 +11600,14 @@ var import_classnames = __toESM(require_classnames());
11515
11600
  import { jsx as jsx12 } from "react/jsx-runtime";
11516
11601
  var BoxRenderer = {
11517
11602
  canRenderType: "box",
11518
- render: ({ border, children, margin, width }) => {
11603
+ render: ({ border, children, control, margin, width }) => {
11519
11604
  const hasFixedWidth = width !== "xl";
11605
+ const hasBorder = control === "bordered" || control === "bordered-web" || border;
11520
11606
  const contents = /* @__PURE__ */ jsx12(
11521
11607
  "div",
11522
11608
  {
11523
11609
  className: (0, import_classnames.default)({
11524
- "df-box-renderer-border": border,
11610
+ "df-box-renderer-border": hasBorder,
11525
11611
  [`df-box-renderer-width-${width}`]: hasFixedWidth,
11526
11612
  [getMargin(margin)]: !hasFixedWidth
11527
11613
  }),
@@ -11562,7 +11648,7 @@ function ButtonRendererComponent({
11562
11648
  disabled,
11563
11649
  margin,
11564
11650
  title,
11565
- size,
11651
+ size: size2,
11566
11652
  onClick
11567
11653
  }) {
11568
11654
  const className = getMargin(margin);
@@ -11576,7 +11662,7 @@ function ButtonRendererComponent({
11576
11662
  className,
11577
11663
  disabled: isLoading || disabled,
11578
11664
  priority: mapControl(control),
11579
- size: mapSize(size),
11665
+ size: mapSize(size2),
11580
11666
  type,
11581
11667
  onClick,
11582
11668
  children: title
@@ -11601,11 +11687,11 @@ var mapControl = (control) => {
11601
11687
  return "secondary";
11602
11688
  }
11603
11689
  };
11604
- var mapSize = (size) => {
11605
- if (!size) {
11690
+ var mapSize = (size2) => {
11691
+ if (!size2) {
11606
11692
  return void 0;
11607
11693
  }
11608
- switch (size) {
11694
+ switch (size2) {
11609
11695
  case "xs":
11610
11696
  case "sm":
11611
11697
  return "sm";
@@ -11764,7 +11850,7 @@ var DateInputRenderer_default = DateInputRenderer;
11764
11850
  // ../renderers/src/DecisionRenderer.tsx
11765
11851
  import { NavigationOptionsList, NavigationOption, Header } from "@transferwise/components";
11766
11852
 
11767
- // ../../node_modules/.pnpm/@wise+art@2.16.3_@transferwise+neptune-css@14.19.1_@types+react@18.3.12_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index.esm.js
11853
+ // ../../node_modules/.pnpm/@wise+art@2.16.3_@transferwise+neptune-css@14.20.0_@types+react@18.3.12_react-dom@18.3.1_reac_ybxnuulsvhsfhz3tk3mxo6vlti/node_modules/@wise/art/dist/index.esm.js
11768
11854
  init_index_a91e5689_esm();
11769
11855
  init_clsx();
11770
11856
  import "react";
@@ -11902,15 +11988,15 @@ var HeadingRenderer = {
11902
11988
  render: (props) => /* @__PURE__ */ jsx26(Heading, __spreadValues({}, props))
11903
11989
  };
11904
11990
  function Heading(props) {
11905
- const { text, size, align, margin, control } = props;
11991
+ const { text, size: size2, align, margin, control } = props;
11906
11992
  const className = getTextAlignmentAndMargin({ align, margin });
11907
- return control === "display" ? /* @__PURE__ */ jsx26(DisplayHeading, { size, text, className }) : /* @__PURE__ */ jsx26(StandardHeading, { size, text, className });
11993
+ return control === "display" ? /* @__PURE__ */ jsx26(DisplayHeading, { size: size2, text, className }) : /* @__PURE__ */ jsx26(StandardHeading, { size: size2, text, className });
11908
11994
  }
11909
- function DisplayHeading({ size, text, className }) {
11910
- return /* @__PURE__ */ jsx26(Display, { type: getDisplayType(size), className, children: text });
11995
+ function DisplayHeading({ size: size2, text, className }) {
11996
+ return /* @__PURE__ */ jsx26(Display, { type: getDisplayType(size2), className, children: text });
11911
11997
  }
11912
- function StandardHeading({ size, text, className }) {
11913
- switch (size) {
11998
+ function StandardHeading({ size: size2, text, className }) {
11999
+ switch (size2) {
11914
12000
  case "xs":
11915
12001
  return /* @__PURE__ */ jsx26("h5", { className, children: text });
11916
12002
  case "sm":
@@ -11924,8 +12010,8 @@ function StandardHeading({ size, text, className }) {
11924
12010
  return /* @__PURE__ */ jsx26("h3", { className, children: text });
11925
12011
  }
11926
12012
  }
11927
- var getDisplayType = (size) => {
11928
- switch (size) {
12013
+ var getDisplayType = (size2) => {
12014
+ switch (size2) {
11929
12015
  case "xs":
11930
12016
  case "sm":
11931
12017
  return "display-small";
@@ -11960,7 +12046,7 @@ var ImageRenderer_default = ImageRenderer;
11960
12046
  function ImageRendererComponent({
11961
12047
  accessibilityDescription,
11962
12048
  margin,
11963
- size,
12049
+ size: size2,
11964
12050
  url
11965
12051
  }) {
11966
12052
  const [imageSource, setImageSource] = useState3("");
@@ -11968,7 +12054,7 @@ function ImageRendererComponent({
11968
12054
  useEffect3(() => {
11969
12055
  void getImageSource(httpClient, url).then(setImageSource);
11970
12056
  }, [url, httpClient]);
11971
- return /* @__PURE__ */ jsx27("div", { className: `df-image ${size || "md"}`, children: /* @__PURE__ */ jsx27(
12057
+ return /* @__PURE__ */ jsx27("div", { className: `df-image ${size2 || "md"}`, children: /* @__PURE__ */ jsx27(
11972
12058
  Image,
11973
12059
  {
11974
12060
  className: `img-responsive ${getMargin(margin)}`,
@@ -12030,7 +12116,7 @@ var InstructionsRenderer = {
12030
12116
  var InstructionsRenderer_default = InstructionsRenderer;
12031
12117
 
12032
12118
  // ../renderers/src/IntegerInputRenderer.tsx
12033
- import { Input } from "@transferwise/components";
12119
+ import { Input, InputGroup } from "@transferwise/components";
12034
12120
 
12035
12121
  // ../renderers/src/utils/input-utils.ts
12036
12122
  var onWheel = (event) => {
@@ -12039,13 +12125,71 @@ var onWheel = (event) => {
12039
12125
  }
12040
12126
  };
12041
12127
 
12042
- // ../renderers/src/IntegerInputRenderer.tsx
12128
+ // ../renderers/src/utils/getIconAvatar.tsx
12129
+ import { Avatar as Avatar2, AvatarType as AvatarType2 } from "@transferwise/components";
12043
12130
  import { jsx as jsx29 } from "react/jsx-runtime";
12131
+ var size = 24;
12132
+ function getIconAvatar({ icon, image }) {
12133
+ if (image == null ? void 0 : image.url) {
12134
+ return /* @__PURE__ */ jsx29(
12135
+ "img",
12136
+ {
12137
+ src: image.url,
12138
+ alt: image.accessibilityDescription,
12139
+ width: `${size}px`,
12140
+ height: `${size}px`
12141
+ }
12142
+ );
12143
+ }
12144
+ if (isFlagIcon2(icon)) {
12145
+ return /* @__PURE__ */ jsx29(Avatar2, { type: AvatarType2.ICON, size, children: /* @__PURE__ */ jsx29(DynamicIcon_default, { name: icon.name }) });
12146
+ }
12147
+ if (isNamedIcon2(icon)) {
12148
+ return /* @__PURE__ */ jsx29(DynamicIcon_default, { name: icon.name });
12149
+ }
12150
+ if (icon && "text" in icon) {
12151
+ return /* @__PURE__ */ jsx29(Avatar2, { type: AvatarType2.ICON, size, children: icon.text });
12152
+ }
12153
+ return null;
12154
+ }
12155
+ var isNamedIcon2 = (icon) => icon ? "name" in icon : false;
12156
+ var isFlagIcon2 = (icon) => isNamedIcon2(icon) && icon.name.startsWith("flag-");
12157
+
12158
+ // ../renderers/src/utils/getInputGroupAddonStart.tsx
12159
+ var getInputGroupAddonStart = ({ icon, image }) => {
12160
+ const content = getIconAvatar({ icon, image });
12161
+ return content ? { content } : void 0;
12162
+ };
12163
+
12164
+ // ../renderers/src/IntegerInputRenderer.tsx
12165
+ import { jsx as jsx30 } from "react/jsx-runtime";
12044
12166
  var IntegerInputRenderer = {
12045
12167
  canRenderType: "input-integer",
12046
12168
  render: (props) => {
12047
- const _a = props, { id, label, description, help, type, validationState, value, onChange } = _a, rest = __objRest(_a, ["id", "label", "description", "help", "type", "validationState", "value", "onChange"]);
12048
- return /* @__PURE__ */ jsx29(
12169
+ const _a = props, {
12170
+ id,
12171
+ label,
12172
+ description,
12173
+ help,
12174
+ icon,
12175
+ image,
12176
+ type,
12177
+ validationState,
12178
+ value,
12179
+ onChange
12180
+ } = _a, rest = __objRest(_a, [
12181
+ "id",
12182
+ "label",
12183
+ "description",
12184
+ "help",
12185
+ "icon",
12186
+ "image",
12187
+ "type",
12188
+ "validationState",
12189
+ "value",
12190
+ "onChange"
12191
+ ]);
12192
+ return /* @__PURE__ */ jsx30(
12049
12193
  FieldInput_default,
12050
12194
  {
12051
12195
  id,
@@ -12053,7 +12197,7 @@ var IntegerInputRenderer = {
12053
12197
  description,
12054
12198
  validation: validationState,
12055
12199
  help,
12056
- children: /* @__PURE__ */ jsx29(
12200
+ children: /* @__PURE__ */ jsx30(InputGroup, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ jsx30(
12057
12201
  Input,
12058
12202
  __spreadValues({
12059
12203
  id,
@@ -12068,7 +12212,7 @@ var IntegerInputRenderer = {
12068
12212
  },
12069
12213
  onWheel
12070
12214
  }, rest)
12071
- )
12215
+ ) })
12072
12216
  }
12073
12217
  );
12074
12218
  }
@@ -12077,13 +12221,13 @@ var IntegerInputRenderer_default = IntegerInputRenderer;
12077
12221
 
12078
12222
  // ../renderers/src/LoadingIndicatorRenderer.tsx
12079
12223
  import { Loader } from "@transferwise/components";
12080
- import { jsx as jsx30 } from "react/jsx-runtime";
12224
+ import { jsx as jsx31 } from "react/jsx-runtime";
12081
12225
  var LoadingIndicatorRenderer = {
12082
12226
  canRenderType: "loading-indicator",
12083
- render: ({ margin, size }) => /* @__PURE__ */ jsx30(
12227
+ render: ({ margin, size: size2 }) => /* @__PURE__ */ jsx31(
12084
12228
  Loader,
12085
12229
  {
12086
- size,
12230
+ size: size2,
12087
12231
  classNames: { "tw-loader": `tw-loader m-x-auto ${getMargin(margin)}` },
12088
12232
  "data-testid": "loading-indicator"
12089
12233
  }
@@ -12093,28 +12237,28 @@ var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
12093
12237
 
12094
12238
  // ../renderers/src/MarkdownRenderer.tsx
12095
12239
  import { Markdown as Markdown2 } from "@transferwise/components";
12096
- import { jsx as jsx31 } from "react/jsx-runtime";
12240
+ import { jsx as jsx32 } from "react/jsx-runtime";
12097
12241
  var MarkdownRenderer = {
12098
12242
  canRenderType: "markdown",
12099
- render: ({ content, align, margin }) => /* @__PURE__ */ jsx31("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ jsx31(Markdown2, { config: { link: { target: "_blank" } }, children: content }) })
12243
+ render: ({ content, align, margin }) => /* @__PURE__ */ jsx32("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ jsx32(Markdown2, { config: { link: { target: "_blank" } }, children: content }) })
12100
12244
  };
12101
12245
  var MarkdownRenderer_default = MarkdownRenderer;
12102
12246
 
12103
12247
  // ../renderers/src/ModalRenderer.tsx
12104
12248
  import { Button as Button2, Modal } from "@transferwise/components";
12105
12249
  import { useState as useState4 } from "react";
12106
- import { jsx as jsx32, jsxs as jsxs8 } from "react/jsx-runtime";
12250
+ import { jsx as jsx33, jsxs as jsxs8 } from "react/jsx-runtime";
12107
12251
  var ModalRenderer = {
12108
12252
  canRenderType: "modal",
12109
- render: (props) => /* @__PURE__ */ jsx32(DFModal, __spreadValues({}, props))
12253
+ render: (props) => /* @__PURE__ */ jsx33(DFModal, __spreadValues({}, props))
12110
12254
  };
12111
12255
  var ModalRenderer_default = ModalRenderer;
12112
12256
  function DFModal({ content, margin, trigger }) {
12113
12257
  const [visible, setVisible] = useState4(false);
12114
12258
  const { components, title } = content;
12115
12259
  return /* @__PURE__ */ jsxs8("div", { className: getMargin(margin), children: [
12116
- /* @__PURE__ */ jsx32(Button2, { priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
12117
- /* @__PURE__ */ jsx32(
12260
+ /* @__PURE__ */ jsx33(Button2, { priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
12261
+ /* @__PURE__ */ jsx33(
12118
12262
  Modal,
12119
12263
  {
12120
12264
  scroll: "content",
@@ -12132,17 +12276,17 @@ function DFModal({ content, margin, trigger }) {
12132
12276
  import { SelectInput, SelectInputOptionContent } from "@transferwise/components";
12133
12277
 
12134
12278
  // ../renderers/src/SelectInputRenderer/OptionMedia.tsx
12135
- import { Avatar as Avatar2, AvatarType as AvatarType2 } from "@transferwise/components";
12136
- import { jsx as jsx33 } from "react/jsx-runtime";
12279
+ import { Avatar as Avatar3, AvatarType as AvatarType3 } from "@transferwise/components";
12280
+ import { jsx as jsx34 } from "react/jsx-runtime";
12137
12281
  function OptionMedia({ icon, image }) {
12138
12282
  if (image == null ? void 0 : image.url) {
12139
- return /* @__PURE__ */ jsx33("img", { src: image.url, alt: image.accessibilityDescription || "", width: "64px" });
12283
+ return /* @__PURE__ */ jsx34("img", { src: image.url, alt: image.accessibilityDescription || "", width: "64px" });
12140
12284
  }
12141
12285
  if (icon && "name" in icon) {
12142
- return /* @__PURE__ */ jsx33(Avatar2, { type: AvatarType2.ICON, children: /* @__PURE__ */ jsx33(DynamicIcon_default, { name: icon.name }) });
12286
+ return /* @__PURE__ */ jsx34(Avatar3, { type: AvatarType3.ICON, children: /* @__PURE__ */ jsx34(DynamicIcon_default, { name: icon.name }) });
12143
12287
  }
12144
12288
  if (icon && "text" in icon) {
12145
- return /* @__PURE__ */ jsx33(Avatar2, { type: AvatarType2.INITIALS, children: icon.text });
12289
+ return /* @__PURE__ */ jsx34(Avatar3, { type: AvatarType3.INITIALS, children: icon.text });
12146
12290
  }
12147
12291
  return null;
12148
12292
  }
@@ -12162,10 +12306,10 @@ var multi_select_messages_default = defineMessages7({
12162
12306
 
12163
12307
  // ../renderers/src/MultiSelectInputRenderer.tsx
12164
12308
  import { useState as useState5 } from "react";
12165
- import { jsx as jsx34 } from "react/jsx-runtime";
12309
+ import { jsx as jsx35 } from "react/jsx-runtime";
12166
12310
  var MultiSelectInputRenderer = {
12167
12311
  canRenderType: "input-multi-select",
12168
- render: (props) => /* @__PURE__ */ jsx34(MultiSelectInputRendererComponent, __spreadValues({}, props))
12312
+ render: (props) => /* @__PURE__ */ jsx35(MultiSelectInputRendererComponent, __spreadValues({}, props))
12169
12313
  };
12170
12314
  function MultiSelectInputRendererComponent(props) {
12171
12315
  const { formatMessage } = useIntl4();
@@ -12207,12 +12351,12 @@ function MultiSelectInputRendererComponent(props) {
12207
12351
  const contentProps = {
12208
12352
  title: option.title,
12209
12353
  description: option.description,
12210
- icon: /* @__PURE__ */ jsx34(OptionMedia, { icon: option.icon, image: option.image })
12354
+ icon: /* @__PURE__ */ jsx35(OptionMedia, { icon: option.icon, image: option.image })
12211
12355
  };
12212
- return /* @__PURE__ */ jsx34(SelectInputOptionContent, __spreadValues({}, contentProps));
12356
+ return /* @__PURE__ */ jsx35(SelectInputOptionContent, __spreadValues({}, contentProps));
12213
12357
  };
12214
12358
  const extraProps = { autoComplete };
12215
- return /* @__PURE__ */ jsx34(
12359
+ return /* @__PURE__ */ jsx35(
12216
12360
  FieldInput_default,
12217
12361
  {
12218
12362
  id,
@@ -12220,7 +12364,7 @@ function MultiSelectInputRendererComponent(props) {
12220
12364
  help,
12221
12365
  description,
12222
12366
  validation: validationState,
12223
- children: /* @__PURE__ */ jsx34(
12367
+ children: /* @__PURE__ */ jsx35(
12224
12368
  SelectInput,
12225
12369
  __spreadValues({
12226
12370
  id,
@@ -12264,7 +12408,7 @@ import { UploadInput } from "@transferwise/components";
12264
12408
  // ../renderers/src/components/UploadFieldInput.tsx
12265
12409
  var import_classnames3 = __toESM(require_classnames());
12266
12410
  import { InlineAlert } from "@transferwise/components";
12267
- import { jsx as jsx35, jsxs as jsxs9 } from "react/jsx-runtime";
12411
+ import { jsx as jsx36, jsxs as jsxs9 } from "react/jsx-runtime";
12268
12412
  function UploadFieldInput({
12269
12413
  id,
12270
12414
  children,
@@ -12273,7 +12417,7 @@ function UploadFieldInput({
12273
12417
  help,
12274
12418
  validation
12275
12419
  }) {
12276
- const labelContent = label && help ? /* @__PURE__ */ jsx35(LabelContentWithHelp, { text: label, help }) : label;
12420
+ const labelContent = label && help ? /* @__PURE__ */ jsx36(LabelContentWithHelp, { text: label, help }) : label;
12277
12421
  const descriptionId = description ? `${id}-description` : void 0;
12278
12422
  return /* @__PURE__ */ jsxs9(
12279
12423
  "div",
@@ -12282,9 +12426,9 @@ function UploadFieldInput({
12282
12426
  "has-error": (validation == null ? void 0 : validation.status) === "invalid"
12283
12427
  }),
12284
12428
  children: [
12285
- /* @__PURE__ */ jsx35("label", { htmlFor: id, className: "control-label", children: labelContent }),
12429
+ /* @__PURE__ */ jsx36("label", { htmlFor: id, className: "control-label", children: labelContent }),
12286
12430
  children,
12287
- (validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ jsx35(InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
12431
+ (validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ jsx36(InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
12288
12432
  ]
12289
12433
  }
12290
12434
  );
@@ -12316,7 +12460,7 @@ var getFileType = (base64Url) => {
12316
12460
  var getRandomId = () => Math.random().toString(36).substring(2);
12317
12461
 
12318
12462
  // ../renderers/src/MultiUploadInputRenderer.tsx
12319
- import { jsx as jsx36 } from "react/jsx-runtime";
12463
+ import { jsx as jsx37 } from "react/jsx-runtime";
12320
12464
  var MultiUploadInputRenderer = {
12321
12465
  canRenderType: "input-upload-multi",
12322
12466
  render: (props) => {
@@ -12343,7 +12487,7 @@ var MultiUploadInputRenderer = {
12343
12487
  };
12344
12488
  const onDeleteFile = async (fileId) => onDelete(String(fileId));
12345
12489
  const descriptionId = description ? `${id}-description` : void 0;
12346
- return /* @__PURE__ */ jsx36(
12490
+ return /* @__PURE__ */ jsx37(
12347
12491
  UploadFieldInput_default,
12348
12492
  {
12349
12493
  id,
@@ -12351,7 +12495,7 @@ var MultiUploadInputRenderer = {
12351
12495
  description,
12352
12496
  validation: validationState,
12353
12497
  help,
12354
- children: /* @__PURE__ */ jsx36(
12498
+ children: /* @__PURE__ */ jsx37(
12355
12499
  UploadInput,
12356
12500
  {
12357
12501
  id,
@@ -12374,13 +12518,35 @@ var MultiUploadInputRenderer = {
12374
12518
  var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
12375
12519
 
12376
12520
  // ../renderers/src/NumberInputRenderer.tsx
12377
- import { Input as Input2 } from "@transferwise/components";
12378
- import { jsx as jsx37 } from "react/jsx-runtime";
12521
+ import { Input as Input2, InputGroup as InputGroup2 } from "@transferwise/components";
12522
+ import { jsx as jsx38 } from "react/jsx-runtime";
12379
12523
  var NumberInputRenderer = {
12380
12524
  canRenderType: "input-number",
12381
12525
  render: (props) => {
12382
- const _a = props, { id, label, description, help, type, validationState, value, onChange } = _a, rest = __objRest(_a, ["id", "label", "description", "help", "type", "validationState", "value", "onChange"]);
12383
- return /* @__PURE__ */ jsx37(
12526
+ const _a = props, {
12527
+ id,
12528
+ label,
12529
+ description,
12530
+ help,
12531
+ icon,
12532
+ image,
12533
+ type,
12534
+ validationState,
12535
+ value,
12536
+ onChange
12537
+ } = _a, rest = __objRest(_a, [
12538
+ "id",
12539
+ "label",
12540
+ "description",
12541
+ "help",
12542
+ "icon",
12543
+ "image",
12544
+ "type",
12545
+ "validationState",
12546
+ "value",
12547
+ "onChange"
12548
+ ]);
12549
+ return /* @__PURE__ */ jsx38(
12384
12550
  FieldInput_default,
12385
12551
  {
12386
12552
  id,
@@ -12388,7 +12554,7 @@ var NumberInputRenderer = {
12388
12554
  description,
12389
12555
  validation: validationState,
12390
12556
  help,
12391
- children: /* @__PURE__ */ jsx37(
12557
+ children: /* @__PURE__ */ jsx38(InputGroup2, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ jsx38(
12392
12558
  Input2,
12393
12559
  __spreadValues({
12394
12560
  id,
@@ -12401,7 +12567,7 @@ var NumberInputRenderer = {
12401
12567
  },
12402
12568
  onWheel
12403
12569
  }, rest)
12404
- )
12570
+ ) })
12405
12571
  }
12406
12572
  );
12407
12573
  }
@@ -12440,17 +12606,17 @@ var paragraph_messages_default = defineMessages8({
12440
12606
  });
12441
12607
 
12442
12608
  // ../renderers/src/ParagraphRenderer.tsx
12443
- import { jsx as jsx38, jsxs as jsxs10 } from "react/jsx-runtime";
12609
+ import { jsx as jsx39, jsxs as jsxs10 } from "react/jsx-runtime";
12444
12610
  var ParagraphRenderer = {
12445
12611
  canRenderType: "paragraph",
12446
- render: (props) => /* @__PURE__ */ jsx38(Paragraph, __spreadValues({}, props))
12612
+ render: (props) => /* @__PURE__ */ jsx39(Paragraph, __spreadValues({}, props))
12447
12613
  };
12448
12614
  function Paragraph({ align, control, margin, text }) {
12449
12615
  const className = getTextAlignmentAndMargin({ align, margin });
12450
- return control === "copyable" ? /* @__PURE__ */ jsx38(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ jsx38(StandardParagraph, { className, text });
12616
+ return control === "copyable" ? /* @__PURE__ */ jsx39(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ jsx39(StandardParagraph, { className, text });
12451
12617
  }
12452
12618
  function StandardParagraph({ text, className }) {
12453
- return /* @__PURE__ */ jsx38("p", { className: `np-text-body-large ${className}`, children: text });
12619
+ return /* @__PURE__ */ jsx39("p", { className: `np-text-body-large ${className}`, children: text });
12454
12620
  }
12455
12621
  function CopyableParagraph({
12456
12622
  text,
@@ -12465,7 +12631,7 @@ function CopyableParagraph({
12465
12631
  };
12466
12632
  const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
12467
12633
  return /* @__PURE__ */ jsxs10("div", { className, children: [
12468
- /* @__PURE__ */ jsx38(
12634
+ /* @__PURE__ */ jsx39(
12469
12635
  Input3,
12470
12636
  {
12471
12637
  type: "text",
@@ -12474,7 +12640,7 @@ function CopyableParagraph({
12474
12640
  className: (0, import_classnames4.default)("text-ellipsis", inputAlignmentClasses)
12475
12641
  }
12476
12642
  ),
12477
- /* @__PURE__ */ jsx38(Button3, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
12643
+ /* @__PURE__ */ jsx39(Button3, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
12478
12644
  ] });
12479
12645
  }
12480
12646
  var ParagraphRenderer_default = ParagraphRenderer;
@@ -12512,10 +12678,10 @@ var repeatable_messages_default = defineMessages9({
12512
12678
 
12513
12679
  // ../renderers/src/RepeatableRenderer.tsx
12514
12680
  var import_classnames5 = __toESM(require_classnames());
12515
- import { Fragment as Fragment4, jsx as jsx39, jsxs as jsxs11 } from "react/jsx-runtime";
12681
+ import { Fragment as Fragment4, jsx as jsx40, jsxs as jsxs11 } from "react/jsx-runtime";
12516
12682
  var RepeatableRenderer = {
12517
12683
  canRenderType: "repeatable",
12518
- render: (props) => /* @__PURE__ */ jsx39(Repeatable, __spreadValues({}, props))
12684
+ render: (props) => /* @__PURE__ */ jsx40(Repeatable, __spreadValues({}, props))
12519
12685
  };
12520
12686
  function Repeatable(props) {
12521
12687
  const {
@@ -12555,8 +12721,8 @@ function Repeatable(props) {
12555
12721
  setOpenModalType(null);
12556
12722
  };
12557
12723
  return /* @__PURE__ */ jsxs11(Fragment4, { children: [
12558
- title && /* @__PURE__ */ jsx39(Header4, { title }),
12559
- description && /* @__PURE__ */ jsx39("p", { children: description }),
12724
+ title && /* @__PURE__ */ jsx40(Header4, { title }),
12725
+ description && /* @__PURE__ */ jsx40("p", { children: description }),
12560
12726
  /* @__PURE__ */ jsxs11(
12561
12727
  "div",
12562
12728
  {
@@ -12564,30 +12730,30 @@ function Repeatable(props) {
12564
12730
  "has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
12565
12731
  }),
12566
12732
  children: [
12567
- items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsx39(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
12568
- /* @__PURE__ */ jsx39(
12733
+ items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsx40(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
12734
+ /* @__PURE__ */ jsx40(
12569
12735
  NavigationOption2,
12570
12736
  {
12571
- media: /* @__PURE__ */ jsx39(Plus, {}),
12737
+ media: /* @__PURE__ */ jsx40(Plus, {}),
12572
12738
  title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
12573
12739
  showMediaAtAllSizes: true,
12574
12740
  onClick: () => onAddItem()
12575
12741
  }
12576
12742
  ),
12577
- (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ jsx39(InlineAlert2, { type: "negative", children: validationState.message })
12743
+ (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ jsx40(InlineAlert2, { type: "negative", children: validationState.message })
12578
12744
  ]
12579
12745
  }
12580
12746
  ),
12581
- /* @__PURE__ */ jsx39(
12747
+ /* @__PURE__ */ jsx40(
12582
12748
  Modal2,
12583
12749
  {
12584
12750
  open: openModalType !== null,
12585
12751
  title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
12586
12752
  body: /* @__PURE__ */ jsxs11(Fragment4, { children: [
12587
- /* @__PURE__ */ jsx39("div", { className: "m-b-2", children: editableItem }),
12753
+ /* @__PURE__ */ jsx40("div", { className: "m-b-2", children: editableItem }),
12588
12754
  /* @__PURE__ */ jsxs11("div", { children: [
12589
- /* @__PURE__ */ jsx39(Button4, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
12590
- /* @__PURE__ */ jsx39(Button4, { priority: "secondary", type: "negative", block: true, onClick: () => onRemoveItem(), children: formatMessage(repeatable_messages_default.removeItem) })
12755
+ /* @__PURE__ */ jsx40(Button4, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
12756
+ /* @__PURE__ */ jsx40(Button4, { priority: "secondary", type: "negative", block: true, onClick: () => onRemoveItem(), children: formatMessage(repeatable_messages_default.removeItem) })
12591
12757
  ] })
12592
12758
  ] }),
12593
12759
  onClose: () => onCancelEdit()
@@ -12599,10 +12765,10 @@ function ItemSummaryOption({
12599
12765
  item,
12600
12766
  onClick
12601
12767
  }) {
12602
- return /* @__PURE__ */ jsx39(
12768
+ return /* @__PURE__ */ jsx40(
12603
12769
  NavigationOption2,
12604
12770
  {
12605
- media: /* @__PURE__ */ jsx39(NavigationOptionMedia, __spreadValues({}, item)),
12771
+ media: /* @__PURE__ */ jsx40(NavigationOptionMedia, __spreadValues({}, item)),
12606
12772
  title: item.title,
12607
12773
  content: item.description,
12608
12774
  showMediaAtAllSizes: true,
@@ -12640,7 +12806,7 @@ var generic_error_messages_default2 = defineMessages10({
12640
12806
 
12641
12807
  // ../renderers/src/SearchRenderer/ErrorResult.tsx
12642
12808
  import { Button as Button5 } from "@transferwise/components";
12643
- import { jsx as jsx40, jsxs as jsxs12 } from "react/jsx-runtime";
12809
+ import { jsx as jsx41, jsxs as jsxs12 } from "react/jsx-runtime";
12644
12810
  function ErrorResult({ state }) {
12645
12811
  const intl = useIntl7();
12646
12812
  const buttonVisualProps = {
@@ -12651,7 +12817,7 @@ function ErrorResult({ state }) {
12651
12817
  return /* @__PURE__ */ jsxs12("p", { className: "m-t-2", children: [
12652
12818
  intl.formatMessage(generic_error_messages_default2.genericError),
12653
12819
  "\xA0",
12654
- /* @__PURE__ */ jsx40(
12820
+ /* @__PURE__ */ jsx41(
12655
12821
  Button5,
12656
12822
  __spreadProps(__spreadValues({}, buttonVisualProps), {
12657
12823
  onClick: () => {
@@ -12678,7 +12844,7 @@ var search_messages_default = defineMessages11({
12678
12844
 
12679
12845
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
12680
12846
  import { useIntl as useIntl8 } from "react-intl";
12681
- import { Fragment as Fragment5, jsx as jsx41, jsxs as jsxs13 } from "react/jsx-runtime";
12847
+ import { Fragment as Fragment5, jsx as jsx42, jsxs as jsxs13 } from "react/jsx-runtime";
12682
12848
  function BlockSearchRendererComponent({
12683
12849
  id,
12684
12850
  isLoading,
@@ -12692,7 +12858,7 @@ function BlockSearchRendererComponent({
12692
12858
  const trackEvent = useTrackEvent();
12693
12859
  const { formatMessage } = useIntl8();
12694
12860
  return /* @__PURE__ */ jsxs13("div", { className: getMargin(margin), children: [
12695
- /* @__PURE__ */ jsx41(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx41(
12861
+ /* @__PURE__ */ jsx42(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx42(
12696
12862
  Input4,
12697
12863
  {
12698
12864
  id,
@@ -12709,7 +12875,7 @@ function BlockSearchRendererComponent({
12709
12875
  }
12710
12876
  }
12711
12877
  ) }),
12712
- isLoading ? /* @__PURE__ */ jsx41(Fragment5, { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ jsx41(SearchResultContent, { state, onChange })
12878
+ isLoading ? /* @__PURE__ */ jsx42(Fragment5, { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ jsx42(SearchResultContent, { state, onChange })
12713
12879
  ] });
12714
12880
  }
12715
12881
  function SearchResultContent({
@@ -12718,26 +12884,26 @@ function SearchResultContent({
12718
12884
  }) {
12719
12885
  switch (state.type) {
12720
12886
  case "error":
12721
- return /* @__PURE__ */ jsx41(ErrorResult, { state });
12887
+ return /* @__PURE__ */ jsx42(ErrorResult, { state });
12722
12888
  case "results":
12723
- return /* @__PURE__ */ jsx41(SearchResults, { state, onChange });
12889
+ return /* @__PURE__ */ jsx42(SearchResults, { state, onChange });
12724
12890
  case "noResults":
12725
- return /* @__PURE__ */ jsx41(EmptySearchResult, { state });
12891
+ return /* @__PURE__ */ jsx42(EmptySearchResult, { state });
12726
12892
  case "pending":
12727
12893
  default:
12728
12894
  return null;
12729
12895
  }
12730
12896
  }
12731
12897
  function EmptySearchResult({ state }) {
12732
- return /* @__PURE__ */ jsx41(Markdown3, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
12898
+ return /* @__PURE__ */ jsx42(Markdown3, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
12733
12899
  }
12734
12900
  function SearchResults({
12735
12901
  state
12736
12902
  }) {
12737
12903
  const trackEvent = useTrackEvent();
12738
- return /* @__PURE__ */ jsx41(NavigationOptionsList2, { children: state.results.map((result) => {
12904
+ return /* @__PURE__ */ jsx42(NavigationOptionsList2, { children: state.results.map((result) => {
12739
12905
  const { icon, image } = result;
12740
- return /* @__PURE__ */ jsx41(
12906
+ return /* @__PURE__ */ jsx42(
12741
12907
  NavigationOption3,
12742
12908
  {
12743
12909
  title: result.title,
@@ -12763,7 +12929,7 @@ import { Markdown as Markdown4, Typeahead } from "@transferwise/components";
12763
12929
  import { Search } from "@transferwise/icons";
12764
12930
  import { useState as useState8 } from "react";
12765
12931
  import { useIntl as useIntl9 } from "react-intl";
12766
- import { jsx as jsx42 } from "react/jsx-runtime";
12932
+ import { jsx as jsx43 } from "react/jsx-runtime";
12767
12933
  function InlineSearchRenderer({
12768
12934
  id,
12769
12935
  isLoading,
@@ -12775,7 +12941,7 @@ function InlineSearchRenderer({
12775
12941
  const [hasSearched, setHasSearched] = useState8(false);
12776
12942
  const trackEvent = useTrackEvent();
12777
12943
  const intl = useIntl9();
12778
- return /* @__PURE__ */ jsx42("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx42(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx42(
12944
+ return /* @__PURE__ */ jsx43("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx43(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx43(
12779
12945
  Typeahead,
12780
12946
  {
12781
12947
  id: "typeahead-input-id",
@@ -12783,10 +12949,10 @@ function InlineSearchRenderer({
12783
12949
  name: "typeahead-input-name",
12784
12950
  size: "md",
12785
12951
  maxHeight: 100,
12786
- footer: /* @__PURE__ */ jsx42(TypeaheadFooter, { state, isLoading }),
12952
+ footer: /* @__PURE__ */ jsx43(TypeaheadFooter, { state, isLoading }),
12787
12953
  multiple: false,
12788
12954
  clearable: false,
12789
- addon: /* @__PURE__ */ jsx42(Search, { size: 24 }),
12955
+ addon: /* @__PURE__ */ jsx43(Search, { size: 24 }),
12790
12956
  options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
12791
12957
  minQueryLength: 1,
12792
12958
  onChange: (values) => {
@@ -12823,29 +12989,29 @@ function mapResultToTypeaheadOption(result) {
12823
12989
  function TypeaheadFooter({ state, isLoading }) {
12824
12990
  const { formatMessage } = useIntl9();
12825
12991
  if (state.type === "noResults") {
12826
- return /* @__PURE__ */ jsx42(Markdown4, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
12992
+ return /* @__PURE__ */ jsx43(Markdown4, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
12827
12993
  }
12828
12994
  if (state.type === "error") {
12829
- return /* @__PURE__ */ jsx42("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx42(ErrorResult, { state }) });
12995
+ return /* @__PURE__ */ jsx43("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx43(ErrorResult, { state }) });
12830
12996
  }
12831
12997
  if (state.type === "pending" || isLoading) {
12832
- return /* @__PURE__ */ jsx42("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
12998
+ return /* @__PURE__ */ jsx43("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
12833
12999
  }
12834
13000
  return null;
12835
13001
  }
12836
13002
  var InlineSearchRendererComponent_default = InlineSearchRenderer;
12837
13003
 
12838
13004
  // ../renderers/src/SearchRenderer/SearchRenderer.tsx
12839
- import { jsx as jsx43 } from "react/jsx-runtime";
13005
+ import { jsx as jsx44 } from "react/jsx-runtime";
12840
13006
  var SearchRenderer = {
12841
13007
  canRenderType: "search",
12842
- render: (props) => props.control === "inline" ? /* @__PURE__ */ jsx43(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ jsx43(BlockSearchRendererComponent_default, __spreadValues({}, props))
13008
+ render: (props) => props.control === "inline" ? /* @__PURE__ */ jsx44(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ jsx44(BlockSearchRendererComponent_default, __spreadValues({}, props))
12843
13009
  };
12844
13010
  var SearchRenderer_default = SearchRenderer;
12845
13011
 
12846
13012
  // ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
12847
13013
  import { RadioGroup } from "@transferwise/components";
12848
- import { Fragment as Fragment6, jsx as jsx44, jsxs as jsxs14 } from "react/jsx-runtime";
13014
+ import { Fragment as Fragment6, jsx as jsx45, jsxs as jsxs14 } from "react/jsx-runtime";
12849
13015
  function RadioInputRendererComponent(props) {
12850
13016
  const {
12851
13017
  id,
@@ -12860,7 +13026,7 @@ function RadioInputRendererComponent(props) {
12860
13026
  onSelect
12861
13027
  } = props;
12862
13028
  return /* @__PURE__ */ jsxs14(Fragment6, { children: [
12863
- /* @__PURE__ */ jsx44(
13029
+ /* @__PURE__ */ jsx45(
12864
13030
  FieldInput_default,
12865
13031
  {
12866
13032
  id,
@@ -12868,7 +13034,7 @@ function RadioInputRendererComponent(props) {
12868
13034
  help,
12869
13035
  description,
12870
13036
  validation: validationState,
12871
- children: /* @__PURE__ */ jsx44("span", { children: /* @__PURE__ */ jsx44(
13037
+ children: /* @__PURE__ */ jsx45("span", { children: /* @__PURE__ */ jsx45(
12872
13038
  RadioGroup,
12873
13039
  {
12874
13040
  name: id,
@@ -12877,7 +13043,7 @@ function RadioInputRendererComponent(props) {
12877
13043
  value: index,
12878
13044
  secondary: option.description,
12879
13045
  disabled: option.disabled || disabled,
12880
- avatar: /* @__PURE__ */ jsx44(OptionMedia, { icon: option.icon, image: option.image })
13046
+ avatar: /* @__PURE__ */ jsx45(OptionMedia, { icon: option.icon, image: option.image })
12881
13047
  })),
12882
13048
  selectedValue: selectedIndex != null ? selectedIndex : void 0,
12883
13049
  onChange: onSelect
@@ -12893,7 +13059,7 @@ function RadioInputRendererComponent(props) {
12893
13059
  // ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
12894
13060
  import { Tabs } from "@transferwise/components";
12895
13061
  import { useEffect as useEffect4 } from "react";
12896
- import { Fragment as Fragment7, jsx as jsx45, jsxs as jsxs15 } from "react/jsx-runtime";
13062
+ import { Fragment as Fragment7, jsx as jsx46, jsxs as jsxs15 } from "react/jsx-runtime";
12897
13063
  function TabInputRendererComponent(props) {
12898
13064
  const {
12899
13065
  id,
@@ -12913,7 +13079,7 @@ function TabInputRendererComponent(props) {
12913
13079
  }
12914
13080
  }, [selectedIndex, onSelect, options.length]);
12915
13081
  return /* @__PURE__ */ jsxs15(Fragment7, { children: [
12916
- /* @__PURE__ */ jsx45(
13082
+ /* @__PURE__ */ jsx46(
12917
13083
  FieldInput_default,
12918
13084
  {
12919
13085
  id,
@@ -12921,7 +13087,7 @@ function TabInputRendererComponent(props) {
12921
13087
  help,
12922
13088
  description,
12923
13089
  validation: validationState,
12924
- children: /* @__PURE__ */ jsx45(
13090
+ children: /* @__PURE__ */ jsx46(
12925
13091
  Tabs,
12926
13092
  {
12927
13093
  name: id,
@@ -12930,7 +13096,7 @@ function TabInputRendererComponent(props) {
12930
13096
  title: option.title,
12931
13097
  // if we pass null, we get some props-types console errors
12932
13098
  // eslint-disable-next-line react/jsx-no-useless-fragment
12933
- content: /* @__PURE__ */ jsx45(Fragment7, {}),
13099
+ content: /* @__PURE__ */ jsx46(Fragment7, {}),
12934
13100
  disabled: option.disabled || disabled
12935
13101
  })),
12936
13102
  onTabSelect: onSelect
@@ -12945,29 +13111,6 @@ var isValidIndex = (index, options) => index !== null && index >= 0 && index < o
12945
13111
 
12946
13112
  // ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
12947
13113
  import { SelectInput as SelectInput2, SelectInputOptionContent as SelectInputOptionContent2 } from "@transferwise/components";
12948
-
12949
- // ../renderers/src/SelectInputRenderer/SelectTriggerMedia.tsx
12950
- import { Avatar as Avatar3, AvatarType as AvatarType3 } from "@transferwise/components";
12951
- import { jsx as jsx46 } from "react/jsx-runtime";
12952
- function SelectTriggerMedia({ icon, image }) {
12953
- if (image == null ? void 0 : image.url) {
12954
- return null;
12955
- }
12956
- if (isFlagIcon2(icon)) {
12957
- return /* @__PURE__ */ jsx46(Avatar3, { type: AvatarType3.ICON, size: 24, children: /* @__PURE__ */ jsx46(DynamicIcon_default, { name: icon.name }) });
12958
- }
12959
- if (isNamedIcon2(icon)) {
12960
- return /* @__PURE__ */ jsx46(DynamicIcon_default, { name: icon.name });
12961
- }
12962
- if (icon && "text" in icon) {
12963
- return /* @__PURE__ */ jsx46(Avatar3, { type: AvatarType3.ICON, size: 24, children: icon.text });
12964
- }
12965
- return null;
12966
- }
12967
- var isNamedIcon2 = (icon) => icon ? "name" in icon : false;
12968
- var isFlagIcon2 = (icon) => isNamedIcon2(icon) && icon.name.startsWith("flag-");
12969
-
12970
- // ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
12971
13114
  import { Fragment as Fragment8, jsx as jsx47, jsxs as jsxs16 } from "react/jsx-runtime";
12972
13115
  function SelectInputRendererComponent(props) {
12973
13116
  const {
@@ -13004,7 +13147,7 @@ function SelectInputRendererComponent(props) {
13004
13147
  const contentProps = withinTrigger ? {
13005
13148
  title: option.title,
13006
13149
  note: option.description,
13007
- icon: /* @__PURE__ */ jsx47(SelectTriggerMedia, { icon: option.icon, image: option.image })
13150
+ icon: getIconAvatar(option)
13008
13151
  } : {
13009
13152
  title: option.title,
13010
13153
  description: option.description,
@@ -13161,6 +13304,9 @@ var mapStatus = (status) => {
13161
13304
  return status;
13162
13305
  };
13163
13306
 
13307
+ // ../renderers/src/TextInputRenderer.tsx
13308
+ import { InputGroup as InputGroup3 } from "@transferwise/components";
13309
+
13164
13310
  // ../renderers/src/components/VariableTextInput.tsx
13165
13311
  import {
13166
13312
  Input as Input5,
@@ -13248,6 +13394,8 @@ var TextInputRenderer = {
13248
13394
  description,
13249
13395
  help,
13250
13396
  error,
13397
+ icon,
13398
+ image,
13251
13399
  maxLength,
13252
13400
  minLength,
13253
13401
  type,
@@ -13260,6 +13408,8 @@ var TextInputRenderer = {
13260
13408
  "description",
13261
13409
  "help",
13262
13410
  "error",
13411
+ "icon",
13412
+ "image",
13263
13413
  "maxLength",
13264
13414
  "minLength",
13265
13415
  "type",
@@ -13276,7 +13426,7 @@ var TextInputRenderer = {
13276
13426
  description,
13277
13427
  validation: validationState,
13278
13428
  help,
13279
- children: /* @__PURE__ */ jsx52(VariableTextInput_default, { control, inputProps })
13429
+ children: /* @__PURE__ */ jsx52(InputGroup3, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ jsx52(VariableTextInput_default, { control, inputProps }) })
13280
13430
  }
13281
13431
  );
13282
13432
  }
@@ -13844,10 +13994,10 @@ function convertDecisionStepToDynamicLayout(step) {
13844
13994
  }
13845
13995
  return layout;
13846
13996
  }
13847
- function dynamicBox(components, size) {
13997
+ function dynamicBox(components, size2) {
13848
13998
  return {
13849
13999
  type: "box",
13850
- width: size || "md",
14000
+ width: size2 || "md",
13851
14001
  components
13852
14002
  };
13853
14003
  }
@@ -15109,8 +15259,8 @@ var getNavigationOptionMedia = ({ icon, image }) => {
15109
15259
  };
15110
15260
 
15111
15261
  // src/legacy/layout/utils/index.ts
15112
- var getMargin2 = (size) => {
15113
- switch (size) {
15262
+ var getMargin2 = (size2) => {
15263
+ switch (size2) {
15114
15264
  case "xs":
15115
15265
  return "m-b-0";
15116
15266
  case "sm":
@@ -15160,6 +15310,29 @@ var getAlertAction = (component, onAction) => {
15160
15310
  return void 0;
15161
15311
  }
15162
15312
  const { title, accessibilityDescription, behavior } = component.callToAction;
15313
+ if ("type" in behavior) {
15314
+ switch (behavior.type) {
15315
+ case "action": {
15316
+ const { action: action2 } = behavior;
15317
+ return {
15318
+ text: title,
15319
+ "aria-label": accessibilityDescription,
15320
+ onClick: onAction && action2 ? () => {
15321
+ onAction(action2);
15322
+ } : () => {
15323
+ }
15324
+ };
15325
+ }
15326
+ case "link": {
15327
+ return {
15328
+ text: title,
15329
+ "aria-label": accessibilityDescription,
15330
+ href: behavior.url,
15331
+ target: "_blank"
15332
+ };
15333
+ }
15334
+ }
15335
+ }
15163
15336
  const { action, link } = behavior;
15164
15337
  if (link) {
15165
15338
  return {
@@ -15292,8 +15465,8 @@ var getButtonType = (context, action) => {
15292
15465
  var getButtonTypeFromContext = (context) => {
15293
15466
  return context ? contextToType[context] : "accent";
15294
15467
  };
15295
- var getButtonSize = (size) => {
15296
- switch (size) {
15468
+ var getButtonSize = (size2) => {
15469
+ switch (size2) {
15297
15470
  case "xs":
15298
15471
  case "sm":
15299
15472
  return "sm";
@@ -15342,7 +15515,7 @@ function DynamicButtonWithoutBehavior(props) {
15342
15515
  }
15343
15516
  function DynamicButtonWithBehavior(props) {
15344
15517
  var _a, _b;
15345
- const { component } = props;
15518
+ const { component, onAction } = props;
15346
15519
  const type = getButtonTypeFromContext(component.context);
15347
15520
  const priority = (_a = component.control) != null ? _a : "secondary";
15348
15521
  const { loading } = useDynamicFlow();
@@ -15351,11 +15524,31 @@ function DynamicButtonWithBehavior(props) {
15351
15524
  const title = (_b = component.title) != null ? _b : "";
15352
15525
  const onClick = () => {
15353
15526
  const { behavior } = component;
15354
- if (behavior == null ? void 0 : behavior.action) {
15355
- props.onAction(behavior.action);
15527
+ if (!behavior) {
15528
+ return;
15356
15529
  }
15357
- if (behavior == null ? void 0 : behavior.link) {
15358
- window.open(behavior.link.url, "_blank");
15530
+ if ("type" in behavior) {
15531
+ switch (behavior.type) {
15532
+ case "action": {
15533
+ if (behavior.action) {
15534
+ onAction(behavior.action);
15535
+ }
15536
+ break;
15537
+ }
15538
+ case "link": {
15539
+ if (behavior.url) {
15540
+ window.open(behavior.url, "_blank");
15541
+ }
15542
+ break;
15543
+ }
15544
+ }
15545
+ } else {
15546
+ if (behavior == null ? void 0 : behavior.action) {
15547
+ onAction(behavior.action);
15548
+ }
15549
+ if (behavior == null ? void 0 : behavior.link) {
15550
+ window.open(behavior.link.url, "_blank");
15551
+ }
15359
15552
  }
15360
15553
  };
15361
15554
  return /* @__PURE__ */ jsx72(
@@ -16888,7 +17081,7 @@ var _FormControl = class _FormControl extends PureComponent {
16888
17081
  max,
16889
17082
  searchPlaceholder,
16890
17083
  onSearchChange,
16891
- size,
17084
+ size: size2,
16892
17085
  uploadProps,
16893
17086
  label,
16894
17087
  description,
@@ -17076,7 +17269,7 @@ var _FormControl = class _FormControl extends PureComponent {
17076
17269
  dayAutoComplete: this.getAutocompleteValue({ suffix: "-day" }),
17077
17270
  yearAutoComplete: this.getAutocompleteValue({ suffix: "-year" }),
17078
17271
  disabled,
17079
- size,
17272
+ size: size2,
17080
17273
  value: getSafeDateOrStringValue(value),
17081
17274
  mode,
17082
17275
  monthFormat,
@@ -17112,7 +17305,7 @@ var _FormControl = class _FormControl extends PureComponent {
17112
17305
  placeholder,
17113
17306
  required,
17114
17307
  searchPlaceholder,
17115
- size,
17308
+ size: size2,
17116
17309
  initialValue: getSafeStringValue(value),
17117
17310
  onBlur: this.handleOnBlur,
17118
17311
  onChange: (value2) => this.handleOnChange(value2),
@@ -18125,12 +18318,12 @@ var import_classnames13 = __toESM(require_classnames());
18125
18318
  import { Display as Display2 } from "@transferwise/components";
18126
18319
  import { jsx as jsx103 } from "react/jsx-runtime";
18127
18320
  var DynamicHeading = (props) => {
18128
- const { text, size = "md", align = "left", margin = "md", control } = props.component;
18321
+ const { text, size: size2 = "md", align = "left", margin = "md", control } = props.component;
18129
18322
  const classes = (0, import_classnames13.default)(getTextAlignmentAndMargin2({ align, margin }));
18130
- return control === "display" ? /* @__PURE__ */ jsx103(DisplayHeading2, { size, text, classes }) : /* @__PURE__ */ jsx103(StandardHeading2, { size, text, classes });
18323
+ return control === "display" ? /* @__PURE__ */ jsx103(DisplayHeading2, { size: size2, text, classes }) : /* @__PURE__ */ jsx103(StandardHeading2, { size: size2, text, classes });
18131
18324
  };
18132
- var StandardHeading2 = ({ size, text, classes }) => {
18133
- switch (size) {
18325
+ var StandardHeading2 = ({ size: size2, text, classes }) => {
18326
+ switch (size2) {
18134
18327
  case "xs":
18135
18328
  return /* @__PURE__ */ jsx103("h5", { className: classes, children: text });
18136
18329
  case "sm":
@@ -18144,8 +18337,8 @@ var StandardHeading2 = ({ size, text, classes }) => {
18144
18337
  return /* @__PURE__ */ jsx103("h3", { className: classes, children: text });
18145
18338
  }
18146
18339
  };
18147
- var DisplayHeading2 = ({ size, text, classes }) => {
18148
- switch (size) {
18340
+ var DisplayHeading2 = ({ size: size2, text, classes }) => {
18341
+ switch (size2) {
18149
18342
  case "xs":
18150
18343
  case "sm":
18151
18344
  return /* @__PURE__ */ jsx103(Display2, { type: "display-small", className: classes, children: text });
@@ -18175,7 +18368,7 @@ import { Image as Image2 } from "@transferwise/components";
18175
18368
  import { useEffect as useEffect16, useState as useState22 } from "react";
18176
18369
  import { jsx as jsx105 } from "react/jsx-runtime";
18177
18370
  function DynamicImage({ component: image }) {
18178
- const { url, size, text, margin, accessibilityDescription } = image;
18371
+ const { url, size: size2, text, margin, accessibilityDescription } = image;
18179
18372
  const httpClient = useHttpClient();
18180
18373
  const [imageSource, setImageSource] = useState22("");
18181
18374
  useEffect16(() => {
@@ -18190,7 +18383,7 @@ function DynamicImage({ component: image }) {
18190
18383
  if (!imageSource) {
18191
18384
  return null;
18192
18385
  }
18193
- return /* @__PURE__ */ jsx105("div", { className: `df-image ${size || "md"}`, children: /* @__PURE__ */ jsx105(Image2, __spreadValues({ className: `img-responsive ${getMargin2(margin || "md")}` }, imageProps)) });
18386
+ return /* @__PURE__ */ jsx105("div", { className: `df-image ${size2 || "md"}`, children: /* @__PURE__ */ jsx105(Image2, __spreadValues({ className: `img-responsive ${getMargin2(margin || "md")}` }, imageProps)) });
18194
18387
  }
18195
18388
  var readImageBlobAsDataURL2 = (imageBlob) => (
18196
18389
  // we can safely assume the type of reader.result is string
@@ -18368,6 +18561,28 @@ var callToActionToSummaryAction = (callToAction, onAction) => {
18368
18561
  return void 0;
18369
18562
  }
18370
18563
  const { accessibilityDescription, behavior, title } = callToAction;
18564
+ if ("type" in behavior) {
18565
+ switch (behavior.type) {
18566
+ case "action": {
18567
+ const { action } = behavior;
18568
+ return {
18569
+ text: title,
18570
+ "aria-label": accessibilityDescription,
18571
+ onClick: () => {
18572
+ onAction(action);
18573
+ }
18574
+ };
18575
+ }
18576
+ case "link": {
18577
+ return {
18578
+ text: title,
18579
+ "aria-label": accessibilityDescription,
18580
+ href: behavior.url,
18581
+ target: "_blank"
18582
+ };
18583
+ }
18584
+ }
18585
+ }
18371
18586
  if (behavior.link) {
18372
18587
  const { link } = behavior;
18373
18588
  return {
@@ -18411,11 +18626,11 @@ var DynamicStatusList_default = DynamicStatusList;
18411
18626
  import { Loader as Loader3 } from "@transferwise/components";
18412
18627
  import { jsx as jsx109 } from "react/jsx-runtime";
18413
18628
  var DynamicLoadingIndicator = ({ component }) => {
18414
- const { margin = "md", size = "md" } = component;
18629
+ const { margin = "md", size: size2 = "md" } = component;
18415
18630
  return /* @__PURE__ */ jsx109(
18416
18631
  Loader3,
18417
18632
  {
18418
- size,
18633
+ size: size2,
18419
18634
  classNames: {
18420
18635
  "tw-loader": `tw-loader m-x-auto ${getMargin2(margin)}`
18421
18636
  },
@@ -18530,13 +18745,29 @@ var getDefinitionListLayout = (review) => {
18530
18745
  return "VERTICAL_ONE_COLUMN";
18531
18746
  }
18532
18747
  };
18533
- function DynamicReview(props) {
18534
- var _a;
18535
- const review = props.component;
18748
+ function DynamicReview({ component: review, onAction }) {
18749
+ var _a, _b;
18536
18750
  const margin = getMargin2(review.margin || "xs");
18537
18751
  const getReviewAction3 = (callToAction2) => {
18538
18752
  const { title, action, behavior } = callToAction2;
18539
18753
  if (behavior) {
18754
+ if ("type" in behavior) {
18755
+ switch (behavior.type) {
18756
+ case "action": {
18757
+ const { action: behaviorAction2 } = behavior;
18758
+ return {
18759
+ text: title != null ? title : "",
18760
+ onClick: behaviorAction2 ? getOnClick(behaviorAction2) : void 0
18761
+ };
18762
+ }
18763
+ case "link": {
18764
+ return {
18765
+ text: title != null ? title : "",
18766
+ href: behavior.url
18767
+ };
18768
+ }
18769
+ }
18770
+ }
18540
18771
  const { action: behaviorAction, link } = behavior;
18541
18772
  if (behaviorAction) {
18542
18773
  return {
@@ -18560,7 +18791,7 @@ function DynamicReview(props) {
18560
18791
  return (event) => {
18561
18792
  event.preventDefault();
18562
18793
  if (action) {
18563
- props.onAction(action);
18794
+ onAction(action);
18564
18795
  }
18565
18796
  };
18566
18797
  };
@@ -18568,7 +18799,7 @@ function DynamicReview(props) {
18568
18799
  const callToAction = review.callToAction ? getReviewAction3(review.callToAction) : null;
18569
18800
  const legacyCallToAction = !callToAction && review.action ? { text: (_a = review.action.title) != null ? _a : "", onClick: getOnClick(review.action) } : null;
18570
18801
  return /* @__PURE__ */ jsxs40("div", { className: margin, children: [
18571
- review.title && /* @__PURE__ */ jsx111(Header14, { title: review.title, action: callToAction || legacyCallToAction || void 0 }),
18802
+ review.title && /* @__PURE__ */ jsx111(Header14, { title: review.title, action: (_b = callToAction != null ? callToAction : legacyCallToAction) != null ? _b : void 0 }),
18572
18803
  /* @__PURE__ */ jsx111("div", { className: margin, children: /* @__PURE__ */ jsx111(DefinitionList3, { layout: orientation, definitions: getDefinitions(orientation, review) }) })
18573
18804
  ] });
18574
18805
  }