@wise/dynamic-flow-client-internal 4.24.0-experimental-renderer-extensions-779450d → 4.24.0

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
@@ -32,6 +32,7 @@ var __objRest = (source, exclude) => {
32
32
 
33
33
  // src/index.ts
34
34
  import { makeHttpClient } from "@wise/dynamic-flow-client";
35
+ import { findRendererPropsByType, isValidSchema, JsonSchemaForm } from "@wise/dynamic-flow-client";
35
36
 
36
37
  // ../renderers/src/AlertRenderer.tsx
37
38
  import { Alert } from "@transferwise/components";
@@ -171,6 +172,26 @@ var AddressValidationButtonRenderer_default = AddressValidationButtonRenderer;
171
172
  // ../renderers/src/ButtonRenderer/ButtonRenderer.tsx
172
173
  import { Button as Button2 } from "@transferwise/components";
173
174
  import { useEffect as useEffect2, useState as useState2 } from "react";
175
+
176
+ // ../renderers/src/ButtonRenderer/mapButtonSize.tsx
177
+ var mapButtonSize = (size) => {
178
+ if (!size) {
179
+ return void 0;
180
+ }
181
+ switch (size) {
182
+ case "xs":
183
+ case "sm":
184
+ return "sm";
185
+ case "lg":
186
+ case "xl":
187
+ return "lg";
188
+ case "md":
189
+ default:
190
+ return "md";
191
+ }
192
+ };
193
+
194
+ // ../renderers/src/ButtonRenderer/ButtonRenderer.tsx
174
195
  import { jsx as jsx4 } from "react/jsx-runtime";
175
196
  var ButtonRenderer = {
176
197
  canRenderType: "button",
@@ -184,8 +205,9 @@ function ButtonComponent(props) {
184
205
  setSpinny(false);
185
206
  }
186
207
  }, [stepLoadingState]);
