@wise/dynamic-flow-client-internal 4.24.0-experimental-renderer-extensions-2-779450d → 4.24.1-experimental-1ea86c5

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
@@ -30,9 +30,6 @@ var __objRest = (source, exclude) => {
30
30
  return target;
31
31
  };
32
32
 
33
- // src/index.ts
34
- import { makeHttpClient } from "@wise/dynamic-flow-client";
35
-
36
33
  // ../renderers/src/AlertRenderer.tsx
37
34
  import { Alert } from "@transferwise/components";
38
35
 
@@ -171,6 +168,26 @@ var AddressValidationButtonRenderer_default = AddressValidationButtonRenderer;
171
168
  // ../renderers/src/ButtonRenderer/ButtonRenderer.tsx
172
169
  import { Button as Button2 } from "@transferwise/components";
173
170
  import { useEffect as useEffect2, useState as useState2 } from "react";
171
+
172
+ // ../renderers/src/ButtonRenderer/mapButtonSize.tsx
173
+ var mapButtonSize = (size) => {
174
+ if (!size) {
175
+ return void 0;
176
+ }
177
+ switch (size) {
178
+ case "xs":
179
+ case "sm":
180
+ return "sm";
181
+ case "lg":
182
+ case "xl":
183
+ return "lg";
184
+ case "md":
185
+ default:
186
+ return "md";
187
+ }
188
+ };
189
+
190
+ // ../renderers/src/ButtonRenderer/ButtonRenderer.tsx
174
191
  import { jsx as jsx4 } from "react/jsx-runtime";
175
192
  var ButtonRenderer = {
176
193
  canRenderType: "button",
@@ -184,8 +201,9 @@ function ButtonComponent(props) {
184
201
  setSpinny(false);
185
202
  }
186
203
  }, [stepLoadingState]);