187
- const priority = mapControl(control);
188
- const type = priority === "tertiary" ? void 0 : mapContext(context);
208
+ const priority = getPriority(control);
209
+ const type = getButtonType(context, priority);
210
+ const loading = spinny && stepLoadingState !== "idle";
189
211
  return /* @__PURE__ */ jsx4(
190
212
  Button2,
191
213
  {
@@ -193,8 +215,8 @@ function ButtonComponent(props) {
193
215
  className: getMargin(margin),
194
216
  disabled,
195
217
  priority,
196
- size: mapSize(size),
197
- loading: spinny && stepLoadingState !== "idle",
218
+ size: mapButtonSize(size),
219
+ loading,
198
220
  type,
199
221
  onClick: () => {
200
222
  setSpinny(true);
@@ -204,16 +226,7 @@ function ButtonComponent(props) {
204
226
  }
205
227
  );
206
228
  }
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) => {
229
+ var getPriority = (control) => {
217
230
  switch (control) {
218
231
  case "primary":
219
232
  case "tertiary":
@@ -222,23 +235,18 @@ var mapControl = (control) => {
222
235
  return "secondary";
223
236
  }
224
237
  };
225
- var mapSize = (size) => {
226
- if (!size) {
238
+ var getButtonType = (context, priority) => {
239
+ if (priority === "tertiary") {
227
240
  return void 0;
228
241
  }
229
- switch (size) {
230
- case "xs":
231
- case "sm":
232
- return "sm";
233
- case "lg":
234
- case "xl":
235
- return "lg";
236
- case "md":
242
+ switch (context) {
243
+ case "neutral":
244
+ case "warning":
245
+ return "accent";
237
246
  default:
238
- return "md";
247
+ return context;
239
248
  }
240
249
  };
241
- var ButtonRenderer_default = ButtonRenderer;
242
250
 
243
251
  // ../renderers/src/components/FieldInput.tsx
244
252
  import { Field } from "@transferwise/components";
@@ -1009,6 +1017,7 @@ function ExternalConfirmationRendererComponent({
1009
1017
  /* @__PURE__ */ jsx27(
1010
1018
  Button3,
1011
1019
  {
1020
+ v2: true,
1012
1021
  block: true,
1013
1022
  className: "m-b-2",
1014
1023
  priority: "primary",
@@ -1020,7 +1029,7 @@ function ExternalConfirmationRendererComponent({
1020
1029
  children: formatMessage(external_confirmation_messages_default.open)
1021
1030
  }
1022
1031
  ),
1023
- /* @__PURE__ */ jsx27(Button3, { block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
1032
+ /* @__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
1033
  ] }) })
1025
1034
  ] }),
1026
1035
  onClose: onCancel
@@ -1502,7 +1511,7 @@ function DFModal({ content, margin, trigger }) {
1502
1511
  const [visible, setVisible] = useState6(false);
1503
1512
  const { children, title } = content;
1504
1513
  return /* @__PURE__ */ jsxs10("div", { className: getMargin(margin), children: [
1505
- /* @__PURE__ */ jsx42(Button4, { priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
1514
+ /* @__PURE__ */ jsx42(Button4, { v2: true, priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
1506
1515
  /* @__PURE__ */ jsx42(
1507
1516
  Modal2,
1508
1517
  {
@@ -1866,7 +1875,7 @@ function CopyableParagraph({
1866
1875
  className: classNames5("text-ellipsis", inputAlignmentClasses)
1867
1876
  }
1868
1877
  ),
1869
- /* @__PURE__ */ jsx48(Button5, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
1878
+ /* @__PURE__ */ jsx48(Button5, { v2: true, block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
1870
1879
  ] });
1871
1880
  }
1872
1881
  var ParagraphRenderer_default = ParagraphRenderer;
@@ -1979,7 +1988,17 @@ function Repeatable(props) {
1979
1988
  /* @__PURE__ */ jsx49("div", { className: "m-b-2", children: editableItem }),
1980
1989
  /* @__PURE__ */ jsxs13("div", { children: [
1981
1990
  /* @__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) })
1991
+ /* @__PURE__ */ jsx49(
1992
+ Button6,
1993
+ {
1994
+ v2: true,
1995
+ priority: "secondary",
1996
+ sentiment: "negative",
1997
+ block: true,
1998
+ onClick: () => onRemoveItem(),
1999
+ children: formatMessage(repeatable_messages_default.removeItem)
2000
+ }
2001
+ )
1983
2002
  ] })
1984
2003
  ] }),
1985
2004
  onClose: () => onCancelEdit()
@@ -2005,9 +2024,12 @@ function ItemSummaryOption({
2005
2024
  var RepeatableRenderer_default = RepeatableRenderer;
2006
2025
 
2007
2026
  // ../renderers/src/ReviewRenderer.tsx
2008
- import { DefinitionList, Header as Header7 } from "@transferwise/components";
2027
+ import { DefinitionList } from "@transferwise/components";
2009
2028
 
2010
- // ../renderers/src/utils/getHeaderAction.tsx
2029
+ // ../renderers/src/components/Header.tsx
2030
+ import { Header as DSHeader } from "@transferwise/components";
2031
+ import { jsx as jsx50 } from "react/jsx-runtime";
2032
+ var Header7 = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */ jsx50(DSHeader, { title: title != null ? title : "", action: getHeaderAction(callToAction) });
2011
2033
  var getHeaderAction = (callToAction) => {
2012
2034
  if (!callToAction) {
2013
2035
  return void 0;
@@ -2029,34 +2051,28 @@ var getHeaderAction = (callToAction) => {
2029
2051
  };
2030
2052
 
2031
2053
  // ../renderers/src/ReviewRenderer.tsx
2032
- import { Fragment as Fragment5, jsx as jsx50, jsxs as jsxs14 } from "react/jsx-runtime";
2054
+ import { Fragment as Fragment5, jsx as jsx51, jsxs as jsxs14 } from "react/jsx-runtime";
2033
2055
  var ReviewRenderer = {
2034
2056
  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 }) {
2057
+ render: ({ callToAction, control, fields, margin, title, trackEvent }) => {
2048
2058
  const orientation = mapControlToDefinitionListLayout(control);
2049
2059
  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(
2060
+ /* @__PURE__ */ jsx51(Header7, { title, callToAction }),
2061
+ /* @__PURE__ */ jsx51("div", { className: margin, children: /* @__PURE__ */ jsx51(
2052
2062
  DefinitionList,
2053
2063
  {
2054
2064
  layout: orientation,
2055
2065
  definitions: fields.map(
2056
- (field) => this.extensions.field(__spreadProps(__spreadValues({}, field), {
2057
- orientation,
2058
- trackEvent
2059
- }))
2066
+ ({ label, value, help, analyticsId: fieldAnalyticsId }, index) => ({
2067
+ key: String(index),
2068
+ title: label,
2069
+ value: getFieldValue(
2070
+ value,
2071
+ help,
2072
+ orientation,
2073
+ () => trackEvent("Help Pressed", { layoutItemId: fieldAnalyticsId })
2074
+ )
2075
+ })
2060
2076
  )
2061
2077
  }
2062
2078
  ) })
@@ -2082,13 +2098,13 @@ var mapControlToDefinitionListLayout = (control) => {
2082
2098
  var getFieldValue = (value, help, orientation, onClick) => {
2083
2099
  if (help) {
2084
2100
  return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ jsxs14(Fragment5, { children: [
2085
- /* @__PURE__ */ jsx50(Help_default, { help, onClick }),
2101
+ /* @__PURE__ */ jsx51(Help_default, { help, onClick }),
2086
2102
  " ",
2087
2103
  value
2088
2104
  ] }) : /* @__PURE__ */ jsxs14(Fragment5, { children: [
2089
2105
  value,
2090
2106
  " ",
2091
- /* @__PURE__ */ jsx50(Help_default, { help, onClick })
2107
+ /* @__PURE__ */ jsx51(Help_default, { help, onClick })
2092
2108
  ] });
2093
2109
  }
2094
2110
  return value;
@@ -2133,32 +2149,19 @@ var generic_error_messages_default = defineMessages9({
2133
2149
  });
2134
2150
 
2135
2151
  // ../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";
2152
+ import { Link } from "@transferwise/components";
2153
+ import { jsx as jsx52, jsxs as jsxs15 } from "react/jsx-runtime";
2138
2154
  function ErrorResult({ state }) {
2139
2155
  const intl = useIntl9();
2140
- const buttonVisualProps = {
2141
- priority: "tertiary",
2142
- size: "sm",
2143
- style: { marginTop: "-2px", padding: "0", width: "auto", display: "inline" }
2144
- };
2145
2156
  return /* @__PURE__ */ jsxs15("p", { className: "m-t-2", children: [
2146
2157
  intl.formatMessage(generic_error_messages_default.genericError),
2147
2158
  "\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
- )
2159
+ /* @__PURE__ */ jsx52(Link, { onClick: () => state.onRetry(), children: intl.formatMessage(generic_error_messages_default.retry) })
2157
2160
  ] });
2158
2161
  }
2159
2162
 
2160
2163
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
2161
- import { Fragment as Fragment6, jsx as jsx52, jsxs as jsxs16 } from "react/jsx-runtime";
2164
+ import { Fragment as Fragment6, jsx as jsx53, jsxs as jsxs16 } from "react/jsx-runtime";
2162
2165
  function BlockSearchRendererComponent({
2163
2166
  id,
2164
2167
  isLoading,
@@ -2172,7 +2175,7 @@ function BlockSearchRendererComponent({
2172
2175
  const [hasSearched, setHasSearched] = useState9(false);
2173
2176
  const { formatMessage } = useIntl10();
2174
2177
  return /* @__PURE__ */ jsxs16("div", { className: getMargin(margin), children: [
2175
- /* @__PURE__ */ jsx52(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx52(
2178
+ /* @__PURE__ */ jsx53(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx53(
2176
2179
  Input4,
2177
2180
  {
2178
2181
  id,
@@ -2189,7 +2192,7 @@ function BlockSearchRendererComponent({
2189
2192
  }
2190
2193
  }
2191
2194
  ) }),
2192
- isLoading ? /* @__PURE__ */ jsx52(Fragment6, { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ jsx52(SearchResultContent, { state, trackEvent })
2195
+ isLoading ? /* @__PURE__ */ jsx53(Fragment6, { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ jsx53(SearchResultContent, { state, trackEvent })
2193
2196
  ] });
2194
2197
  }
2195
2198
  function SearchResultContent({
@@ -2198,26 +2201,26 @@ function SearchResultContent({
2198
2201
  }) {
2199
2202
  switch (state.type) {
2200
2203
  case "error":
2201
- return /* @__PURE__ */ jsx52(ErrorResult, { state });
2204
+ return /* @__PURE__ */ jsx53(ErrorResult, { state });
2202
2205
  case "results":
2203
- return /* @__PURE__ */ jsx52(SearchResults, { state, trackEvent });
2206
+ return /* @__PURE__ */ jsx53(SearchResults, { state, trackEvent });
2204
2207
  case "noResults":
2205
- return /* @__PURE__ */ jsx52(EmptySearchResult, { state });
2208
+ return /* @__PURE__ */ jsx53(EmptySearchResult, { state });
2206
2209
  case "pending":
2207
2210
  default:
2208
2211
  return null;
2209
2212
  }
2210
2213
  }
2211
2214
  function EmptySearchResult({ state }) {
2212
- return /* @__PURE__ */ jsx52(Markdown4, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
2215
+ return /* @__PURE__ */ jsx53(Markdown4, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
2213
2216
  }
2214
2217
  function SearchResults({
2215
2218
  state,
2216
2219
  trackEvent
2217
2220
  }) {
2218
- return /* @__PURE__ */ jsx52(NavigationOptionsList2, { children: state.results.map((result) => {
2221
+ return /* @__PURE__ */ jsx53(NavigationOptionsList2, { children: state.results.map((result) => {
2219
2222
  const { media } = result;
2220
- return /* @__PURE__ */ jsx52(
2223
+ return /* @__PURE__ */ jsx53(
2221
2224
  NavigationOption3,
2222
2225
  {
2223
2226
  title: result.title,
@@ -2243,7 +2246,7 @@ import { Markdown as Markdown5, Typeahead } from "@transferwise/components";
2243
2246
  import { Search } from "@transferwise/icons";
2244
2247
  import { useState as useState10 } from "react";
2245
2248
  import { useIntl as useIntl11 } from "react-intl";
2246
- import { jsx as jsx53 } from "react/jsx-runtime";
2249
+ import { jsx as jsx54 } from "react/jsx-runtime";
2247
2250
  function InlineSearchRenderer({
2248
2251
  id,
2249
2252
  isLoading,
@@ -2255,7 +2258,7 @@ function InlineSearchRenderer({
2255
2258
  }) {
2256
2259
  const [hasSearched, setHasSearched] = useState10(false);
2257
2260
  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(
2261
+ return /* @__PURE__ */ jsx54("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx54(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx54(
2259
2262
  Typeahead,
2260
2263
  {
2261
2264
  id: "typeahead-input-id",
@@ -2263,10 +2266,10 @@ function InlineSearchRenderer({
2263
2266
  name: "typeahead-input-name",
2264
2267
  size: "md",
2265
2268
  maxHeight: 100,
2266
- footer: /* @__PURE__ */ jsx53(TypeaheadFooter, { state, isLoading }),
2269
+ footer: /* @__PURE__ */ jsx54(TypeaheadFooter, { state, isLoading }),
2267
2270
  multiple: false,
2268
2271
  clearable: false,
2269
- addon: /* @__PURE__ */ jsx53(Search, { size: 24 }),
2272
+ addon: /* @__PURE__ */ jsx54(Search, { size: 24 }),
2270
2273
  options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
2271
2274
  minQueryLength: 1,
2272
2275
  onChange: (values) => {
@@ -2303,34 +2306,57 @@ function mapResultToTypeaheadOption(result) {
2303
2306
  function TypeaheadFooter({ state, isLoading }) {
2304
2307
  const { formatMessage } = useIntl11();
2305
2308
  if (state.type === "noResults") {
2306
- return /* @__PURE__ */ jsx53(Markdown5, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
2309
+ return /* @__PURE__ */ jsx54(Markdown5, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
2307
2310
  }
2308
2311
  if (state.type === "error") {
2309
- return /* @__PURE__ */ jsx53("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx53(ErrorResult, { state }) });
2312
+ return /* @__PURE__ */ jsx54("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx54(ErrorResult, { state }) });
2310
2313
  }
2311
2314
  if (state.type === "pending" || isLoading) {
2312
- return /* @__PURE__ */ jsx53("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
2315
+ return /* @__PURE__ */ jsx54("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
2313
2316
  }
2314
2317
  return null;
2315
2318
  }
2316
2319
  var InlineSearchRendererComponent_default = InlineSearchRenderer;
2317
2320
 
2318
2321
  // ../renderers/src/SearchRenderer/SearchRenderer.tsx
2319
- import { jsx as jsx54 } from "react/jsx-runtime";
2322
+ import { jsx as jsx55 } from "react/jsx-runtime";
2320
2323
  var SearchRenderer = {
2321
2324
  canRenderType: "search",
2322
- render: (props) => props.control === "inline" ? /* @__PURE__ */ jsx54(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ jsx54(BlockSearchRendererComponent_default, __spreadValues({}, props))
2325
+ render: (props) => props.control === "inline" ? /* @__PURE__ */ jsx55(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ jsx55(BlockSearchRendererComponent_default, __spreadValues({}, props))
2323
2326
  };
2324
2327
  var SearchRenderer_default = SearchRenderer;
2325
2328
 
2326
2329
  // ../renderers/src/SectionRenderer.tsx
2327
2330
  import { Header as Header8 } from "@transferwise/components";
2328
- import { jsx as jsx55, jsxs as jsxs17 } from "react/jsx-runtime";
2331
+
2332
+ // ../renderers/src/utils/getHeaderAction.tsx
2333
+ var getHeaderAction2 = (callToAction) => {
2334
+ if (!callToAction) {
2335
+ return void 0;
2336
+ }
2337
+ const { accessibilityDescription, href, title, onClick } = callToAction;
2338
+ return href ? {
2339
+ "aria-label": accessibilityDescription,
2340
+ text: title,
2341
+ href,
2342
+ target: "_blank"
2343
+ } : {
2344
+ "aria-label": accessibilityDescription,
2345
+ text: title,
2346
+ onClick: (event) => {
2347
+ event.preventDefault();
2348
+ onClick();
2349
+ }
2350
+ };
2351
+ };
2352
+
2353
+ // ../renderers/src/SectionRenderer.tsx
2354
+ import { jsx as jsx56, jsxs as jsxs17 } from "react/jsx-runtime";
2329
2355
  var SectionRenderer = {
2330
2356
  canRenderType: "section",
2331
2357
  render: ({ children, callToAction, margin, title }) => {
2332
2358
  return /* @__PURE__ */ jsxs17("section", { className: getMargin(margin), children: [
2333
- (title || callToAction) && /* @__PURE__ */ jsx55(Header8, { title: title != null ? title : "", action: getHeaderAction(callToAction) }),
2359
+ (title || callToAction) && /* @__PURE__ */ jsx56(Header8, { title: title != null ? title : "", action: getHeaderAction2(callToAction) }),
2334
2360
  children
2335
2361
  ] });
2336
2362
  }
@@ -2339,7 +2365,7 @@ var SectionRenderer_default = SectionRenderer;
2339
2365
 
2340
2366
  // ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
2341
2367
  import { RadioGroup } from "@transferwise/components";
2342
- import { Fragment as Fragment7, jsx as jsx56, jsxs as jsxs18 } from "react/jsx-runtime";
2368
+ import { Fragment as Fragment7, jsx as jsx57, jsxs as jsxs18 } from "react/jsx-runtime";
2343
2369
  function RadioInputRendererComponent(props) {
2344
2370
  const {
2345
2371
  id,
@@ -2354,7 +2380,7 @@ function RadioInputRendererComponent(props) {
2354
2380
  onSelect
2355
2381
  } = props;
2356
2382
  return /* @__PURE__ */ jsxs18(Fragment7, { children: [
2357
- /* @__PURE__ */ jsx56(
2383
+ /* @__PURE__ */ jsx57(
2358
2384
  FieldInput_default,
2359
2385
  {
2360
2386
  id,
@@ -2362,7 +2388,7 @@ function RadioInputRendererComponent(props) {
2362
2388
  help,
2363
2389
  description,
2364
2390
  validation: validationState,
2365
- children: /* @__PURE__ */ jsx56("span", { children: /* @__PURE__ */ jsx56(
2391
+ children: /* @__PURE__ */ jsx57("span", { children: /* @__PURE__ */ jsx57(
2366
2392
  RadioGroup,
2367
2393
  {
2368
2394
  name: id,
@@ -2371,7 +2397,7 @@ function RadioInputRendererComponent(props) {
2371
2397
  value: index,
2372
2398
  secondary: option.description,
2373
2399
  disabled: option.disabled || disabled,
2374
- avatar: /* @__PURE__ */ jsx56(OptionMedia, { media: option.media, preferAvatar: false })
2400
+ avatar: /* @__PURE__ */ jsx57(OptionMedia, { media: option.media, preferAvatar: false })
2375
2401
  })),
2376
2402
  selectedValue: selectedIndex != null ? selectedIndex : void 0,
2377
2403
  onChange: onSelect
@@ -2387,7 +2413,7 @@ function RadioInputRendererComponent(props) {
2387
2413
  // ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
2388
2414
  import { Tabs } from "@transferwise/components";
2389
2415
  import { useEffect as useEffect5 } from "react";
2390
- import { Fragment as Fragment8, jsx as jsx57, jsxs as jsxs19 } from "react/jsx-runtime";
2416
+ import { Fragment as Fragment8, jsx as jsx58, jsxs as jsxs19 } from "react/jsx-runtime";
2391
2417
  function TabInputRendererComponent(props) {
2392
2418
  const {
2393
2419
  id,
@@ -2407,7 +2433,7 @@ function TabInputRendererComponent(props) {
2407
2433
  }
2408
2434
  }, [selectedIndex, onSelect, options.length]);
2409
2435
  return /* @__PURE__ */ jsxs19(Fragment8, { children: [
2410
- /* @__PURE__ */ jsx57(
2436
+ /* @__PURE__ */ jsx58(
2411
2437
  FieldInput_default,
2412
2438
  {
2413
2439
  id,
@@ -2415,7 +2441,7 @@ function TabInputRendererComponent(props) {
2415
2441
  help,
2416
2442
  description,
2417
2443
  validation: validationState,
2418
- children: /* @__PURE__ */ jsx57(
2444
+ children: /* @__PURE__ */ jsx58(
2419
2445
  Tabs,
2420
2446
  {
2421
2447
  name: id,
@@ -2424,7 +2450,7 @@ function TabInputRendererComponent(props) {
2424
2450
  title: option.title,
2425
2451
  // if we pass null, we get some props-types console errors
2426
2452
  // eslint-disable-next-line react/jsx-no-useless-fragment
2427
- content: /* @__PURE__ */ jsx57(Fragment8, {}),
2453
+ content: /* @__PURE__ */ jsx58(Fragment8, {}),
2428
2454
  disabled: option.disabled || disabled
2429
2455
  })),
2430
2456
  onTabSelect: onSelect
@@ -2439,7 +2465,7 @@ var isValidIndex = (index, options) => index !== null && index >= 0 && index < o
2439
2465
 
2440
2466
  // ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
2441
2467
  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";
2468
+ import { Fragment as Fragment9, jsx as jsx59, jsxs as jsxs20 } from "react/jsx-runtime";
2443
2469
  function SelectInputRendererComponent(props) {
2444
2470
  const {
2445
2471
  id,
@@ -2479,13 +2505,13 @@ function SelectInputRendererComponent(props) {
2479
2505
  } : {
2480
2506
  title: option.title,
2481
2507
  description: option.description,
2482
- icon: /* @__PURE__ */ jsx58(OptionMedia, { media: option.media, preferAvatar: false })
2508
+ icon: /* @__PURE__ */ jsx59(OptionMedia, { media: option.media, preferAvatar: false })
2483
2509
  };
2484
- return /* @__PURE__ */ jsx58(SelectInputOptionContent2, __spreadValues({}, contentProps));
2510
+ return /* @__PURE__ */ jsx59(SelectInputOptionContent2, __spreadValues({}, contentProps));
2485
2511
  };
2486
2512
  const extraProps = { autoComplete };
2487
2513
  return /* @__PURE__ */ jsxs20(Fragment9, { children: [
2488
- /* @__PURE__ */ jsx58(
2514
+ /* @__PURE__ */ jsx59(
2489
2515
  FieldInput_default,
2490
2516
  {
2491
2517
  id,
@@ -2493,7 +2519,7 @@ function SelectInputRendererComponent(props) {
2493
2519
  help,
2494
2520
  description,
2495
2521
  validation: validationState,
2496
- children: /* @__PURE__ */ jsx58(
2522
+ children: /* @__PURE__ */ jsx59(
2497
2523
  SelectInput2,
2498
2524
  __spreadValues({
2499
2525
  name: id,
@@ -2516,7 +2542,7 @@ function SelectInputRendererComponent(props) {
2516
2542
  // ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
2517
2543
  import { useEffect as useEffect6 } from "react";
2518
2544
  import { SegmentedControl } from "@transferwise/components";
2519
- import { Fragment as Fragment10, jsx as jsx59, jsxs as jsxs21 } from "react/jsx-runtime";
2545
+ import { Fragment as Fragment10, jsx as jsx60, jsxs as jsxs21 } from "react/jsx-runtime";
2520
2546
  function SegmentedInputRendererComponent(props) {
2521
2547
  const {
2522
2548
  id,
@@ -2535,7 +2561,7 @@ function SegmentedInputRendererComponent(props) {
2535
2561
  }
2536
2562
  }, [selectedIndex, onSelect, options.length]);
2537
2563
  return /* @__PURE__ */ jsxs21(Fragment10, { children: [
2538
- /* @__PURE__ */ jsx59(
2564
+ /* @__PURE__ */ jsx60(
2539
2565
  FieldInput_default,
2540
2566
  {
2541
2567
  id,
@@ -2543,7 +2569,7 @@ function SegmentedInputRendererComponent(props) {
2543
2569
  help,
2544
2570
  description,
2545
2571
  validation: validationState,
2546
- children: /* @__PURE__ */ jsx59(
2572
+ children: /* @__PURE__ */ jsx60(
2547
2573
  SegmentedControl,
2548
2574
  {
2549
2575
  name: `${id}-segmented-control`,
@@ -2560,26 +2586,26 @@ function SegmentedInputRendererComponent(props) {
2560
2586
  )
2561
2587
  }
2562
2588
  ),
2563
- /* @__PURE__ */ jsx59("div", { id: `${id}-children`, children })
2589
+ /* @__PURE__ */ jsx60("div", { id: `${id}-children`, children })
2564
2590
  ] });
2565
2591
  }
2566
2592
  var isValidIndex2 = (index, options) => index !== null && index >= 0 && index < options;
2567
2593
 
2568
2594
  // ../renderers/src/SelectInputRenderer/SelectInputRenderer.tsx
2569
- import { jsx as jsx60 } from "react/jsx-runtime";
2595
+ import { jsx as jsx61 } from "react/jsx-runtime";
2570
2596
  var SelectInputRenderer = {
2571
2597
  canRenderType: "input-select",
2572
2598
  render: (props) => {
2573
2599
  switch (props.control) {
2574
2600
  case "radio":
2575
- return /* @__PURE__ */ jsx60(RadioInputRendererComponent, __spreadValues({}, props));
2601
+ return /* @__PURE__ */ jsx61(RadioInputRendererComponent, __spreadValues({}, props));
2576
2602
  case "tab":
2577
- return props.options.length > 3 ? /* @__PURE__ */ jsx60(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx60(TabInputRendererComponent, __spreadValues({}, props));
2603
+ return props.options.length > 3 ? /* @__PURE__ */ jsx61(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx61(TabInputRendererComponent, __spreadValues({}, props));
2578
2604
  case "segmented":
2579
- return props.options.length > 3 ? /* @__PURE__ */ jsx60(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx60(SegmentedInputRendererComponent, __spreadValues({}, props));
2605
+ return props.options.length > 3 ? /* @__PURE__ */ jsx61(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx61(SegmentedInputRendererComponent, __spreadValues({}, props));
2580
2606
  case "select":
2581
2607
  default:
2582
- return /* @__PURE__ */ jsx60(SelectInputRendererComponent, __spreadValues({}, props));
2608
+ return /* @__PURE__ */ jsx61(SelectInputRendererComponent, __spreadValues({}, props));
2583
2609
  }
2584
2610
  }
2585
2611
  };
@@ -2587,17 +2613,17 @@ var SelectInputRenderer_default = SelectInputRenderer;
2587
2613
 
2588
2614
  // ../renderers/src/StatusListRenderer.tsx
2589
2615
  import { Header as Header9, Summary } from "@transferwise/components";
2590
- import { jsx as jsx61, jsxs as jsxs22 } from "react/jsx-runtime";
2616
+ import { jsx as jsx62, jsxs as jsxs22 } from "react/jsx-runtime";
2591
2617
  var StatusListRenderer = {
2592
2618
  canRenderType: "status-list",
2593
2619
  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(
2620
+ title ? /* @__PURE__ */ jsx62(Header9, { title, className: "m-b-2" }) : null,
2621
+ items.map(({ callToAction, description, icon, status, title: itemTitle }) => /* @__PURE__ */ jsx62(
2596
2622
  Summary,
2597
2623
  {
2598
2624
  title: itemTitle,
2599
2625
  description,
2600
- icon: icon && "name" in icon ? /* @__PURE__ */ jsx61(DynamicIcon_default, { name: icon.name }) : null,
2626
+ icon: icon && "name" in icon ? /* @__PURE__ */ jsx62(DynamicIcon_default, { name: icon.name }) : null,
2601
2627
  status: mapStatus(status),
2602
2628
  action: getSummaryAction(callToAction)
2603
2629
  },
@@ -2651,22 +2677,22 @@ var useCustomTheme = (theme, trackEvent) => {
2651
2677
  // ../renderers/src/step/topbar/BackButton.tsx
2652
2678
  import { IconButton } from "@transferwise/components";
2653
2679
  import { ArrowLeft } from "@transferwise/icons";
2654
- import { jsx as jsx62, jsxs as jsxs23 } from "react/jsx-runtime";
2680
+ import { jsx as jsx63, jsxs as jsxs23 } from "react/jsx-runtime";
2655
2681
  function BackButton({ title, onClick }) {
2656
2682
  return /* @__PURE__ */ jsxs23(IconButton, { priority: "tertiary", onClick, children: [
2657
- /* @__PURE__ */ jsx62("span", { className: "sr-only", children: title }),
2658
- /* @__PURE__ */ jsx62(ArrowLeft, {})
2683
+ /* @__PURE__ */ jsx63("span", { className: "sr-only", children: title }),
2684
+ /* @__PURE__ */ jsx63(ArrowLeft, {})
2659
2685
  ] });
2660
2686
  }
2661
2687
 
2662
2688
  // ../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";
2689
+ import { Button as Button7, IconButton as IconButton2 } from "@transferwise/components";
2690
+ import { jsx as jsx64, jsxs as jsxs24 } from "react/jsx-runtime";
2665
2691
  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;
2692
+ 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
2693
  };
2668
2694
  function ToolbarButton(props) {
2669
- return prefersMedia(props.control) ? /* @__PURE__ */ jsx63(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ jsx63(TextToolbarButton, __spreadValues({}, props));
2695
+ return prefersMedia(props.control) ? /* @__PURE__ */ jsx64(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ jsx64(TextToolbarButton, __spreadValues({}, props));
2670
2696
  }
2671
2697
  function MediaToolbarButton(props) {
2672
2698
  var _a;
@@ -2683,7 +2709,7 @@ function MediaToolbarButton(props) {
2683
2709
  type,
2684
2710
  onClick,
2685
2711
  children: [
2686
- accessibilityDescription ? /* @__PURE__ */ jsx63("span", { className: "sr-only", children: accessibilityDescription }) : null,
2712
+ accessibilityDescription ? /* @__PURE__ */ jsx64("span", { className: "sr-only", children: accessibilityDescription }) : null,
2687
2713
  media ? (_a = getAddonStart(media)) == null ? void 0 : _a.value : null
2688
2714
  ]
2689
2715
  }
@@ -2692,10 +2718,10 @@ function MediaToolbarButton(props) {
2692
2718
  function TextToolbarButton(props) {
2693
2719
  const { context, control, title, media, disabled, onClick } = props;
2694
2720
  const addonStart = media ? getAddonStart(media) : void 0;
2695
- const priority = getPriority(control);
2721
+ const priority = getPriority2(control);
2696
2722
  const sentiment = getSentiment(context);
2697
- return /* @__PURE__ */ jsx63(
2698
- Button8,
2723
+ return /* @__PURE__ */ jsx64(
2724
+ Button7,
2699
2725
  {
2700
2726
  v2: true,
2701
2727
  size: "sm",
@@ -2723,7 +2749,7 @@ var getAddonStart = (media) => {
2723
2749
  return void 0;
2724
2750
  }
2725
2751
  };
2726
- var getPriority = (control) => isKnownControl(control) ? control : "secondary";
2752
+ var getPriority2 = (control) => isKnownControl(control) ? control : "secondary";
2727
2753
  var prefersMedia = (control) => {
2728
2754
  return false;
2729
2755
  };
@@ -2733,21 +2759,21 @@ var getSentiment = (context) => {
2733
2759
  return "default";
2734
2760
  };
2735
2761
  var getIconButtonPriority = (control) => {
2736
- const priority = getPriority(control);
2762
+ const priority = getPriority2(control);
2737
2763
  return priority === "secondary-neutral" ? "tertiary" : priority;
2738
2764
  };
2739
2765
 
2740
2766
  // ../renderers/src/step/topbar/TopBar.tsx
2741
- import { jsx as jsx64, jsxs as jsxs25 } from "react/jsx-runtime";
2767
+ import { jsx as jsx65, jsxs as jsxs25 } from "react/jsx-runtime";
2742
2768
  function TopBar({ back, toolbar }) {
2743
2769
  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
2770
+ back ? /* @__PURE__ */ jsx65(BackButton, __spreadValues({}, back)) : null,
2771
+ toolbar ? /* @__PURE__ */ jsx65(Toolbar, __spreadValues({}, toolbar)) : null
2746
2772
  ] }) : null;
2747
2773
  }
2748
2774
 
2749
2775
  // ../renderers/src/step/SplashCelebrationStepRenderer.tsx
2750
- import { jsx as jsx65, jsxs as jsxs26 } from "react/jsx-runtime";
2776
+ import { jsx as jsx66, jsxs as jsxs26 } from "react/jsx-runtime";
2751
2777
  var SplashCelebrationStepRenderer = {
2752
2778
  canRenderType: "step",
2753
2779
  canRender: ({ control }) => control === "splash-celebration",
@@ -2757,13 +2783,13 @@ function SplashCelebrationStepRendererComponent(props) {
2757
2783
  const { back, toolbar, children, trackEvent } = props;
2758
2784
  useCustomTheme("forest-green", trackEvent);
2759
2785
  return /* @__PURE__ */ jsxs26("div", { className: "splash-screen m-t-5", children: [
2760
- /* @__PURE__ */ jsx65(TopBar, { back, toolbar }),
2786
+ /* @__PURE__ */ jsx66(TopBar, { back, toolbar }),
2761
2787
  children
2762
2788
  ] });
2763
2789
  }
2764
2790
 
2765
2791
  // ../renderers/src/step/SplashStepRenderer.tsx
2766
- import { jsx as jsx66, jsxs as jsxs27 } from "react/jsx-runtime";
2792
+ import { jsx as jsx67, jsxs as jsxs27 } from "react/jsx-runtime";
2767
2793
  var SplashStepRenderer = {
2768
2794
  canRenderType: "step",
2769
2795
  canRender: ({ control }) => control === "splash",
@@ -2772,14 +2798,14 @@ var SplashStepRenderer = {
2772
2798
  function SplashStepRendererComponent(props) {
2773
2799
  const { back, toolbar, children } = props;
2774
2800
  return /* @__PURE__ */ jsxs27("div", { className: "splash-screen m-t-5", children: [
2775
- /* @__PURE__ */ jsx66(TopBar, { back, toolbar }),
2801
+ /* @__PURE__ */ jsx67(TopBar, { back, toolbar }),
2776
2802
  children
2777
2803
  ] });
2778
2804
  }
2779
2805
 
2780
2806
  // ../renderers/src/step/StepRenderer.tsx
2781
2807
  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";
2808
+ import { Fragment as Fragment11, jsx as jsx68, jsxs as jsxs28 } from "react/jsx-runtime";
2783
2809
  var StepRenderer = {
2784
2810
  canRenderType: "step",
2785
2811
  render: StepRendererComponent
@@ -2787,12 +2813,12 @@ var StepRenderer = {
2787
2813
  function StepRendererComponent(props) {
2788
2814
  const { back, description, error, title, children, toolbar } = props;
2789
2815
  return /* @__PURE__ */ jsxs28(Fragment11, { children: [
2790
- /* @__PURE__ */ jsx67(TopBar, { back, toolbar }),
2816
+ /* @__PURE__ */ jsx68(TopBar, { back, toolbar }),
2791
2817
  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
2818
+ title ? /* @__PURE__ */ jsx68(Title2, { as: "h1", type: "title-section", className: "text-xs-center m-b-2", children: title }) : void 0,
2819
+ description ? /* @__PURE__ */ jsx68("p", { className: "text-xs-center np-text-body-large", children: description }) : void 0
2794
2820
  ] }) : void 0,
2795
- error ? /* @__PURE__ */ jsx67(Alert2, { type: "negative", className: "m-b-2", message: error }) : void 0,
2821
+ error ? /* @__PURE__ */ jsx68(Alert2, { type: "negative", className: "m-b-2", message: error }) : void 0,
2796
2822
  children
2797
2823
  ] });
2798
2824
  }
@@ -2800,26 +2826,26 @@ function StepRendererComponent(props) {
2800
2826
  // ../renderers/src/TabsRenderer.tsx
2801
2827
  import { Chips, SegmentedControl as SegmentedControl2, Tabs as Tabs2 } from "@transferwise/components";
2802
2828
  import { useState as useState11 } from "react";
2803
- import { jsx as jsx68, jsxs as jsxs29 } from "react/jsx-runtime";
2829
+ import { jsx as jsx69, jsxs as jsxs29 } from "react/jsx-runtime";
2804
2830
  var TabsRenderer = {
2805
2831
  canRenderType: "tabs",
2806
2832
  render: (props) => {
2807
2833
  switch (props.control) {
2808
2834
  case "segmented":
2809
2835
  if (props.tabs.length > 3) {
2810
- return /* @__PURE__ */ jsx68(TabsRendererComponent, __spreadValues({}, props));
2836
+ return /* @__PURE__ */ jsx69(TabsRendererComponent, __spreadValues({}, props));
2811
2837
  }
2812
- return /* @__PURE__ */ jsx68(SegmentedTabsRendererComponent, __spreadValues({}, props));
2838
+ return /* @__PURE__ */ jsx69(SegmentedTabsRendererComponent, __spreadValues({}, props));
2813
2839
  case "chips":
2814
- return /* @__PURE__ */ jsx68(ChipsTabsRendererComponent, __spreadValues({}, props));
2840
+ return /* @__PURE__ */ jsx69(ChipsTabsRendererComponent, __spreadValues({}, props));
2815
2841
  default:
2816
- return /* @__PURE__ */ jsx68(TabsRendererComponent, __spreadValues({}, props));
2842
+ return /* @__PURE__ */ jsx69(TabsRendererComponent, __spreadValues({}, props));
2817
2843
  }
2818
2844
  }
2819
2845
  };
2820
2846
  function TabsRendererComponent({ uid, margin, tabs }) {
2821
2847
  const [selectedIndex, setSelectedIndex] = useState11(0);
2822
- return /* @__PURE__ */ jsx68("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx68(
2848
+ return /* @__PURE__ */ jsx69("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx69(
2823
2849
  Tabs2,
2824
2850
  {
2825
2851
  name: uid,
@@ -2841,7 +2867,7 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
2841
2867
  var _a;
2842
2868
  const [selectedIndex, setSelectedIndex] = useState11(0);
2843
2869
  return /* @__PURE__ */ jsxs29("div", { className: getMargin(margin), children: [
2844
- /* @__PURE__ */ jsx68(
2870
+ /* @__PURE__ */ jsx69(
2845
2871
  SegmentedControl2,
2846
2872
  {
2847
2873
  name: uid,
@@ -2856,14 +2882,14 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
2856
2882
  onChange: (value) => setSelectedIndex(Number(value))
2857
2883
  }
2858
2884
  ),
2859
- /* @__PURE__ */ jsx68("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
2885
+ /* @__PURE__ */ jsx69("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
2860
2886
  ] });
2861
2887
  }
2862
2888
  function ChipsTabsRendererComponent({ margin, tabs }) {
2863
2889
  var _a;
2864
2890
  const [selectedIndex, setSelectedIndex] = useState11(0);
2865
2891
  return /* @__PURE__ */ jsxs29("div", { className: getMargin(margin), children: [
2866
- /* @__PURE__ */ jsx68("div", { className: "chips-container", children: /* @__PURE__ */ jsx68(
2892
+ /* @__PURE__ */ jsx69("div", { className: "chips-container", children: /* @__PURE__ */ jsx69(
2867
2893
  Chips,
2868
2894
  {
2869
2895
  chips: tabs.map((tab, index) => ({ label: tab.title, value: index })),
@@ -2871,7 +2897,7 @@ function ChipsTabsRendererComponent({ margin, tabs }) {
2871
2897
  onChange: ({ selectedValue }) => setSelectedIndex(Number(selectedValue))
2872
2898
  }
2873
2899
  ) }),
2874
- /* @__PURE__ */ jsx68("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
2900
+ /* @__PURE__ */ jsx69("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
2875
2901
  ] });
2876
2902
  }
2877
2903
 
@@ -2886,7 +2912,7 @@ import {
2886
2912
  TextArea,
2887
2913
  TextareaWithDisplayFormat
2888
2914
  } from "@transferwise/components";
2889
- import { jsx as jsx69 } from "react/jsx-runtime";
2915
+ import { jsx as jsx70 } from "react/jsx-runtime";
2890
2916
  var commonKeys = [
2891
2917
  "autoComplete",
2892
2918
  "autoCapitalize",
@@ -2905,12 +2931,12 @@ function VariableTextInput(inputProps) {
2905
2931
  const commonProps = __spreadProps(__spreadValues({}, pick(inputProps, ...commonKeys)), { name: id });
2906
2932
  switch (control) {
2907
2933
  case "email":
2908
- return /* @__PURE__ */ jsx69(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
2934
+ return /* @__PURE__ */ jsx70(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
2909
2935
  case "password":
2910
- return /* @__PURE__ */ jsx69(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
2936
+ return /* @__PURE__ */ jsx70(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
2911
2937
  case "numeric": {
2912
2938
  const numericProps = __spreadProps(__spreadValues({}, commonProps), { type: "number", onWheel });
2913
- return /* @__PURE__ */ jsx69(
2939
+ return /* @__PURE__ */ jsx70(
2914
2940
  TextInput,
2915
2941
  __spreadProps(__spreadValues({}, numericProps), {
2916
2942
  onChange: (newValue) => {
@@ -2921,9 +2947,9 @@ function VariableTextInput(inputProps) {
2921
2947
  );
2922
2948
  }
2923
2949
  case "phone-number":
2924
- return /* @__PURE__ */ jsx69(PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
2950
+ return /* @__PURE__ */ jsx70(PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
2925
2951
  default: {
2926
- return /* @__PURE__ */ jsx69(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
2952
+ return /* @__PURE__ */ jsx70(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
2927
2953
  }
2928
2954
  }
2929
2955
  }
@@ -2931,11 +2957,11 @@ function TextInput(props) {
2931
2957
  const _a = props, { control, displayFormat, onChange } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange"]);
2932
2958
  const InputWithPattern = control === "textarea" ? TextareaWithDisplayFormat : InputWithDisplayFormat;
2933
2959
  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) }));
2960
+ return displayFormat ? /* @__PURE__ */ jsx70(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ jsx70(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { onChange: (e) => onChange(e.target.value) }));
2935
2961
  }
2936
2962
 
2937
2963
  // ../renderers/src/TextInputRenderer.tsx
2938
- import { jsx as jsx70 } from "react/jsx-runtime";
2964
+ import { jsx as jsx71 } from "react/jsx-runtime";
2939
2965
  var TextInputRenderer = {
2940
2966
  canRenderType: "input-text",
2941
2967
  render: (props) => {
@@ -2968,7 +2994,7 @@ var TextInputRenderer = {
2968
2994
  }
2969
2995
  }
2970
2996
  });
2971
- return /* @__PURE__ */ jsx70(
2997
+ return /* @__PURE__ */ jsx71(
2972
2998
  FieldInput_default,
2973
2999
  {
2974
3000
  id,
@@ -2976,7 +3002,7 @@ var TextInputRenderer = {
2976
3002
  description,
2977
3003
  validation: validationState,
2978
3004
  help,
2979
- children: /* @__PURE__ */ jsx70(InputGroup3, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx70(VariableTextInput, __spreadValues({}, inputProps)) })
3005
+ children: /* @__PURE__ */ jsx71(InputGroup3, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx71(VariableTextInput, __spreadValues({}, inputProps)) })
2980
3006
  }
2981
3007
  );
2982
3008
  }
@@ -2990,7 +3016,7 @@ import { Upload, UploadInput as UploadInput2 } from "@transferwise/components";
2990
3016
  var getRandomId = () => Math.random().toString(36).substring(2);
2991
3017
 
2992
3018
  // ../renderers/src/UploadInputRenderer.tsx
2993
- import { jsx as jsx71 } from "react/jsx-runtime";
3019
+ import { jsx as jsx72 } from "react/jsx-runtime";
2994
3020
  var UploadInputRenderer = {
2995
3021
  canRenderType: "input-upload",
2996
3022
  render: (props) => {
@@ -3006,14 +3032,14 @@ var UploadInputRenderer = {
3006
3032
  };
3007
3033
  return (
3008
3034
  // We don't pass help here as there is no sensible place to display it
3009
- /* @__PURE__ */ jsx71(
3035
+ /* @__PURE__ */ jsx72(
3010
3036
  UploadFieldInput_default,
3011
3037
  {
3012
3038
  id,
3013
3039
  label: void 0,
3014
3040
  description: void 0,
3015
3041
  validation: validationState,
3016
- children: /* @__PURE__ */ jsx71(
3042
+ children: /* @__PURE__ */ jsx72(
3017
3043
  UploadInput2,
3018
3044
  {
3019
3045
  id,
@@ -3072,7 +3098,7 @@ var LargeUploadRenderer = {
3072
3098
  };
3073
3099
  const filetypes = acceptsToFileTypes(accepts);
3074
3100
  const usAccept = filetypes === "*" ? "*" : filetypes.join(",");
3075
- return /* @__PURE__ */ jsx71(
3101
+ return /* @__PURE__ */ jsx72(
3076
3102
  FieldInput_default,
3077
3103
  {
3078
3104
  id,
@@ -3080,7 +3106,7 @@ var LargeUploadRenderer = {
3080
3106
  description,
3081
3107
  validation: validationState,
3082
3108
  help,
3083
- children: /* @__PURE__ */ jsx71(
3109
+ children: /* @__PURE__ */ jsx72(
3084
3110
  Upload,
3085
3111
  __spreadProps(__spreadValues({}, uploadProps), {
3086
3112
  usAccept,
@@ -3101,7 +3127,7 @@ var getWiseRenderers = () => [
3101
3127
  AlertRenderer_default,
3102
3128
  CheckboxInputRenderer_default,
3103
3129
  BoxRenderer_default,
3104
- ButtonRenderer_default,
3130
+ ButtonRenderer,
3105
3131
  ColumnsRenderer_default,
3106
3132
  DateInputRenderer_default,
3107
3133
  DecisionRenderer_default,
@@ -3137,20 +3163,10 @@ var getWiseRenderers = () => [
3137
3163
  StepRenderer
3138
3164
  ];
3139
3165
 
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
- }
3151
-
3152
- // src/index.ts
3153
- import { findRendererPropsByType, isValidSchema, JsonSchemaForm } from "@wise/dynamic-flow-client";
3166
+ // ../renderers/src/ButtonRenderer/ButtonRendererV2.tsx
3167
+ import { Button as Button8 } from "@transferwise/components";
3168
+ import { useEffect as useEffect8, useState as useState12 } from "react";
3169
+ import { jsx as jsx73 } from "react/jsx-runtime";
3154
3170
 
3155
3171
  // src/i18n/index.ts
3156
3172
  import { translations as coreTranslations } from "@wise/dynamic-flow-client";
@@ -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",
@@ -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