187
- const priority = mapControl(control);
188
- const type = priority === "tertiary" ? void 0 : mapContext(context);
204
+ const priority = getPriority(control);
205
+ const type = getButtonType(context, priority);
206
+ const loading = spinny && stepLoadingState !== "idle";
189
207
  return /* @__PURE__ */ jsx4(
190
208
  Button2,
191
209
  {
@@ -193,8 +211,8 @@ function ButtonComponent(props) {
193
211
  className: getMargin(margin),
194
212
  disabled,
195
213
  priority,
196
- size: mapSize(size),
197
- loading: spinny && stepLoadingState !== "idle",
214
+ size: mapButtonSize(size),
215
+ loading,
198
216
  type,
199
217
  onClick: () => {
200
218
  setSpinny(true);
@@ -204,16 +222,7 @@ function ButtonComponent(props) {
204
222
  }
205
223
  );
206
224
  }
207
- var mapContext = (context) => {
208
- switch (context) {
209
- case "neutral":
210
- case "warning":
211
- return "accent";
212
- default:
213
- return context;
214
- }
215
- };
216
- var mapControl = (control) => {
225
+ var getPriority = (control) => {
217
226
  switch (control) {
218
227
  case "primary":
219
228
  case "tertiary":
@@ -222,23 +231,18 @@ var mapControl = (control) => {
222
231
  return "secondary";
223
232
  }
224
233
  };
225
- var mapSize = (size) => {
226
- if (!size) {
234
+ var getButtonType = (context, priority) => {
235
+ if (priority === "tertiary") {
227
236
  return void 0;
228
237
  }
229
- switch (size) {
230
- case "xs":
231
- case "sm":
232
- return "sm";
233
- case "lg":
234
- case "xl":
235
- return "lg";
236
- case "md":
238
+ switch (context) {
239
+ case "neutral":
240
+ case "warning":
241
+ return "accent";
237
242
  default:
238
- return "md";
243
+ return context;
239
244
  }
240
245
  };
241
- var ButtonRenderer_default = ButtonRenderer;
242
246
 
243
247
  // ../renderers/src/components/FieldInput.tsx
244
248
  import { Field } from "@transferwise/components";
@@ -1009,6 +1013,7 @@ function ExternalConfirmationRendererComponent({
1009
1013
  /* @__PURE__ */ jsx27(
1010
1014
  Button3,
1011
1015
  {
1016
+ v2: true,
1012
1017
  block: true,
1013
1018
  className: "m-b-2",
1014
1019
  priority: "primary",
@@ -1020,7 +1025,7 @@ function ExternalConfirmationRendererComponent({
1020
1025
  children: formatMessage(external_confirmation_messages_default.open)
1021
1026
  }
1022
1027
  ),
1023
- /* @__PURE__ */ jsx27(Button3, { block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
1028
+ /* @__PURE__ */ jsx27(Button3, { v2: true, block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
1024
1029
  ] }) })
1025
1030
  ] }),
1026
1031
  onClose: onCancel
@@ -1502,7 +1507,7 @@ function DFModal({ content, margin, trigger }) {
1502
1507
  const [visible, setVisible] = useState6(false);
1503
1508
  const { children, title } = content;
1504
1509
  return /* @__PURE__ */ jsxs10("div", { className: getMargin(margin), children: [
1505
- /* @__PURE__ */ jsx42(Button4, { priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
1510
+ /* @__PURE__ */ jsx42(Button4, { v2: true, priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
1506
1511
  /* @__PURE__ */ jsx42(
1507
1512
  Modal2,
1508
1513
  {
@@ -1866,7 +1871,7 @@ function CopyableParagraph({
1866
1871
  className: classNames5("text-ellipsis", inputAlignmentClasses)
1867
1872
  }
1868
1873
  ),
1869
- /* @__PURE__ */ jsx48(Button5, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
1874
+ /* @__PURE__ */ jsx48(Button5, { v2: true, block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
1870
1875
  ] });
1871
1876
  }
1872
1877
  var ParagraphRenderer_default = ParagraphRenderer;
@@ -1979,7 +1984,17 @@ function Repeatable(props) {
1979
1984
  /* @__PURE__ */ jsx49("div", { className: "m-b-2", children: editableItem }),
1980
1985
  /* @__PURE__ */ jsxs13("div", { children: [
1981
1986
  /* @__PURE__ */ jsx49(Button6, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
1982
- /* @__PURE__ */ jsx49(Button6, { priority: "secondary", type: "negative", block: true, onClick: () => onRemoveItem(), children: formatMessage(repeatable_messages_default.removeItem) })
1987
+ /* @__PURE__ */ jsx49(
1988
+ Button6,
1989
+ {
1990
+ v2: true,
1991
+ priority: "secondary",
1992
+ sentiment: "negative",
1993
+ block: true,
1994
+ onClick: () => onRemoveItem(),
1995
+ children: formatMessage(repeatable_messages_default.removeItem)
1996
+ }
1997
+ )
1983
1998
  ] })
1984
1999
  ] }),
1985
2000
  onClose: () => onCancelEdit()
@@ -2005,9 +2020,12 @@ function ItemSummaryOption({
2005
2020
  var RepeatableRenderer_default = RepeatableRenderer;
2006
2021
 
2007
2022
  // ../renderers/src/ReviewRenderer.tsx
2008
- import { DefinitionList, Header as Header7 } from "@transferwise/components";
2023
+ import { DefinitionList } from "@transferwise/components";
2009
2024
 
2010
- // ../renderers/src/utils/getHeaderAction.tsx
2025
+ // ../renderers/src/components/Header.tsx
2026
+ import { Header as DSHeader } from "@transferwise/components";
2027
+ import { jsx as jsx50 } from "react/jsx-runtime";
2028
+ var Header7 = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */ jsx50(DSHeader, { title: title != null ? title : "", action: getHeaderAction(callToAction) });
2011
2029
  var getHeaderAction = (callToAction) => {
2012
2030
  if (!callToAction) {
2013
2031
  return void 0;
@@ -2029,34 +2047,28 @@ var getHeaderAction = (callToAction) => {
2029
2047
  };
2030
2048
 
2031
2049
  // ../renderers/src/ReviewRenderer.tsx
2032
- import { Fragment as Fragment5, jsx as jsx50, jsxs as jsxs14 } from "react/jsx-runtime";
2050
+ import { Fragment as Fragment5, jsx as jsx51, jsxs as jsxs14 } from "react/jsx-runtime";
2033
2051
  var ReviewRenderer = {
2034
2052
  canRenderType: "review",
2035
- extensions: {
2036
- field: ({ label, value, help, analyticsId: fieldAnalyticsId, trackEvent, orientation }) => ({
2037
- key: label,
2038
- title: label,
2039
- value: getFieldValue(
2040
- value,
2041
- help,
2042
- orientation,
2043
- () => trackEvent("Help Pressed", { layoutItemId: fieldAnalyticsId })
2044
- )
2045
- })
2046
- },
2047
- render({ callToAction, control, fields, margin, title, trackEvent }) {
2053
+ render: ({ callToAction, control, fields, margin, title, trackEvent }) => {
2048
2054
  const orientation = mapControlToDefinitionListLayout(control);
2049
2055
  return /* @__PURE__ */ jsxs14("div", { className: getMargin(margin), children: [
2050
- (title || callToAction) && /* @__PURE__ */ jsx50(Header7, { title: title != null ? title : "", action: getHeaderAction(callToAction) }),
2051
- /* @__PURE__ */ jsx50("div", { className: margin, children: /* @__PURE__ */ jsx50(
2056
+ /* @__PURE__ */ jsx51(Header7, { title, callToAction }),
2057
+ /* @__PURE__ */ jsx51("div", { className: margin, children: /* @__PURE__ */ jsx51(
2052
2058
  DefinitionList,
2053
2059
  {
2054
2060
  layout: orientation,
2055
2061
  definitions: fields.map(
2056
- (field) => this.extensions.field(__spreadProps(__spreadValues({}, field), {
2057
- orientation,
2058
- trackEvent
2059
- }))
2062
+ ({ label, value, help, analyticsId: fieldAnalyticsId }, index) => ({
2063
+ key: String(index),
2064
+ title: label,
2065
+ value: getFieldValue(
2066
+ value,
2067
+ help,
2068
+ orientation,
2069
+ () => trackEvent("Help Pressed", { layoutItemId: fieldAnalyticsId })
2070
+ )
2071
+ })
2060
2072
  )
2061
2073
  }
2062
2074
  ) })
@@ -2082,13 +2094,13 @@ var mapControlToDefinitionListLayout = (control) => {
2082
2094
  var getFieldValue = (value, help, orientation, onClick) => {
2083
2095
  if (help) {
2084
2096
  return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ jsxs14(Fragment5, { children: [
2085
- /* @__PURE__ */ jsx50(Help_default, { help, onClick }),
2097
+ /* @__PURE__ */ jsx51(Help_default, { help, onClick }),
2086
2098
  " ",
2087
2099
  value
2088
2100
  ] }) : /* @__PURE__ */ jsxs14(Fragment5, { children: [
2089
2101
  value,
2090
2102
  " ",
2091
- /* @__PURE__ */ jsx50(Help_default, { help, onClick })
2103
+ /* @__PURE__ */ jsx51(Help_default, { help, onClick })
2092
2104
  ] });
2093
2105
  }
2094
2106
  return value;
@@ -2133,32 +2145,19 @@ var generic_error_messages_default = defineMessages9({
2133
2145
  });
2134
2146
 
2135
2147
  // ../renderers/src/SearchRenderer/ErrorResult.tsx
2136
- import { Button as Button7 } from "@transferwise/components";
2137
- import { jsx as jsx51, jsxs as jsxs15 } from "react/jsx-runtime";
2148
+ import { Link } from "@transferwise/components";
2149
+ import { jsx as jsx52, jsxs as jsxs15 } from "react/jsx-runtime";
2138
2150
  function ErrorResult({ state }) {
2139
2151
  const intl = useIntl9();
2140
- const buttonVisualProps = {
2141
- priority: "tertiary",
2142
- size: "sm",
2143
- style: { marginTop: "-2px", padding: "0", width: "auto", display: "inline" }
2144
- };
2145
2152
  return /* @__PURE__ */ jsxs15("p", { className: "m-t-2", children: [
2146
2153
  intl.formatMessage(generic_error_messages_default.genericError),
2147
2154
  "\xA0",
2148
- /* @__PURE__ */ jsx51(
2149
- Button7,
2150
- __spreadProps(__spreadValues({}, buttonVisualProps), {
2151
- onClick: () => {
2152
- state.onRetry();
2153
- },
2154
- children: intl.formatMessage(generic_error_messages_default.retry)
2155
- })
2156
- )
2155
+ /* @__PURE__ */ jsx52(Link, { onClick: () => state.onRetry(), children: intl.formatMessage(generic_error_messages_default.retry) })
2157
2156
  ] });
2158
2157
  }
2159
2158
 
2160
2159
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
2161
- import { Fragment as Fragment6, jsx as jsx52, jsxs as jsxs16 } from "react/jsx-runtime";
2160
+ import { Fragment as Fragment6, jsx as jsx53, jsxs as jsxs16 } from "react/jsx-runtime";
2162
2161
  function BlockSearchRendererComponent({
2163
2162
  id,
2164
2163
  isLoading,
@@ -2172,7 +2171,7 @@ function BlockSearchRendererComponent({
2172
2171
  const [hasSearched, setHasSearched] = useState9(false);
2173
2172
  const { formatMessage } = useIntl10();
2174
2173
  return /* @__PURE__ */ jsxs16("div", { className: getMargin(margin), children: [
2175
- /* @__PURE__ */ jsx52(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx52(
2174
+ /* @__PURE__ */ jsx53(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx53(
2176
2175
  Input4,
2177
2176
  {
2178
2177
  id,
@@ -2189,7 +2188,7 @@ function BlockSearchRendererComponent({
2189
2188
  }
2190
2189
  }
2191
2190
  ) }),
2192
- isLoading ? /* @__PURE__ */ jsx52(Fragment6, { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ jsx52(SearchResultContent, { state, trackEvent })
2191
+ isLoading ? /* @__PURE__ */ jsx53(Fragment6, { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ jsx53(SearchResultContent, { state, trackEvent })
2193
2192
  ] });
2194
2193
  }
2195
2194
  function SearchResultContent({
@@ -2198,26 +2197,26 @@ function SearchResultContent({
2198
2197
  }) {
2199
2198
  switch (state.type) {
2200
2199
  case "error":
2201
- return /* @__PURE__ */ jsx52(ErrorResult, { state });
2200
+ return /* @__PURE__ */ jsx53(ErrorResult, { state });
2202
2201
  case "results":
2203
- return /* @__PURE__ */ jsx52(SearchResults, { state, trackEvent });
2202
+ return /* @__PURE__ */ jsx53(SearchResults, { state, trackEvent });
2204
2203
  case "noResults":
2205
- return /* @__PURE__ */ jsx52(EmptySearchResult, { state });
2204
+ return /* @__PURE__ */ jsx53(EmptySearchResult, { state });
2206
2205
  case "pending":
2207
2206
  default:
2208
2207
  return null;
2209
2208
  }
2210
2209
  }
2211
2210
  function EmptySearchResult({ state }) {
2212
- return /* @__PURE__ */ jsx52(Markdown4, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
2211
+ return /* @__PURE__ */ jsx53(Markdown4, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
2213
2212
  }
2214
2213
  function SearchResults({
2215
2214
  state,
2216
2215
  trackEvent
2217
2216
  }) {
2218
- return /* @__PURE__ */ jsx52(NavigationOptionsList2, { children: state.results.map((result) => {
2217
+ return /* @__PURE__ */ jsx53(NavigationOptionsList2, { children: state.results.map((result) => {
2219
2218
  const { media } = result;
2220
- return /* @__PURE__ */ jsx52(
2219
+ return /* @__PURE__ */ jsx53(
2221
2220
  NavigationOption3,
2222
2221
  {
2223
2222
  title: result.title,
@@ -2243,7 +2242,7 @@ import { Markdown as Markdown5, Typeahead } from "@transferwise/components";
2243
2242
  import { Search } from "@transferwise/icons";
2244
2243
  import { useState as useState10 } from "react";
2245
2244
  import { useIntl as useIntl11 } from "react-intl";
2246
- import { jsx as jsx53 } from "react/jsx-runtime";
2245
+ import { jsx as jsx54 } from "react/jsx-runtime";
2247
2246
  function InlineSearchRenderer({
2248
2247
  id,
2249
2248
  isLoading,
@@ -2255,7 +2254,7 @@ function InlineSearchRenderer({
2255
2254
  }) {
2256
2255
  const [hasSearched, setHasSearched] = useState10(false);
2257
2256
  const intl = useIntl11();
2258
- return /* @__PURE__ */ jsx53("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx53(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx53(
2257
+ return /* @__PURE__ */ jsx54("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx54(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx54(
2259
2258
  Typeahead,
2260
2259
  {
2261
2260
  id: "typeahead-input-id",
@@ -2263,10 +2262,10 @@ function InlineSearchRenderer({
2263
2262
  name: "typeahead-input-name",
2264
2263
  size: "md",
2265
2264
  maxHeight: 100,
2266
- footer: /* @__PURE__ */ jsx53(TypeaheadFooter, { state, isLoading }),
2265
+ footer: /* @__PURE__ */ jsx54(TypeaheadFooter, { state, isLoading }),
2267
2266
  multiple: false,
2268
2267
  clearable: false,
2269
- addon: /* @__PURE__ */ jsx53(Search, { size: 24 }),
2268
+ addon: /* @__PURE__ */ jsx54(Search, { size: 24 }),
2270
2269
  options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
2271
2270
  minQueryLength: 1,
2272
2271
  onChange: (values) => {
@@ -2303,34 +2302,57 @@ function mapResultToTypeaheadOption(result) {
2303
2302
  function TypeaheadFooter({ state, isLoading }) {
2304
2303
  const { formatMessage } = useIntl11();
2305
2304
  if (state.type === "noResults") {
2306
- return /* @__PURE__ */ jsx53(Markdown5, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
2305
+ return /* @__PURE__ */ jsx54(Markdown5, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
2307
2306
  }
2308
2307
  if (state.type === "error") {
2309
- return /* @__PURE__ */ jsx53("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx53(ErrorResult, { state }) });
2308
+ return /* @__PURE__ */ jsx54("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx54(ErrorResult, { state }) });
2310
2309
  }
2311
2310
  if (state.type === "pending" || isLoading) {
2312
- return /* @__PURE__ */ jsx53("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
2311
+ return /* @__PURE__ */ jsx54("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
2313
2312
  }
2314
2313
  return null;
2315
2314
  }
2316
2315
  var InlineSearchRendererComponent_default = InlineSearchRenderer;
2317
2316
 
2318
2317
  // ../renderers/src/SearchRenderer/SearchRenderer.tsx
2319
- import { jsx as jsx54 } from "react/jsx-runtime";
2318
+ import { jsx as jsx55 } from "react/jsx-runtime";
2320
2319
  var SearchRenderer = {
2321
2320
  canRenderType: "search",
2322
- render: (props) => props.control === "inline" ? /* @__PURE__ */ jsx54(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ jsx54(BlockSearchRendererComponent_default, __spreadValues({}, props))
2321
+ render: (props) => props.control === "inline" ? /* @__PURE__ */ jsx55(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ jsx55(BlockSearchRendererComponent_default, __spreadValues({}, props))
2323
2322
  };
2324
2323
  var SearchRenderer_default = SearchRenderer;
2325
2324
 
2326
2325
  // ../renderers/src/SectionRenderer.tsx
2327
2326
  import { Header as Header8 } from "@transferwise/components";
2328
- import { jsx as jsx55, jsxs as jsxs17 } from "react/jsx-runtime";
2327
+
2328
+ // ../renderers/src/utils/getHeaderAction.tsx
2329
+ var getHeaderAction2 = (callToAction) => {
2330
+ if (!callToAction) {
2331
+ return void 0;
2332
+ }
2333
+ const { accessibilityDescription, href, title, onClick } = callToAction;
2334
+ return href ? {
2335
+ "aria-label": accessibilityDescription,
2336
+ text: title,
2337
+ href,
2338
+ target: "_blank"
2339
+ } : {
2340
+ "aria-label": accessibilityDescription,
2341
+ text: title,
2342
+ onClick: (event) => {
2343
+ event.preventDefault();
2344
+ onClick();
2345
+ }
2346
+ };
2347
+ };
2348
+
2349
+ // ../renderers/src/SectionRenderer.tsx
2350
+ import { jsx as jsx56, jsxs as jsxs17 } from "react/jsx-runtime";
2329
2351
  var SectionRenderer = {
2330
2352
  canRenderType: "section",
2331
2353
  render: ({ children, callToAction, margin, title }) => {
2332
2354
  return /* @__PURE__ */ jsxs17("section", { className: getMargin(margin), children: [
2333
- (title || callToAction) && /* @__PURE__ */ jsx55(Header8, { title: title != null ? title : "", action: getHeaderAction(callToAction) }),
2355
+ (title || callToAction) && /* @__PURE__ */ jsx56(Header8, { title: title != null ? title : "", action: getHeaderAction2(callToAction) }),
2334
2356
  children
2335
2357
  ] });
2336
2358
  }
@@ -2339,7 +2361,7 @@ var SectionRenderer_default = SectionRenderer;
2339
2361
 
2340
2362
  // ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
2341
2363
  import { RadioGroup } from "@transferwise/components";
2342
- import { Fragment as Fragment7, jsx as jsx56, jsxs as jsxs18 } from "react/jsx-runtime";
2364
+ import { Fragment as Fragment7, jsx as jsx57, jsxs as jsxs18 } from "react/jsx-runtime";
2343
2365
  function RadioInputRendererComponent(props) {
2344
2366
  const {
2345
2367
  id,
@@ -2354,7 +2376,7 @@ function RadioInputRendererComponent(props) {
2354
2376
  onSelect
2355
2377
  } = props;
2356
2378
  return /* @__PURE__ */ jsxs18(Fragment7, { children: [
2357
- /* @__PURE__ */ jsx56(
2379
+ /* @__PURE__ */ jsx57(
2358
2380
  FieldInput_default,
2359
2381
  {
2360
2382
  id,
@@ -2362,7 +2384,7 @@ function RadioInputRendererComponent(props) {
2362
2384
  help,
2363
2385
  description,
2364
2386
  validation: validationState,
2365
- children: /* @__PURE__ */ jsx56("span", { children: /* @__PURE__ */ jsx56(
2387
+ children: /* @__PURE__ */ jsx57("span", { children: /* @__PURE__ */ jsx57(
2366
2388
  RadioGroup,
2367
2389
  {
2368
2390
  name: id,
@@ -2371,7 +2393,7 @@ function RadioInputRendererComponent(props) {
2371
2393
  value: index,
2372
2394
  secondary: option.description,
2373
2395
  disabled: option.disabled || disabled,
2374
- avatar: /* @__PURE__ */ jsx56(OptionMedia, { media: option.media, preferAvatar: false })
2396
+ avatar: /* @__PURE__ */ jsx57(OptionMedia, { media: option.media, preferAvatar: false })
2375
2397
  })),
2376
2398
  selectedValue: selectedIndex != null ? selectedIndex : void 0,
2377
2399
  onChange: onSelect
@@ -2387,7 +2409,7 @@ function RadioInputRendererComponent(props) {
2387
2409
  // ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
2388
2410
  import { Tabs } from "@transferwise/components";
2389
2411
  import { useEffect as useEffect5 } from "react";
2390
- import { Fragment as Fragment8, jsx as jsx57, jsxs as jsxs19 } from "react/jsx-runtime";
2412
+ import { Fragment as Fragment8, jsx as jsx58, jsxs as jsxs19 } from "react/jsx-runtime";
2391
2413
  function TabInputRendererComponent(props) {
2392
2414
  const {
2393
2415
  id,
@@ -2407,7 +2429,7 @@ function TabInputRendererComponent(props) {
2407
2429
  }
2408
2430
  }, [selectedIndex, onSelect, options.length]);
2409
2431
  return /* @__PURE__ */ jsxs19(Fragment8, { children: [
2410
- /* @__PURE__ */ jsx57(
2432
+ /* @__PURE__ */ jsx58(
2411
2433
  FieldInput_default,
2412
2434
  {
2413
2435
  id,
@@ -2415,7 +2437,7 @@ function TabInputRendererComponent(props) {
2415
2437
  help,
2416
2438
  description,
2417
2439
  validation: validationState,
2418
- children: /* @__PURE__ */ jsx57(
2440
+ children: /* @__PURE__ */ jsx58(
2419
2441
  Tabs,
2420
2442
  {
2421
2443
  name: id,
@@ -2424,7 +2446,7 @@ function TabInputRendererComponent(props) {
2424
2446
  title: option.title,
2425
2447
  // if we pass null, we get some props-types console errors
2426
2448
  // eslint-disable-next-line react/jsx-no-useless-fragment
2427
- content: /* @__PURE__ */ jsx57(Fragment8, {}),
2449
+ content: /* @__PURE__ */ jsx58(Fragment8, {}),
2428
2450
  disabled: option.disabled || disabled
2429
2451
  })),
2430
2452
  onTabSelect: onSelect
@@ -2439,7 +2461,7 @@ var isValidIndex = (index, options) => index !== null && index >= 0 && index < o
2439
2461
 
2440
2462
  // ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
2441
2463
  import { SelectInput as SelectInput2, SelectInputOptionContent as SelectInputOptionContent2 } from "@transferwise/components";
2442
- import { Fragment as Fragment9, jsx as jsx58, jsxs as jsxs20 } from "react/jsx-runtime";
2464
+ import { Fragment as Fragment9, jsx as jsx59, jsxs as jsxs20 } from "react/jsx-runtime";
2443
2465
  function SelectInputRendererComponent(props) {
2444
2466
  const {
2445
2467
  id,
@@ -2479,13 +2501,13 @@ function SelectInputRendererComponent(props) {
2479
2501
  } : {
2480
2502
  title: option.title,
2481
2503
  description: option.description,
2482
- icon: /* @__PURE__ */ jsx58(OptionMedia, { media: option.media, preferAvatar: false })
2504
+ icon: /* @__PURE__ */ jsx59(OptionMedia, { media: option.media, preferAvatar: false })
2483
2505
  };
2484
- return /* @__PURE__ */ jsx58(SelectInputOptionContent2, __spreadValues({}, contentProps));
2506
+ return /* @__PURE__ */ jsx59(SelectInputOptionContent2, __spreadValues({}, contentProps));
2485
2507
  };
2486
2508
  const extraProps = { autoComplete };
2487
2509
  return /* @__PURE__ */ jsxs20(Fragment9, { children: [
2488
- /* @__PURE__ */ jsx58(
2510
+ /* @__PURE__ */ jsx59(
2489
2511
  FieldInput_default,
2490
2512
  {
2491
2513
  id,
@@ -2493,7 +2515,7 @@ function SelectInputRendererComponent(props) {
2493
2515
  help,
2494
2516
  description,
2495
2517
  validation: validationState,
2496
- children: /* @__PURE__ */ jsx58(
2518
+ children: /* @__PURE__ */ jsx59(
2497
2519
  SelectInput2,
2498
2520
  __spreadValues({
2499
2521
  name: id,
@@ -2516,7 +2538,7 @@ function SelectInputRendererComponent(props) {
2516
2538
  // ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
2517
2539
  import { useEffect as useEffect6 } from "react";
2518
2540
  import { SegmentedControl } from "@transferwise/components";
2519
- import { Fragment as Fragment10, jsx as jsx59, jsxs as jsxs21 } from "react/jsx-runtime";
2541
+ import { Fragment as Fragment10, jsx as jsx60, jsxs as jsxs21 } from "react/jsx-runtime";
2520
2542
  function SegmentedInputRendererComponent(props) {
2521
2543
  const {
2522
2544
  id,
@@ -2535,7 +2557,7 @@ function SegmentedInputRendererComponent(props) {
2535
2557
  }
2536
2558
  }, [selectedIndex, onSelect, options.length]);
2537
2559
  return /* @__PURE__ */ jsxs21(Fragment10, { children: [
2538
- /* @__PURE__ */ jsx59(
2560
+ /* @__PURE__ */ jsx60(
2539
2561
  FieldInput_default,
2540
2562
  {
2541
2563
  id,
@@ -2543,7 +2565,7 @@ function SegmentedInputRendererComponent(props) {
2543
2565
  help,
2544
2566
  description,
2545
2567
  validation: validationState,
2546
- children: /* @__PURE__ */ jsx59(
2568
+ children: /* @__PURE__ */ jsx60(
2547
2569
  SegmentedControl,
2548
2570
  {
2549
2571
  name: `${id}-segmented-control`,
@@ -2560,26 +2582,26 @@ function SegmentedInputRendererComponent(props) {
2560
2582
  )
2561
2583
  }
2562
2584
  ),
2563
- /* @__PURE__ */ jsx59("div", { id: `${id}-children`, children })
2585
+ /* @__PURE__ */ jsx60("div", { id: `${id}-children`, children })
2564
2586
  ] });
2565
2587
  }
2566
2588
  var isValidIndex2 = (index, options) => index !== null && index >= 0 && index < options;
2567
2589
 
2568
2590
  // ../renderers/src/SelectInputRenderer/SelectInputRenderer.tsx
2569
- import { jsx as jsx60 } from "react/jsx-runtime";
2591
+ import { jsx as jsx61 } from "react/jsx-runtime";
2570
2592
  var SelectInputRenderer = {
2571
2593
  canRenderType: "input-select",
2572
2594
  render: (props) => {
2573
2595
  switch (props.control) {
2574
2596
  case "radio":
2575
- return /* @__PURE__ */ jsx60(RadioInputRendererComponent, __spreadValues({}, props));
2597
+ return /* @__PURE__ */ jsx61(RadioInputRendererComponent, __spreadValues({}, props));
2576
2598
  case "tab":
2577
- return props.options.length > 3 ? /* @__PURE__ */ jsx60(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx60(TabInputRendererComponent, __spreadValues({}, props));
2599
+ return props.options.length > 3 ? /* @__PURE__ */ jsx61(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx61(TabInputRendererComponent, __spreadValues({}, props));
2578
2600
  case "segmented":
2579
- return props.options.length > 3 ? /* @__PURE__ */ jsx60(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx60(SegmentedInputRendererComponent, __spreadValues({}, props));
2601
+ return props.options.length > 3 ? /* @__PURE__ */ jsx61(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx61(SegmentedInputRendererComponent, __spreadValues({}, props));
2580
2602
  case "select":
2581
2603
  default:
2582
- return /* @__PURE__ */ jsx60(SelectInputRendererComponent, __spreadValues({}, props));
2604
+ return /* @__PURE__ */ jsx61(SelectInputRendererComponent, __spreadValues({}, props));
2583
2605
  }
2584
2606
  }
2585
2607
  };
@@ -2587,17 +2609,17 @@ var SelectInputRenderer_default = SelectInputRenderer;
2587
2609
 
2588
2610
  // ../renderers/src/StatusListRenderer.tsx
2589
2611
  import { Header as Header9, Summary } from "@transferwise/components";
2590
- import { jsx as jsx61, jsxs as jsxs22 } from "react/jsx-runtime";
2612
+ import { jsx as jsx62, jsxs as jsxs22 } from "react/jsx-runtime";
2591
2613
  var StatusListRenderer = {
2592
2614
  canRenderType: "status-list",
2593
2615
  render: ({ margin, items, title }) => /* @__PURE__ */ jsxs22("div", { className: getMargin(margin), children: [
2594
- title ? /* @__PURE__ */ jsx61(Header9, { title, className: "m-b-2" }) : null,
2595
- items.map(({ callToAction, description, icon, status, title: itemTitle }) => /* @__PURE__ */ jsx61(
2616
+ title ? /* @__PURE__ */ jsx62(Header9, { title, className: "m-b-2" }) : null,
2617
+ items.map(({ callToAction, description, icon, status, title: itemTitle }) => /* @__PURE__ */ jsx62(
2596
2618
  Summary,
2597
2619
  {
2598
2620
  title: itemTitle,
2599
2621
  description,
2600
- icon: icon && "name" in icon ? /* @__PURE__ */ jsx61(DynamicIcon_default, { name: icon.name }) : null,
2622
+ icon: icon && "name" in icon ? /* @__PURE__ */ jsx62(DynamicIcon_default, { name: icon.name }) : null,
2601
2623
  status: mapStatus(status),
2602
2624
  action: getSummaryAction(callToAction)
2603
2625
  },
@@ -2651,22 +2673,22 @@ var useCustomTheme = (theme, trackEvent) => {
2651
2673
  // ../renderers/src/step/topbar/BackButton.tsx
2652
2674
  import { IconButton } from "@transferwise/components";
2653
2675
  import { ArrowLeft } from "@transferwise/icons";
2654
- import { jsx as jsx62, jsxs as jsxs23 } from "react/jsx-runtime";
2676
+ import { jsx as jsx63, jsxs as jsxs23 } from "react/jsx-runtime";
2655
2677
  function BackButton({ title, onClick }) {
2656
2678
  return /* @__PURE__ */ jsxs23(IconButton, { priority: "tertiary", onClick, children: [
2657
- /* @__PURE__ */ jsx62("span", { className: "sr-only", children: title }),
2658
- /* @__PURE__ */ jsx62(ArrowLeft, {})
2679
+ /* @__PURE__ */ jsx63("span", { className: "sr-only", children: title }),
2680
+ /* @__PURE__ */ jsx63(ArrowLeft, {})
2659
2681
  ] });
2660
2682
  }
2661
2683
 
2662
2684
  // ../renderers/src/step/topbar/Toolbar.tsx
2663
- import { Button as Button8, IconButton as IconButton2 } from "@transferwise/components";
2664
- import { jsx as jsx63, jsxs as jsxs24 } from "react/jsx-runtime";
2685
+ import { Button as Button7, IconButton as IconButton2 } from "@transferwise/components";
2686
+ import { jsx as jsx64, jsxs as jsxs24 } from "react/jsx-runtime";
2665
2687
  var Toolbar = ({ items }) => {
2666
- return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ jsx63("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ jsx63(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
2688
+ return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ jsx64("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ jsx64(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
2667
2689
  };
2668
2690
  function ToolbarButton(props) {
2669
- return prefersMedia(props.control) ? /* @__PURE__ */ jsx63(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ jsx63(TextToolbarButton, __spreadValues({}, props));
2691
+ return prefersMedia(props.control) ? /* @__PURE__ */ jsx64(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ jsx64(TextToolbarButton, __spreadValues({}, props));
2670
2692
  }
2671
2693
  function MediaToolbarButton(props) {
2672
2694
  var _a;
@@ -2683,7 +2705,7 @@ function MediaToolbarButton(props) {
2683
2705
  type,
2684
2706
  onClick,
2685
2707
  children: [
2686
- accessibilityDescription ? /* @__PURE__ */ jsx63("span", { className: "sr-only", children: accessibilityDescription }) : null,
2708
+ accessibilityDescription ? /* @__PURE__ */ jsx64("span", { className: "sr-only", children: accessibilityDescription }) : null,
2687
2709
  media ? (_a = getAddonStart(media)) == null ? void 0 : _a.value : null
2688
2710
  ]
2689
2711
  }
@@ -2692,10 +2714,10 @@ function MediaToolbarButton(props) {
2692
2714
  function TextToolbarButton(props) {
2693
2715
  const { context, control, title, media, disabled, onClick } = props;
2694
2716
  const addonStart = media ? getAddonStart(media) : void 0;
2695
- const priority = getPriority(control);
2717
+ const priority = getPriority2(control);
2696
2718
  const sentiment = getSentiment(context);
2697
- return /* @__PURE__ */ jsx63(
2698
- Button8,
2719
+ return /* @__PURE__ */ jsx64(
2720
+ Button7,
2699
2721
  {
2700
2722
  v2: true,
2701
2723
  size: "sm",
@@ -2723,7 +2745,7 @@ var getAddonStart = (media) => {
2723
2745
  return void 0;
2724
2746
  }
2725
2747
  };
2726
- var getPriority = (control) => isKnownControl(control) ? control : "secondary";
2748
+ var getPriority2 = (control) => isKnownControl(control) ? control : "secondary";
2727
2749
  var prefersMedia = (control) => {
2728
2750
  return false;
2729
2751
  };
@@ -2733,21 +2755,21 @@ var getSentiment = (context) => {
2733
2755
  return "default";
2734
2756
  };
2735
2757
  var getIconButtonPriority = (control) => {
2736
- const priority = getPriority(control);
2758
+ const priority = getPriority2(control);
2737
2759
  return priority === "secondary-neutral" ? "tertiary" : priority;
2738
2760
  };
2739
2761
 
2740
2762
  // ../renderers/src/step/topbar/TopBar.tsx
2741
- import { jsx as jsx64, jsxs as jsxs25 } from "react/jsx-runtime";
2763
+ import { jsx as jsx65, jsxs as jsxs25 } from "react/jsx-runtime";
2742
2764
  function TopBar({ back, toolbar }) {
2743
2765
  return back || toolbar ? /* @__PURE__ */ jsxs25("div", { className: "d-flex m-b-2", children: [
2744
- back ? /* @__PURE__ */ jsx64(BackButton, __spreadValues({}, back)) : null,
2745
- toolbar ? /* @__PURE__ */ jsx64(Toolbar, __spreadValues({}, toolbar)) : null
2766
+ back ? /* @__PURE__ */ jsx65(BackButton, __spreadValues({}, back)) : null,
2767
+ toolbar ? /* @__PURE__ */ jsx65(Toolbar, __spreadValues({}, toolbar)) : null
2746
2768
  ] }) : null;
2747
2769
  }
2748
2770
 
2749
2771
  // ../renderers/src/step/SplashCelebrationStepRenderer.tsx
2750
- import { jsx as jsx65, jsxs as jsxs26 } from "react/jsx-runtime";
2772
+ import { jsx as jsx66, jsxs as jsxs26 } from "react/jsx-runtime";
2751
2773
  var SplashCelebrationStepRenderer = {
2752
2774
  canRenderType: "step",
2753
2775
  canRender: ({ control }) => control === "splash-celebration",
@@ -2757,13 +2779,13 @@ function SplashCelebrationStepRendererComponent(props) {
2757
2779
  const { back, toolbar, children, trackEvent } = props;
2758
2780
  useCustomTheme("forest-green", trackEvent);
2759
2781
  return /* @__PURE__ */ jsxs26("div", { className: "splash-screen m-t-5", children: [
2760
- /* @__PURE__ */ jsx65(TopBar, { back, toolbar }),
2782
+ /* @__PURE__ */ jsx66(TopBar, { back, toolbar }),
2761
2783
  children
2762
2784
  ] });
2763
2785
  }
2764
2786
 
2765
2787
  // ../renderers/src/step/SplashStepRenderer.tsx
2766
- import { jsx as jsx66, jsxs as jsxs27 } from "react/jsx-runtime";
2788
+ import { jsx as jsx67, jsxs as jsxs27 } from "react/jsx-runtime";
2767
2789
  var SplashStepRenderer = {
2768
2790
  canRenderType: "step",
2769
2791
  canRender: ({ control }) => control === "splash",
@@ -2772,14 +2794,14 @@ var SplashStepRenderer = {
2772
2794
  function SplashStepRendererComponent(props) {
2773
2795
  const { back, toolbar, children } = props;
2774
2796
  return /* @__PURE__ */ jsxs27("div", { className: "splash-screen m-t-5", children: [
2775
- /* @__PURE__ */ jsx66(TopBar, { back, toolbar }),
2797
+ /* @__PURE__ */ jsx67(TopBar, { back, toolbar }),
2776
2798
  children
2777
2799
  ] });
2778
2800
  }
2779
2801
 
2780
2802
  // ../renderers/src/step/StepRenderer.tsx
2781
2803
  import { Alert as Alert2, Title as Title2 } from "@transferwise/components";
2782
- import { Fragment as Fragment11, jsx as jsx67, jsxs as jsxs28 } from "react/jsx-runtime";
2804
+ import { Fragment as Fragment11, jsx as jsx68, jsxs as jsxs28 } from "react/jsx-runtime";
2783
2805
  var StepRenderer = {
2784
2806
  canRenderType: "step",
2785
2807
  render: StepRendererComponent
@@ -2787,12 +2809,12 @@ var StepRenderer = {
2787
2809
  function StepRendererComponent(props) {
2788
2810
  const { back, description, error, title, children, toolbar } = props;
2789
2811
  return /* @__PURE__ */ jsxs28(Fragment11, { children: [
2790
- /* @__PURE__ */ jsx67(TopBar, { back, toolbar }),
2812
+ /* @__PURE__ */ jsx68(TopBar, { back, toolbar }),
2791
2813
  title || description ? /* @__PURE__ */ jsxs28("div", { className: "m-b-4", children: [
2792
- title ? /* @__PURE__ */ jsx67(Title2, { as: "h1", type: "title-section", className: "text-xs-center m-b-2", children: title }) : void 0,
2793
- description ? /* @__PURE__ */ jsx67("p", { className: "text-xs-center np-text-body-large", children: description }) : void 0
2814
+ title ? /* @__PURE__ */ jsx68(Title2, { as: "h1", type: "title-section", className: "text-xs-center m-b-2", children: title }) : void 0,
2815
+ description ? /* @__PURE__ */ jsx68("p", { className: "text-xs-center np-text-body-large", children: description }) : void 0
2794
2816
  ] }) : void 0,
2795
- error ? /* @__PURE__ */ jsx67(Alert2, { type: "negative", className: "m-b-2", message: error }) : void 0,
2817
+ error ? /* @__PURE__ */ jsx68(Alert2, { type: "negative", className: "m-b-2", message: error }) : void 0,
2796
2818
  children
2797
2819
  ] });
2798
2820
  }
@@ -2800,26 +2822,26 @@ function StepRendererComponent(props) {
2800
2822
  // ../renderers/src/TabsRenderer.tsx
2801
2823
  import { Chips, SegmentedControl as SegmentedControl2, Tabs as Tabs2 } from "@transferwise/components";
2802
2824
  import { useState as useState11 } from "react";
2803
- import { jsx as jsx68, jsxs as jsxs29 } from "react/jsx-runtime";
2825
+ import { jsx as jsx69, jsxs as jsxs29 } from "react/jsx-runtime";
2804
2826
  var TabsRenderer = {
2805
2827
  canRenderType: "tabs",
2806
2828
  render: (props) => {
2807
2829
  switch (props.control) {
2808
2830
  case "segmented":
2809
2831
  if (props.tabs.length > 3) {
2810
- return /* @__PURE__ */ jsx68(TabsRendererComponent, __spreadValues({}, props));
2832
+ return /* @__PURE__ */ jsx69(TabsRendererComponent, __spreadValues({}, props));
2811
2833
  }
2812
- return /* @__PURE__ */ jsx68(SegmentedTabsRendererComponent, __spreadValues({}, props));
2834
+ return /* @__PURE__ */ jsx69(SegmentedTabsRendererComponent, __spreadValues({}, props));
2813
2835
  case "chips":
2814
- return /* @__PURE__ */ jsx68(ChipsTabsRendererComponent, __spreadValues({}, props));
2836
+ return /* @__PURE__ */ jsx69(ChipsTabsRendererComponent, __spreadValues({}, props));
2815
2837
  default:
2816
- return /* @__PURE__ */ jsx68(TabsRendererComponent, __spreadValues({}, props));
2838
+ return /* @__PURE__ */ jsx69(TabsRendererComponent, __spreadValues({}, props));
2817
2839
  }
2818
2840
  }
2819
2841
  };
2820
2842
  function TabsRendererComponent({ uid, margin, tabs }) {
2821
2843
  const [selectedIndex, setSelectedIndex] = useState11(0);
2822
- return /* @__PURE__ */ jsx68("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx68(
2844
+ return /* @__PURE__ */ jsx69("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx69(
2823
2845
  Tabs2,
2824
2846
  {
2825
2847
  name: uid,
@@ -2841,7 +2863,7 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
2841
2863
  var _a;
2842
2864
  const [selectedIndex, setSelectedIndex] = useState11(0);
2843
2865
  return /* @__PURE__ */ jsxs29("div", { className: getMargin(margin), children: [
2844
- /* @__PURE__ */ jsx68(
2866
+ /* @__PURE__ */ jsx69(
2845
2867
  SegmentedControl2,
2846
2868
  {
2847
2869
  name: uid,
@@ -2856,14 +2878,14 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
2856
2878
  onChange: (value) => setSelectedIndex(Number(value))
2857
2879
  }
2858
2880
  ),
2859
- /* @__PURE__ */ jsx68("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
2881
+ /* @__PURE__ */ jsx69("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
2860
2882
  ] });
2861
2883
  }
2862
2884
  function ChipsTabsRendererComponent({ margin, tabs }) {
2863
2885
  var _a;
2864
2886
  const [selectedIndex, setSelectedIndex] = useState11(0);
2865
2887
  return /* @__PURE__ */ jsxs29("div", { className: getMargin(margin), children: [
2866
- /* @__PURE__ */ jsx68("div", { className: "chips-container", children: /* @__PURE__ */ jsx68(
2888
+ /* @__PURE__ */ jsx69("div", { className: "chips-container", children: /* @__PURE__ */ jsx69(
2867
2889
  Chips,
2868
2890
  {
2869
2891
  chips: tabs.map((tab, index) => ({ label: tab.title, value: index })),
@@ -2871,7 +2893,7 @@ function ChipsTabsRendererComponent({ margin, tabs }) {
2871
2893
  onChange: ({ selectedValue }) => setSelectedIndex(Number(selectedValue))
2872
2894
  }
2873
2895
  ) }),
2874
- /* @__PURE__ */ jsx68("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
2896
+ /* @__PURE__ */ jsx69("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
2875
2897
  ] });
2876
2898
  }
2877
2899
 
@@ -2886,7 +2908,7 @@ import {
2886
2908
  TextArea,
2887
2909
  TextareaWithDisplayFormat
2888
2910
  } from "@transferwise/components";
2889
- import { jsx as jsx69 } from "react/jsx-runtime";
2911
+ import { jsx as jsx70 } from "react/jsx-runtime";
2890
2912
  var commonKeys = [
2891
2913
  "autoComplete",
2892
2914
  "autoCapitalize",
@@ -2905,12 +2927,12 @@ function VariableTextInput(inputProps) {
2905
2927
  const commonProps = __spreadProps(__spreadValues({}, pick(inputProps, ...commonKeys)), { name: id });
2906
2928
  switch (control) {
2907
2929
  case "email":
2908
- return /* @__PURE__ */ jsx69(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
2930
+ return /* @__PURE__ */ jsx70(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
2909
2931
  case "password":
2910
- return /* @__PURE__ */ jsx69(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
2932
+ return /* @__PURE__ */ jsx70(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
2911
2933
  case "numeric": {
2912
2934
  const numericProps = __spreadProps(__spreadValues({}, commonProps), { type: "number", onWheel });
2913
- return /* @__PURE__ */ jsx69(
2935
+ return /* @__PURE__ */ jsx70(
2914
2936
  TextInput,
2915
2937
  __spreadProps(__spreadValues({}, numericProps), {
2916
2938
  onChange: (newValue) => {
@@ -2921,9 +2943,9 @@ function VariableTextInput(inputProps) {
2921
2943
  );
2922
2944
  }
2923
2945
  case "phone-number":
2924
- return /* @__PURE__ */ jsx69(PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
2946
+ return /* @__PURE__ */ jsx70(PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
2925
2947
  default: {
2926
- return /* @__PURE__ */ jsx69(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
2948
+ return /* @__PURE__ */ jsx70(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
2927
2949
  }
2928
2950
  }
2929
2951
  }
@@ -2931,11 +2953,11 @@ function TextInput(props) {
2931
2953
  const _a = props, { control, displayFormat, onChange } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange"]);
2932
2954
  const InputWithPattern = control === "textarea" ? TextareaWithDisplayFormat : InputWithDisplayFormat;
2933
2955
  const InputWithoutPattern = control === "textarea" ? TextArea : Input5;
2934
- return displayFormat ? /* @__PURE__ */ jsx69(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ jsx69(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { onChange: (e) => onChange(e.target.value) }));
2956
+ return displayFormat ? /* @__PURE__ */ jsx70(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ jsx70(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { onChange: (e) => onChange(e.target.value) }));
2935
2957
  }
2936
2958
 
2937
2959
  // ../renderers/src/TextInputRenderer.tsx
2938
- import { jsx as jsx70 } from "react/jsx-runtime";
2960
+ import { jsx as jsx71 } from "react/jsx-runtime";
2939
2961
  var TextInputRenderer = {
2940
2962
  canRenderType: "input-text",
2941
2963
  render: (props) => {
@@ -2968,7 +2990,7 @@ var TextInputRenderer = {
2968
2990
  }
2969
2991
  }
2970
2992
  });
2971
- return /* @__PURE__ */ jsx70(
2993
+ return /* @__PURE__ */ jsx71(
2972
2994
  FieldInput_default,
2973
2995
  {
2974
2996
  id,
@@ -2976,7 +2998,7 @@ var TextInputRenderer = {
2976
2998
  description,
2977
2999
  validation: validationState,
2978
3000
  help,
2979
- children: /* @__PURE__ */ jsx70(InputGroup3, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx70(VariableTextInput, __spreadValues({}, inputProps)) })
3001
+ children: /* @__PURE__ */ jsx71(InputGroup3, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx71(VariableTextInput, __spreadValues({}, inputProps)) })
2980
3002
  }
2981
3003
  );
2982
3004
  }
@@ -2990,7 +3012,7 @@ import { Upload, UploadInput as UploadInput2 } from "@transferwise/components";
2990
3012
  var getRandomId = () => Math.random().toString(36).substring(2);
2991
3013
 
2992
3014
  // ../renderers/src/UploadInputRenderer.tsx
2993
- import { jsx as jsx71 } from "react/jsx-runtime";
3015
+ import { jsx as jsx72 } from "react/jsx-runtime";
2994
3016
  var UploadInputRenderer = {
2995
3017
  canRenderType: "input-upload",
2996
3018
  render: (props) => {
@@ -3006,14 +3028,14 @@ var UploadInputRenderer = {
3006
3028
  };
3007
3029
  return (
3008
3030
  // We don't pass help here as there is no sensible place to display it
3009
- /* @__PURE__ */ jsx71(
3031
+ /* @__PURE__ */ jsx72(
3010
3032
  UploadFieldInput_default,
3011
3033
  {
3012
3034
  id,
3013
3035
  label: void 0,
3014
3036
  description: void 0,
3015
3037
  validation: validationState,
3016
- children: /* @__PURE__ */ jsx71(
3038
+ children: /* @__PURE__ */ jsx72(
3017
3039
  UploadInput2,
3018
3040
  {
3019
3041
  id,
@@ -3072,7 +3094,7 @@ var LargeUploadRenderer = {
3072
3094
  };
3073
3095
  const filetypes = acceptsToFileTypes(accepts);
3074
3096
  const usAccept = filetypes === "*" ? "*" : filetypes.join(",");
3075
- return /* @__PURE__ */ jsx71(
3097
+ return /* @__PURE__ */ jsx72(
3076
3098
  FieldInput_default,
3077
3099
  {
3078
3100
  id,
@@ -3080,7 +3102,7 @@ var LargeUploadRenderer = {
3080
3102
  description,
3081
3103
  validation: validationState,
3082
3104
  help,
3083
- children: /* @__PURE__ */ jsx71(
3105
+ children: /* @__PURE__ */ jsx72(
3084
3106
  Upload,
3085
3107
  __spreadProps(__spreadValues({}, uploadProps), {
3086
3108
  usAccept,
@@ -3101,7 +3123,7 @@ var getWiseRenderers = () => [
3101
3123
  AlertRenderer_default,
3102
3124
  CheckboxInputRenderer_default,
3103
3125
  BoxRenderer_default,
3104
- ButtonRenderer_default,
3126
+ ButtonRenderer,
3105
3127
  ColumnsRenderer_default,
3106
3128
  DateInputRenderer_default,
3107
3129
  DecisionRenderer_default,
@@ -3137,19 +3159,13 @@ var getWiseRenderers = () => [
3137
3159
  StepRenderer
3138
3160
  ];
3139
3161
 
3140
- // src/dynamicFlow/extensions/createRendererWithExtensions.ts
3141
- var RENDERER_REGISTRY = {
3142
- review: ReviewRenderer_default
3143
- };
3144
- function createRendererWithExtensions(type, options) {
3145
- const baseRenderer = RENDERER_REGISTRY[type];
3146
- const { extensions = {}, canRender, canRenderType } = options;
3147
- return __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, baseRenderer), canRenderType ? { canRenderType } : {}), canRender ? { canRender } : {}), {
3148
- extensions: __spreadValues(__spreadValues({}, baseRenderer.extensions), extensions)
3149
- });
3150
- }
3162
+ // ../renderers/src/ButtonRenderer/ButtonRendererV2.tsx
3163
+ import { Button as Button8 } from "@transferwise/components";
3164
+ import { useEffect as useEffect8, useState as useState12 } from "react";
3165
+ import { jsx as jsx73 } from "react/jsx-runtime";
3151
3166
 
3152
3167
  // src/index.ts
3168
+ import { makeHttpClient } from "@wise/dynamic-flow-client";
3153
3169
  import { findRendererPropsByType, isValidSchema, JsonSchemaForm } from "@wise/dynamic-flow-client";
3154
3170
 
3155
3171
  // src/i18n/index.ts
@@ -3177,7 +3193,7 @@ var cs_default = {
3177
3193
  "df.wise.CopyFeedback.copy": "Zkop\xEDrov\xE1no do schr\xE1nky",
3178
3194
  "df.wise.CopyFeedback.copyFailed": "Kop\xEDrov\xE1n\xED do schr\xE1nky se nezda\u0159ilo",
3179
3195
  "df.wise.Decision.all": "V\u0161e",
3180
- "df.wise.Decision.filterPlaceholder": "Start typing to search",
3196
+ "df.wise.Decision.filterPlaceholder": "Pro vyhled\xE1v\xE1n\xED za\u010Dn\u011Bte ps\xE1t",
3181
3197
  "df.wise.Decision.noResults": "\u017D\xE1dn\xE9 v\xFDsledky",
3182
3198
  "df.wise.Decision.popular": "Popul\xE1rn\xED",
3183
3199
  "df.wise.Decision.recent": "Ned\xE1vn\xE9",
@@ -3353,7 +3369,7 @@ var fr_default = {
3353
3369
  "df.wise.CopyFeedback.copy": "Copi\xE9 dans le presse-papier",
3354
3370
  "df.wise.CopyFeedback.copyFailed": "Impossible de copier dans le presse-papier",
3355
3371
  "df.wise.Decision.all": "Toutes",
3356
- "df.wise.Decision.filterPlaceholder": "Start typing to search",
3372
+ "df.wise.Decision.filterPlaceholder": "Commencez \xE0 \xE9crire pour effectuer une recherche",
3357
3373
  "df.wise.Decision.noResults": "Aucun r\xE9sultat",
3358
3374
  "df.wise.Decision.popular": "Populaires",
3359
3375
  "df.wise.Decision.recent": "R\xE9cents",
@@ -3397,7 +3413,7 @@ var hu_default = {
3397
3413
  "df.wise.CopyFeedback.copy": "V\xE1g\xF3lapra m\xE1solva",
3398
3414
  "df.wise.CopyFeedback.copyFailed": "Nem siker\xFClt a v\xE1g\xF3lapra m\xE1solni",
3399
3415
  "df.wise.Decision.all": "\xD6sszes",
3400
- "df.wise.Decision.filterPlaceholder": "Start typing to search",
3416
+ "df.wise.Decision.filterPlaceholder": "Kezdj el g\xE9pelni a keres\xE9shez",
3401
3417
  "df.wise.Decision.noResults": "Nincs tal\xE1lat",
3402
3418
  "df.wise.Decision.popular": "N\xE9pszer\u0171",
3403
3419
  "df.wise.Decision.recent": "Legut\xF3bbi",
@@ -3427,7 +3443,7 @@ var id_default = {
3427
3443
  "df.wise.ArraySchema.maxItemsError": "Harap tambahkan {maxItems} atau kurang.",
3428
3444
  "df.wise.ArraySchema.minItemsError": "Harap tambahkan setidaknya {minItems}.",
3429
3445
  "df.wise.ArraySchema.removeItem": "Hapus",
3430
- "df.wise.ButtonLayout.buttonLoadingMessage": "This might take a few seconds",
3446
+ "df.wise.ButtonLayout.buttonLoadingMessage": "Ini mungkin memakan waktu beberapa detik",
3431
3447
  "df.wise.ControlFeedback.maxLength": "Harap masukkan {maxLength} karakter atau kurang.",
3432
3448
  "df.wise.ControlFeedback.maximum": "Harap masukkan angka paling besar {maximum} atau kurang dari itu.",
3433
3449
  "df.wise.ControlFeedback.maximumDate": "Harap masukkan tanggal pada atau sebelum {maximum}.",
@@ -3441,7 +3457,7 @@ var id_default = {
3441
3457
  "df.wise.CopyFeedback.copy": "Disalin ke clipboard",
3442
3458
  "df.wise.CopyFeedback.copyFailed": "Gagal menyalin ke clipboard",
3443
3459
  "df.wise.Decision.all": "Semua",
3444
- "df.wise.Decision.filterPlaceholder": "Start typing to search",
3460
+ "df.wise.Decision.filterPlaceholder": "Mulai mengetik untuk mencari",
3445
3461
  "df.wise.Decision.noResults": "Tidak ada hasil",
3446
3462
  "df.wise.Decision.popular": "Populer",
3447
3463
  "df.wise.Decision.recent": "Terbaru",
@@ -3485,7 +3501,7 @@ var it_default = {
3485
3501
  "df.wise.CopyFeedback.copy": "Copiato negli appunti",
3486
3502
  "df.wise.CopyFeedback.copyFailed": "Impossibile copiare negli appunti",
3487
3503
  "df.wise.Decision.all": "Tutte",
3488
- "df.wise.Decision.filterPlaceholder": "Start typing to search",
3504
+ "df.wise.Decision.filterPlaceholder": "Inizia a digitare per cercare",
3489
3505
  "df.wise.Decision.noResults": "Nessun risultato",
3490
3506
  "df.wise.Decision.popular": "Popolari",
3491
3507
  "df.wise.Decision.recent": "Recenti",
@@ -3559,7 +3575,7 @@ var nl_default = {
3559
3575
  "df.wise.ArraySchema.maxItemsError": "Voeg {maxItems} of minder toe.",
3560
3576
  "df.wise.ArraySchema.minItemsError": "Voeg minimaal {minItems} toe.",
3561
3577
  "df.wise.ArraySchema.removeItem": "Verwijderen",
3562
- "df.wise.ButtonLayout.buttonLoadingMessage": "This might take a few seconds",
3578
+ "df.wise.ButtonLayout.buttonLoadingMessage": "Dit kan enkele seconden duren",
3563
3579
  "df.wise.ControlFeedback.maxLength": "Voer {maxLength} of minder tekens in.",
3564
3580
  "df.wise.ControlFeedback.maximum": "Voer een getal in dat {maximum} of lager is.",
3565
3581
  "df.wise.ControlFeedback.maximumDate": "Voer een datum in die op of voor {maximum} is.",
@@ -3573,7 +3589,7 @@ var nl_default = {
3573
3589
  "df.wise.CopyFeedback.copy": "Naar klembord gekopieerd",
3574
3590
  "df.wise.CopyFeedback.copyFailed": "Naar klembord kopi\xEBren mislukt",
3575
3591
  "df.wise.Decision.all": "Alles",
3576
- "df.wise.Decision.filterPlaceholder": "Start typing to search",
3592
+ "df.wise.Decision.filterPlaceholder": "Begin met typen om te zoeken",
3577
3593
  "df.wise.Decision.noResults": "Niks gevonden",
3578
3594
  "df.wise.Decision.popular": "Populair",
3579
3595
  "df.wise.Decision.recent": "Recent",
@@ -3925,7 +3941,7 @@ var zh_HK_default = {
3925
3941
  "df.wise.CopyFeedback.copy": "\u8907\u88FD\u5230\u526A\u8CBC\u677F",
3926
3942
  "df.wise.CopyFeedback.copyFailed": "\u7121\u6CD5\u8907\u88FD\u5230\u526A\u8CBC\u677F",
3927
3943
  "df.wise.Decision.all": "\u5168\u90E8",
3928
- "df.wise.Decision.filterPlaceholder": "Start typing to search",
3944
+ "df.wise.Decision.filterPlaceholder": "\u958B\u59CB\u8F38\u5165\u4EE5\u641C\u5C0B",
3929
3945
  "df.wise.Decision.noResults": "\u6C92\u6709\u7D50\u679C",
3930
3946
  "df.wise.Decision.popular": "\u71B1\u9580",
3931
3947
  "df.wise.Decision.recent": "\u6700\u8FD1\u7684",
@@ -3990,7 +4006,7 @@ import {
3990
4006
  // src/dynamicFlow/telemetry/app-version.ts
3991
4007
  var appVersion = (
3992
4008
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
3993
- typeof process !== "undefined" ? "4.23.0" : "0.0.0"
4009
+ typeof process !== "undefined" ? "4.24.0" : "0.0.0"
3994
4010
  );
3995
4011
 
3996
4012
  // src/dynamicFlow/telemetry/getLogEvent.ts
@@ -4045,12 +4061,12 @@ var messages_default = defineMessages10({
4045
4061
  });
4046
4062
 
4047
4063
  // src/dynamicFlow/DynamicFlow.tsx
4048
- import { jsx as jsx72 } from "react/jsx-runtime";
4064
+ import { jsx as jsx74 } from "react/jsx-runtime";
4049
4065
  var wiseRenderers = getWiseRenderers();
4050
4066
  function DynamicFlowLegacy(props) {
4051
4067
  const { customFetch = globalThis.fetch } = props;
4052
4068
  const coreProps = __spreadProps(__spreadValues({}, props), { httpClient: customFetch });
4053
- return /* @__PURE__ */ jsx72(DynamicFlowCoreLegacy, __spreadValues({}, coreProps));
4069
+ return /* @__PURE__ */ jsx74(DynamicFlowCoreLegacy, __spreadValues({}, coreProps));
4054
4070
  }
4055
4071
  function DynamicFlowRevamp(props) {
4056
4072
  const {
@@ -4087,7 +4103,7 @@ function DynamicFlowRevamp(props) {
4087
4103
  onLink,
4088
4104
  onCopy
4089
4105
  });
4090
- return /* @__PURE__ */ jsx72("div", { className, children: /* @__PURE__ */ jsx72(DynamicFlowCoreRevamp, __spreadValues({}, coreProps)) });
4106
+ return /* @__PURE__ */ jsx74("div", { className, children: /* @__PURE__ */ jsx74(DynamicFlowCoreRevamp, __spreadValues({}, coreProps)) });
4091
4107
  }
4092
4108
  var DynamicForm = forwardRef(function DynamicForm2(props, ref) {
4093
4109
  const {
@@ -4124,7 +4140,7 @@ var DynamicForm = forwardRef(function DynamicForm2(props, ref) {
4124
4140
  onLink,
4125
4141
  onCopy
4126
4142
  });
4127
- return /* @__PURE__ */ jsx72("div", { className, children: /* @__PURE__ */ jsx72(DynamicFormCore, __spreadProps(__spreadValues({}, coreProps), { ref })) });
4143
+ return /* @__PURE__ */ jsx74("div", { className, children: /* @__PURE__ */ jsx74(DynamicFormCore, __spreadProps(__spreadValues({}, coreProps), { ref })) });
4128
4144
  });
4129
4145
  var useWiseHttpClient = (httpClient) => {
4130
4146
  const { locale } = useIntl12();
@@ -4155,9 +4171,10 @@ export {
4155
4171
  DynamicFlowLegacy,
4156
4172
  DynamicFlowRevamp,
4157
4173
  DynamicForm,
4174
+ Header7 as Header,
4158
4175
  JsonSchemaForm,
4159
- createRendererWithExtensions,
4160
4176
  findRendererPropsByType,
4177
+ getMargin,
4161
4178
  isValidSchema,
4162
4179
  makeHttpClient as makeCustomFetch,
4163
4180
  i18n_default as translations