@transferwise/components 46.163.0 → 46.164.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.
Files changed (78) hide show
  1. package/build/FlowNavigation/FlowNavigation.js +4 -2
  2. package/build/FlowNavigation/FlowNavigation.js.map +1 -1
  3. package/build/FlowNavigation/FlowNavigation.mjs +4 -2
  4. package/build/FlowNavigation/FlowNavigation.mjs.map +1 -1
  5. package/build/FlowNavigation/helpers.js +24 -0
  6. package/build/FlowNavigation/helpers.js.map +1 -0
  7. package/build/FlowNavigation/helpers.mjs +21 -0
  8. package/build/FlowNavigation/helpers.mjs.map +1 -0
  9. package/build/i18n/cs.json +1 -0
  10. package/build/i18n/cs.json.js +1 -0
  11. package/build/i18n/cs.json.js.map +1 -1
  12. package/build/i18n/cs.json.mjs +1 -0
  13. package/build/i18n/cs.json.mjs.map +1 -1
  14. package/build/i18n/de.json +1 -0
  15. package/build/i18n/de.json.js +1 -0
  16. package/build/i18n/de.json.js.map +1 -1
  17. package/build/i18n/de.json.mjs +1 -0
  18. package/build/i18n/de.json.mjs.map +1 -1
  19. package/build/i18n/fr.json +1 -0
  20. package/build/i18n/fr.json.js +1 -0
  21. package/build/i18n/fr.json.js.map +1 -1
  22. package/build/i18n/fr.json.mjs +1 -0
  23. package/build/i18n/fr.json.mjs.map +1 -1
  24. package/build/i18n/pt.json +1 -0
  25. package/build/i18n/pt.json.js +1 -0
  26. package/build/i18n/pt.json.js.map +1 -1
  27. package/build/i18n/pt.json.mjs +1 -0
  28. package/build/i18n/pt.json.mjs.map +1 -1
  29. package/build/i18n/ru.json +1 -0
  30. package/build/i18n/ru.json.js +1 -0
  31. package/build/i18n/ru.json.js.map +1 -1
  32. package/build/i18n/ru.json.mjs +1 -0
  33. package/build/i18n/ru.json.mjs.map +1 -1
  34. package/build/i18n/th.json +1 -0
  35. package/build/i18n/th.json.js +1 -0
  36. package/build/i18n/th.json.js.map +1 -1
  37. package/build/i18n/th.json.mjs +1 -0
  38. package/build/i18n/th.json.mjs.map +1 -1
  39. package/build/i18n/tr.json +1 -0
  40. package/build/i18n/tr.json.js +1 -0
  41. package/build/i18n/tr.json.js.map +1 -1
  42. package/build/i18n/tr.json.mjs +1 -0
  43. package/build/i18n/tr.json.mjs.map +1 -1
  44. package/build/types/Body/Body.d.ts +2 -2
  45. package/build/types/FlowNavigation/FlowNavigation.d.ts +6 -2
  46. package/build/types/FlowNavigation/FlowNavigation.d.ts.map +1 -1
  47. package/build/types/FlowNavigation/helpers.d.ts +5 -0
  48. package/build/types/FlowNavigation/helpers.d.ts.map +1 -0
  49. package/build/types/FlowNavigation/index.d.ts +1 -0
  50. package/build/types/FlowNavigation/index.d.ts.map +1 -1
  51. package/build/types/FlowNavigation/types.d.ts +15 -0
  52. package/build/types/FlowNavigation/types.d.ts.map +1 -0
  53. package/build/types/IconButton/IconButton.d.ts +1 -1
  54. package/build/types/MoneyInput/MoneyInput.d.ts +1 -1
  55. package/build/types/MoneyInput/MoneyInput.d.ts.map +1 -1
  56. package/build/types/Title/Title.d.ts +2 -2
  57. package/build/types/Upload/Steps/UploadImageStep/UploadImageStep.d.ts +1 -1
  58. package/build/types/UploadInput/UploadItem/UploadItemLink.d.ts +1 -1
  59. package/build/types/index.d.ts +1 -1
  60. package/build/types/index.d.ts.map +1 -1
  61. package/package.json +2 -2
  62. package/src/FlowNavigation/FlowNavigation.test.tsx +45 -0
  63. package/src/FlowNavigation/FlowNavigation.tsx +14 -3
  64. package/src/FlowNavigation/_stories/FlowNavigation.CriticalBanner.docs.mdx +66 -0
  65. package/src/FlowNavigation/_stories/FlowNavigation.story.tsx +49 -0
  66. package/src/FlowNavigation/helpers.ts +28 -0
  67. package/src/FlowNavigation/index.ts +1 -0
  68. package/src/FlowNavigation/types.ts +16 -0
  69. package/src/Prompt/CriticalBanner/_stories/CriticalBanner.story.tsx +2 -0
  70. package/src/Snackbar/Snackbar.test.tsx +190 -0
  71. package/src/i18n/cs.json +1 -0
  72. package/src/i18n/de.json +1 -0
  73. package/src/i18n/fr.json +1 -0
  74. package/src/i18n/pt.json +1 -0
  75. package/src/i18n/ru.json +1 -0
  76. package/src/i18n/th.json +1 -0
  77. package/src/i18n/tr.json +1 -0
  78. package/src/index.ts +1 -1
@@ -48,6 +48,7 @@ require('../Primitives/PrimitiveButton/PrimitiveButton.js');
48
48
  require('../Primitives/PrimitiveAnchor/PrimitiveAnchor.js');
49
49
  require('../Link/Link.messages.js');
50
50
  var CriticalBanner = require('../Prompt/CriticalBanner/CriticalBanner.js');
51
+ var helpers = require('./helpers.js');
51
52
 
52
53
  const defaultLogo = /*#__PURE__*/jsxRuntime.jsx(Logo.default, {});
53
54
  const FlowNavigation = ({
@@ -66,6 +67,7 @@ const FlowNavigation = ({
66
67
  const screenLg = useScreenSize.useScreenSize(neptuneTokens.Breakpoint.LARGE);
67
68
  const hasSteps = steps && steps.length > 0;
68
69
  const displayGoBack = onGoBack != null && activeStep > 0;
70
+ const resolvedBannerData = banner ? helpers.isCriticalBannerData(banner) ? helpers.mapCriticalBannerDataToBannerProps(banner) : banner : null;
69
71
  const closeButton = onClose != null && /*#__PURE__*/jsxRuntime.jsx(CloseButton.CloseButton, {
70
72
  size: "lg",
71
73
  onClick: onClose
@@ -109,8 +111,8 @@ const FlowNavigation = ({
109
111
  layout: !screenLg ? layouts.Layout.VERTICAL : layouts.Layout.HORIZONTAL
110
112
  });
111
113
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
112
- children: [banner && /*#__PURE__*/jsxRuntime.jsx(CriticalBanner.CriticalBanner, {
113
- ...banner
114
+ children: [resolvedBannerData && /*#__PURE__*/jsxRuntime.jsx(CriticalBanner.CriticalBanner, {
115
+ ...resolvedBannerData
114
116
  }), /*#__PURE__*/jsxRuntime.jsx(Container.default, {
115
117
  size: "fluid",
116
118
  className: clsx.clsx('np-flow-navigation', {
@@ -1 +1 @@
1
- {"version":3,"file":"FlowNavigation.js","sources":["../../src/FlowNavigation/FlowNavigation.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { useIntl } from 'react-intl';\nimport { Breakpoint } from '@transferwise/neptune-tokens';\n\nimport { Layout } from '../common';\nimport { CloseButton } from '../common/CloseButton';\nimport FlowHeader from '../common/FlowHeader/FlowHeader';\nimport Logo from '../Logo';\nimport Stepper, { type Step } from '../Stepper/Stepper';\nimport Container from '../Container';\n\nimport { useScreenSize } from '../common/hooks/useScreenSize';\nimport messages from './FlowNavigation.messages';\nimport AnimatedLabel from './AnimatedLabel';\nimport IconButton from '../IconButton';\nimport { ArrowLeft } from '@transferwise/icons';\nimport { CriticalBanner, CriticalBannerProps } from '../Prompt';\n\nconst defaultLogo = <Logo />;\n\nexport interface FlowNavigationProps {\n /** @default 0 */\n activeStep?: number;\n avatar?: React.ReactNode;\n /** @default <Logo /> */\n logo?: React.ReactNode;\n /** @default false */\n done?: boolean;\n /** Called when the close button is clicked. If not provided the close button won't show */\n onClose?: (() => void) | React.MouseEventHandler<HTMLButtonElement>;\n /** Called when the back button is clicked. If not provided the back button won't show. The back button only shows on small screens */\n onGoBack?: () => void;\n /** Steps to be displayed in stepper. If not provided, the stepper won't show. */\n steps?: readonly Step[];\n /** Optional critical banner data, to be displayed above the flow navigation. */\n banner?: CriticalBannerProps | null;\n /**\n * Controls whether the bottom border is displayed.\n * @default true\n */\n showBottomBorder?: boolean;\n}\n\nconst FlowNavigation = ({\n activeStep = 0,\n avatar,\n logo = defaultLogo,\n done = false,\n onClose,\n onGoBack,\n steps,\n banner = null,\n showBottomBorder = true,\n}: FlowNavigationProps) => {\n const intl = useIntl();\n const screenSm = useScreenSize(Breakpoint.SMALL);\n const screenLg = useScreenSize(Breakpoint.LARGE);\n\n const hasSteps = steps && steps.length > 0;\n const displayGoBack = onGoBack != null && activeStep > 0;\n\n const closeButton = onClose != null && <CloseButton size=\"lg\" onClick={onClose} />;\n const newAvatar = done ? null : avatar;\n\n const flowHeaderContent = (\n <FlowHeader\n className={clsx(\n 'np-flow-navigation__content',\n screenSm == null\n ? 'np-flow-navigation--hidden'\n : {\n 'np-flow-navigation--xs-max': !screenSm,\n // Size switches on parent container which may or may not have the same size as the window.\n 'np-flow-navigation--sm': screenSm,\n 'np-flow-navigation--lg': screenLg,\n },\n )}\n leftContent={\n <>\n {!screenSm && displayGoBack ? (\n <IconButton\n size={40}\n priority=\"tertiary\"\n type=\"default\"\n aria-label={intl.formatMessage(messages.back)}\n onClick={onGoBack}\n >\n <ArrowLeft />\n </IconButton>\n ) : (\n <div className=\"np-flow-header__left\">{logo}</div>\n )}\n {!screenSm && !done && hasSteps && (\n <AnimatedLabel className=\"m-x-1\" steps={steps} activeLabel={activeStep} />\n )}\n </>\n }\n rightContent={\n <div className=\"np-flow-header__right d-flex align-items-center justify-content-end order-2--lg\">\n {newAvatar}\n {newAvatar && closeButton && <span className=\"m-x-1\" />}\n {closeButton}\n </div>\n }\n bottomContent={\n !done && hasSteps ? (\n <Stepper\n activeStep={activeStep}\n steps={steps}\n className={clsx('np-flow-navigation__stepper')}\n />\n ) : null\n }\n layout={!screenLg ? Layout.VERTICAL : Layout.HORIZONTAL}\n />\n );\n\n return (\n <>\n {banner && <CriticalBanner {...banner} />}\n <Container\n size=\"fluid\"\n className={clsx('np-flow-navigation', {\n 'np-flow-navigation--border-bottom': showBottomBorder,\n 'np-flow-navigation--no-steps': !hasSteps || done,\n })}\n >\n {flowHeaderContent}\n </Container>\n </>\n );\n};\n\nexport default FlowNavigation;\n"],"names":["defaultLogo","_jsx","Logo","FlowNavigation","activeStep","avatar","logo","done","onClose","onGoBack","steps","banner","showBottomBorder","intl","useIntl","screenSm","useScreenSize","Breakpoint","SMALL","screenLg","LARGE","hasSteps","length","displayGoBack","closeButton","CloseButton","size","onClick","newAvatar","flowHeaderContent","FlowHeader","className","clsx","leftContent","_jsxs","_Fragment","children","IconButton","priority","type","formatMessage","messages","back","ArrowLeft","AnimatedLabel","activeLabel","rightContent","bottomContent","Stepper","layout","Layout","VERTICAL","HORIZONTAL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AAQ,GAAG+B,cAAM,CAACC,QAAQ,GAAGD,cAAM,CAACE;AAAW,GAAA,CAE3D;EAED,oBACElB,eAAA,CAAAC,mBAAA,EAAA;AAAAC,IAAAA,QAAA,EAAA,CACGzB,MAAM,iBAAIV,cAAA,CAACoD,6BAAc,EAAA;MAAA,GAAK1C;AAAM,KAAC,CAAG,eACzCV,cAAA,CAACqD,iBAAS,EAAA;AACR5B,MAAAA,IAAI,EAAC,OAAO;AACZK,MAAAA,SAAS,EAAEC,SAAI,CAAC,oBAAoB,EAAE;AACpC,QAAA,mCAAmC,EAAEpB,gBAAgB;QACrD,8BAA8B,EAAE,CAACS,QAAQ,IAAId;AAC9C,OAAA,CAAE;AAAA6B,MAAAA,QAAA,EAEFP;AAAiB,KACT,CACb;AAAA,GAAA,CAAG;AAEP;;"}
1
+ {"version":3,"file":"FlowNavigation.js","sources":["../../src/FlowNavigation/FlowNavigation.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { useIntl } from 'react-intl';\nimport { Breakpoint } from '@transferwise/neptune-tokens';\n\nimport { Layout } from '../common';\nimport { CloseButton } from '../common/CloseButton';\nimport FlowHeader from '../common/FlowHeader/FlowHeader';\nimport Logo from '../Logo';\nimport Stepper, { type Step } from '../Stepper/Stepper';\nimport Container from '../Container';\n\nimport { useScreenSize } from '../common/hooks/useScreenSize';\nimport messages from './FlowNavigation.messages';\nimport AnimatedLabel from './AnimatedLabel';\nimport IconButton from '../IconButton';\nimport { ArrowLeft } from '@transferwise/icons';\nimport { CriticalBanner, CriticalBannerProps } from '../Prompt';\nimport { isCriticalBannerData, mapCriticalBannerDataToBannerProps } from './helpers';\nimport { CriticalBannerLegacyData } from './types';\n\nconst defaultLogo = <Logo />;\n\nexport interface FlowNavigationProps {\n /** @default 0 */\n activeStep?: number;\n avatar?: React.ReactNode;\n /** @default <Logo /> */\n logo?: React.ReactNode;\n /** @default false */\n done?: boolean;\n /** Called when the close button is clicked. If not provided the close button won't show */\n onClose?: (() => void) | React.MouseEventHandler<HTMLButtonElement>;\n /** Called when the back button is clicked. If not provided the back button won't show. The back button only shows on small screens */\n onGoBack?: () => void;\n /** Steps to be displayed in stepper. If not provided, the stepper won't show. */\n steps?: readonly Step[];\n /**\n * Optional critical banner data, to be displayed above the flow navigation.\n * Accepts either the internal `CriticalBannerProps` shape, or the legacy backend `CriticalBannerData` shape — the latter is mapped to `CriticalBannerProps` internally.\n */\n banner?: CriticalBannerLegacyData | CriticalBannerProps | null;\n /**\n * Controls whether the bottom border is displayed.\n * @default true\n */\n showBottomBorder?: boolean;\n}\n\nconst FlowNavigation = ({\n activeStep = 0,\n avatar,\n logo = defaultLogo,\n done = false,\n onClose,\n onGoBack,\n steps,\n banner = null,\n showBottomBorder = true,\n}: FlowNavigationProps) => {\n const intl = useIntl();\n const screenSm = useScreenSize(Breakpoint.SMALL);\n const screenLg = useScreenSize(Breakpoint.LARGE);\n\n const hasSteps = steps && steps.length > 0;\n const displayGoBack = onGoBack != null && activeStep > 0;\n\n const resolvedBannerData: CriticalBannerProps | null = banner\n ? isCriticalBannerData(banner)\n ? mapCriticalBannerDataToBannerProps(banner)\n : banner\n : null;\n\n const closeButton = onClose != null && <CloseButton size=\"lg\" onClick={onClose} />;\n const newAvatar = done ? null : avatar;\n\n const flowHeaderContent = (\n <FlowHeader\n className={clsx(\n 'np-flow-navigation__content',\n screenSm == null\n ? 'np-flow-navigation--hidden'\n : {\n 'np-flow-navigation--xs-max': !screenSm,\n // Size switches on parent container which may or may not have the same size as the window.\n 'np-flow-navigation--sm': screenSm,\n 'np-flow-navigation--lg': screenLg,\n },\n )}\n leftContent={\n <>\n {!screenSm && displayGoBack ? (\n <IconButton\n size={40}\n priority=\"tertiary\"\n type=\"default\"\n aria-label={intl.formatMessage(messages.back)}\n onClick={onGoBack}\n >\n <ArrowLeft />\n </IconButton>\n ) : (\n <div className=\"np-flow-header__left\">{logo}</div>\n )}\n {!screenSm && !done && hasSteps && (\n <AnimatedLabel className=\"m-x-1\" steps={steps} activeLabel={activeStep} />\n )}\n </>\n }\n rightContent={\n <div className=\"np-flow-header__right d-flex align-items-center justify-content-end order-2--lg\">\n {newAvatar}\n {newAvatar && closeButton && <span className=\"m-x-1\" />}\n {closeButton}\n </div>\n }\n bottomContent={\n !done && hasSteps ? (\n <Stepper\n activeStep={activeStep}\n steps={steps}\n className={clsx('np-flow-navigation__stepper')}\n />\n ) : null\n }\n layout={!screenLg ? Layout.VERTICAL : Layout.HORIZONTAL}\n />\n );\n\n return (\n <>\n {resolvedBannerData && <CriticalBanner {...resolvedBannerData} />}\n <Container\n size=\"fluid\"\n className={clsx('np-flow-navigation', {\n 'np-flow-navigation--border-bottom': showBottomBorder,\n 'np-flow-navigation--no-steps': !hasSteps || done,\n })}\n >\n {flowHeaderContent}\n </Container>\n </>\n );\n};\n\nexport default FlowNavigation;\n"],"names":["defaultLogo","_jsx","Logo","FlowNavigation","activeStep","avatar","logo","done","onClose","onGoBack","steps","banner","showBottomBorder","intl","useIntl","screenSm","useScreenSize","Breakpoint","SMALL","screenLg","LARGE","hasSteps","length","displayGoBack","resolvedBannerData","isCriticalBannerData","mapCriticalBannerDataToBannerProps","closeButton","CloseButton","size","onClick","newAvatar","flowHeaderContent","FlowHeader","className","clsx","leftContent","_jsxs","_Fragment","children","IconButton","priority","type","formatMessage","messages","back","ArrowLeft","AnimatedLabel","activeLabel","rightContent","bottomContent","Stepper","layout","Layout","VERTICAL","HORIZONTAL","CriticalBanner","Container"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,MAAMA,WAAW,gBAAGC,cAAA,CAACC,YAAI,KAAG;AA4B5B,MAAMC,cAAc,GAAGA,CAAC;AACtBC,EAAAA,UAAU,GAAG,CAAC;EACdC,MAAM;AACNC,EAAAA,IAAI,GAAGN,WAAW;AAClBO,EAAAA,IAAI,GAAG,KAAK;EACZC,OAAO;EACPC,QAAQ;EACRC,KAAK;AACLC,EAAAA,MAAM,GAAG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AkB,KAAC,CAAG,eACjEvB,cAAA,CAACwD,iBAAS,EAAA;AACR5B,MAAAA,IAAI,EAAC,OAAO;AACZK,MAAAA,SAAS,EAAEC,SAAI,CAAC,oBAAoB,EAAE;AACpC,QAAA,mCAAmC,EAAEvB,gBAAgB;QACrD,8BAA8B,EAAE,CAACS,QAAQ,IAAId;AAC9C,OAAA,CAAE;AAAAgC,MAAAA,QAAA,EAEFP;AAAiB,KACT,CACb;AAAA,GAAA,CAAG;AAEP;;"}
@@ -44,6 +44,7 @@ import '../Primitives/PrimitiveButton/PrimitiveButton.mjs';
44
44
  import '../Primitives/PrimitiveAnchor/PrimitiveAnchor.mjs';
45
45
  import '../Link/Link.messages.mjs';
46
46
  import { CriticalBanner } from '../Prompt/CriticalBanner/CriticalBanner.mjs';
47
+ import { isCriticalBannerData, mapCriticalBannerDataToBannerProps } from './helpers.mjs';
47
48
 
48
49
  const defaultLogo = /*#__PURE__*/jsx(Logo, {});
49
50
  const FlowNavigation = ({
@@ -62,6 +63,7 @@ const FlowNavigation = ({
62
63
  const screenLg = useScreenSize(Breakpoint.LARGE);
63
64
  const hasSteps = steps && steps.length > 0;
64
65
  const displayGoBack = onGoBack != null && activeStep > 0;
66
+ const resolvedBannerData = banner ? isCriticalBannerData(banner) ? mapCriticalBannerDataToBannerProps(banner) : banner : null;
65
67
  const closeButton = onClose != null && /*#__PURE__*/jsx(CloseButton, {
66
68
  size: "lg",
67
69
  onClick: onClose
@@ -105,8 +107,8 @@ const FlowNavigation = ({
105
107
  layout: !screenLg ? Layout.VERTICAL : Layout.HORIZONTAL
106
108
  });
107
109
  return /*#__PURE__*/jsxs(Fragment, {
108
- children: [banner && /*#__PURE__*/jsx(CriticalBanner, {
109
- ...banner
110
+ children: [resolvedBannerData && /*#__PURE__*/jsx(CriticalBanner, {
111
+ ...resolvedBannerData
110
112
  }), /*#__PURE__*/jsx(Container, {
111
113
  size: "fluid",
112
114
  className: clsx('np-flow-navigation', {
@@ -1 +1 @@
1
- {"version":3,"file":"FlowNavigation.mjs","sources":["../../src/FlowNavigation/FlowNavigation.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { useIntl } from 'react-intl';\nimport { Breakpoint } from '@transferwise/neptune-tokens';\n\nimport { Layout } from '../common';\nimport { CloseButton } from '../common/CloseButton';\nimport FlowHeader from '../common/FlowHeader/FlowHeader';\nimport Logo from '../Logo';\nimport Stepper, { type Step } from '../Stepper/Stepper';\nimport Container from '../Container';\n\nimport { useScreenSize } from '../common/hooks/useScreenSize';\nimport messages from './FlowNavigation.messages';\nimport AnimatedLabel from './AnimatedLabel';\nimport IconButton from '../IconButton';\nimport { ArrowLeft } from '@transferwise/icons';\nimport { CriticalBanner, CriticalBannerProps } from '../Prompt';\n\nconst defaultLogo = <Logo />;\n\nexport interface FlowNavigationProps {\n /** @default 0 */\n activeStep?: number;\n avatar?: React.ReactNode;\n /** @default <Logo /> */\n logo?: React.ReactNode;\n /** @default false */\n done?: boolean;\n /** Called when the close button is clicked. If not provided the close button won't show */\n onClose?: (() => void) | React.MouseEventHandler<HTMLButtonElement>;\n /** Called when the back button is clicked. If not provided the back button won't show. The back button only shows on small screens */\n onGoBack?: () => void;\n /** Steps to be displayed in stepper. If not provided, the stepper won't show. */\n steps?: readonly Step[];\n /** Optional critical banner data, to be displayed above the flow navigation. */\n banner?: CriticalBannerProps | null;\n /**\n * Controls whether the bottom border is displayed.\n * @default true\n */\n showBottomBorder?: boolean;\n}\n\nconst FlowNavigation = ({\n activeStep = 0,\n avatar,\n logo = defaultLogo,\n done = false,\n onClose,\n onGoBack,\n steps,\n banner = null,\n showBottomBorder = true,\n}: FlowNavigationProps) => {\n const intl = useIntl();\n const screenSm = useScreenSize(Breakpoint.SMALL);\n const screenLg = useScreenSize(Breakpoint.LARGE);\n\n const hasSteps = steps && steps.length > 0;\n const displayGoBack = onGoBack != null && activeStep > 0;\n\n const closeButton = onClose != null && <CloseButton size=\"lg\" onClick={onClose} />;\n const newAvatar = done ? null : avatar;\n\n const flowHeaderContent = (\n <FlowHeader\n className={clsx(\n 'np-flow-navigation__content',\n screenSm == null\n ? 'np-flow-navigation--hidden'\n : {\n 'np-flow-navigation--xs-max': !screenSm,\n // Size switches on parent container which may or may not have the same size as the window.\n 'np-flow-navigation--sm': screenSm,\n 'np-flow-navigation--lg': screenLg,\n },\n )}\n leftContent={\n <>\n {!screenSm && displayGoBack ? (\n <IconButton\n size={40}\n priority=\"tertiary\"\n type=\"default\"\n aria-label={intl.formatMessage(messages.back)}\n onClick={onGoBack}\n >\n <ArrowLeft />\n </IconButton>\n ) : (\n <div className=\"np-flow-header__left\">{logo}</div>\n )}\n {!screenSm && !done && hasSteps && (\n <AnimatedLabel className=\"m-x-1\" steps={steps} activeLabel={activeStep} />\n )}\n </>\n }\n rightContent={\n <div className=\"np-flow-header__right d-flex align-items-center justify-content-end order-2--lg\">\n {newAvatar}\n {newAvatar && closeButton && <span className=\"m-x-1\" />}\n {closeButton}\n </div>\n }\n bottomContent={\n !done && hasSteps ? (\n <Stepper\n activeStep={activeStep}\n steps={steps}\n className={clsx('np-flow-navigation__stepper')}\n />\n ) : null\n }\n layout={!screenLg ? Layout.VERTICAL : Layout.HORIZONTAL}\n />\n );\n\n return (\n <>\n {banner && <CriticalBanner {...banner} />}\n <Container\n size=\"fluid\"\n className={clsx('np-flow-navigation', {\n 'np-flow-navigation--border-bottom': showBottomBorder,\n 'np-flow-navigation--no-steps': !hasSteps || done,\n })}\n >\n {flowHeaderContent}\n </Container>\n </>\n );\n};\n\nexport default FlowNavigation;\n"],"names":["defaultLogo","_jsx","Logo","FlowNavigation","activeStep","avatar","logo","done","onClose","onGoBack","steps","banner","showBottomBorder","intl","useIntl","screenSm","useScreenSize","Breakpoint","SMALL","screenLg","LARGE","hasSteps","length","displayGoBack","closeButton","CloseButton","size","onClick","newAvatar","flowHeaderContent","FlowHeader","className","clsx","leftContent","_jsxs","_Fragment","children","IconButton","priority","type","formatMessage","messages","back","ArrowLeft","AnimatedLabel","activeLabel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IACDiB,MAAM,EAAE,CAAC9B,QAAQ,GAAG+B,MAAM,CAACC,QAAQ,GAAGD,MAAM,CAACE;AAAW,GAAA,CAE3D;EAED,oBACElB,IAAA,CAAAC,QAAA,EAAA;AAAAC,IAAAA,QAAA,EAAA,CACGzB,MAAM,iBAAIV,GAAA,CAACoD,cAAc,EAAA;MAAA,GAAK1C;AAAM,KAAC,CAAG,eACzCV,GAAA,CAACqD,SAAS,EAAA;AACR5B,MAAAA,IAAI,EAAC,OAAO;AACZK,MAAAA,SAAS,EAAEC,IAAI,CAAC,oBAAoB,EAAE;AACpC,QAAA,mCAAmC,EAAEpB,gBAAgB;QACrD,8BAA8B,EAAE,CAACS,QAAQ,IAAId;AAC9C,OAAA,CAAE;AAAA6B,MAAAA,QAAA,EAEFP;AAAiB,KACT,CACb;AAAA,GAAA,CAAG;AAEP;;"}
1
+ {"version":3,"file":"FlowNavigation.mjs","sources":["../../src/FlowNavigation/FlowNavigation.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { useIntl } from 'react-intl';\nimport { Breakpoint } from '@transferwise/neptune-tokens';\n\nimport { Layout } from '../common';\nimport { CloseButton } from '../common/CloseButton';\nimport FlowHeader from '../common/FlowHeader/FlowHeader';\nimport Logo from '../Logo';\nimport Stepper, { type Step } from '../Stepper/Stepper';\nimport Container from '../Container';\n\nimport { useScreenSize } from '../common/hooks/useScreenSize';\nimport messages from './FlowNavigation.messages';\nimport AnimatedLabel from './AnimatedLabel';\nimport IconButton from '../IconButton';\nimport { ArrowLeft } from '@transferwise/icons';\nimport { CriticalBanner, CriticalBannerProps } from '../Prompt';\nimport { isCriticalBannerData, mapCriticalBannerDataToBannerProps } from './helpers';\nimport { CriticalBannerLegacyData } from './types';\n\nconst defaultLogo = <Logo />;\n\nexport interface FlowNavigationProps {\n /** @default 0 */\n activeStep?: number;\n avatar?: React.ReactNode;\n /** @default <Logo /> */\n logo?: React.ReactNode;\n /** @default false */\n done?: boolean;\n /** Called when the close button is clicked. If not provided the close button won't show */\n onClose?: (() => void) | React.MouseEventHandler<HTMLButtonElement>;\n /** Called when the back button is clicked. If not provided the back button won't show. The back button only shows on small screens */\n onGoBack?: () => void;\n /** Steps to be displayed in stepper. If not provided, the stepper won't show. */\n steps?: readonly Step[];\n /**\n * Optional critical banner data, to be displayed above the flow navigation.\n * Accepts either the internal `CriticalBannerProps` shape, or the legacy backend `CriticalBannerData` shape — the latter is mapped to `CriticalBannerProps` internally.\n */\n banner?: CriticalBannerLegacyData | CriticalBannerProps | null;\n /**\n * Controls whether the bottom border is displayed.\n * @default true\n */\n showBottomBorder?: boolean;\n}\n\nconst FlowNavigation = ({\n activeStep = 0,\n avatar,\n logo = defaultLogo,\n done = false,\n onClose,\n onGoBack,\n steps,\n banner = null,\n showBottomBorder = true,\n}: FlowNavigationProps) => {\n const intl = useIntl();\n const screenSm = useScreenSize(Breakpoint.SMALL);\n const screenLg = useScreenSize(Breakpoint.LARGE);\n\n const hasSteps = steps && steps.length > 0;\n const displayGoBack = onGoBack != null && activeStep > 0;\n\n const resolvedBannerData: CriticalBannerProps | null = banner\n ? isCriticalBannerData(banner)\n ? mapCriticalBannerDataToBannerProps(banner)\n : banner\n : null;\n\n const closeButton = onClose != null && <CloseButton size=\"lg\" onClick={onClose} />;\n const newAvatar = done ? null : avatar;\n\n const flowHeaderContent = (\n <FlowHeader\n className={clsx(\n 'np-flow-navigation__content',\n screenSm == null\n ? 'np-flow-navigation--hidden'\n : {\n 'np-flow-navigation--xs-max': !screenSm,\n // Size switches on parent container which may or may not have the same size as the window.\n 'np-flow-navigation--sm': screenSm,\n 'np-flow-navigation--lg': screenLg,\n },\n )}\n leftContent={\n <>\n {!screenSm && displayGoBack ? (\n <IconButton\n size={40}\n priority=\"tertiary\"\n type=\"default\"\n aria-label={intl.formatMessage(messages.back)}\n onClick={onGoBack}\n >\n <ArrowLeft />\n </IconButton>\n ) : (\n <div className=\"np-flow-header__left\">{logo}</div>\n )}\n {!screenSm && !done && hasSteps && (\n <AnimatedLabel className=\"m-x-1\" steps={steps} activeLabel={activeStep} />\n )}\n </>\n }\n rightContent={\n <div className=\"np-flow-header__right d-flex align-items-center justify-content-end order-2--lg\">\n {newAvatar}\n {newAvatar && closeButton && <span className=\"m-x-1\" />}\n {closeButton}\n </div>\n }\n bottomContent={\n !done && hasSteps ? (\n <Stepper\n activeStep={activeStep}\n steps={steps}\n className={clsx('np-flow-navigation__stepper')}\n />\n ) : null\n }\n layout={!screenLg ? Layout.VERTICAL : Layout.HORIZONTAL}\n />\n );\n\n return (\n <>\n {resolvedBannerData && <CriticalBanner {...resolvedBannerData} />}\n <Container\n size=\"fluid\"\n className={clsx('np-flow-navigation', {\n 'np-flow-navigation--border-bottom': showBottomBorder,\n 'np-flow-navigation--no-steps': !hasSteps || done,\n })}\n >\n {flowHeaderContent}\n </Container>\n </>\n );\n};\n\nexport default FlowNavigation;\n"],"names":["defaultLogo","_jsx","Logo","FlowNavigation","activeStep","avatar","logo","done","onClose","onGoBack","steps","banner","showBottomBorder","intl","useIntl","screenSm","useScreenSize","Breakpoint","SMALL","screenLg","LARGE","hasSteps","length","displayGoBack","resolvedBannerData","isCriticalBannerData","mapCriticalBannerDataToBannerProps","closeButton","CloseButton","size","onClick","newAvatar","flowHeaderContent","FlowHeader","className","clsx","leftContent","_jsxs","_Fragment","children","IconButton","priority","type","formatMessage","messages","back","ArrowLeft","AnimatedLabel","activeLabel","rightContent","bottomContent","Stepper","layout","Layout","VERTICAL","HORIZONTAL","CriticalBanner","Container"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,MAAMA,WAAW,gBAAGC,GAAA,CAACC,IAAI,KAAG;AA4B5B,MAAMC,cAAc,GAAGA,CAAC;AACtBC,EAAAA,UAAU,GAAG,CAAC;EACdC,MAAM;AACNC,EAAAA,IAAI,GAAGN,WAAW;AAClBO,EAAAA,IAAI,GAAG,KAAK;EACZC,OAAO;EACPC,QAAQ;EACRC,KAAK;A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KhC;AAAkB,KAAC,CAAG,eACjEvB,GAAA,CAACwD,SAAS,EAAA;AACR5B,MAAAA,IAAI,EAAC,OAAO;AACZK,MAAAA,SAAS,EAAEC,IAAI,CAAC,oBAAoB,EAAE;AACpC,QAAA,mCAAmC,EAAEvB,gBAAgB;QACrD,8BAA8B,EAAE,CAACS,QAAQ,IAAId;AAC9C,OAAA,CAAE;AAAAgC,MAAAA,QAAA,EAEFP;AAAiB,KACT,CACb;AAAA,GAAA,CAAG;AAEP;;"}
@@ -0,0 +1,24 @@
1
+ 'use strict';
2
+
3
+ const sentimentMap = {
4
+ NEGATIVE: 'negative',
5
+ WARNING: 'warning',
6
+ NEUTRAL: 'neutral'
7
+ };
8
+ const isCriticalBannerData = banner => 'style' in banner;
9
+ const mapCriticalBannerDataToBannerProps = data => ({
10
+ id: data.id,
11
+ title: data.title,
12
+ description: data.subtitle,
13
+ // subtitle → description
14
+ sentiment: sentimentMap[data.style],
15
+ action: data.action ? {
16
+ label: data.action.label,
17
+ href: data.action.href
18
+ } : undefined,
19
+ expanded: !data.collapsed // collapsed → expanded (inverted)
20
+ });
21
+
22
+ exports.isCriticalBannerData = isCriticalBannerData;
23
+ exports.mapCriticalBannerDataToBannerProps = mapCriticalBannerDataToBannerProps;
24
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sources":["../../src/FlowNavigation/helpers.ts"],"sourcesContent":["import { CriticalBannerProps } from '../Prompt';\nimport { CriticalBannerLegacyData } from './types';\n\nconst sentimentMap: Record<CriticalBannerLegacyData['style'], CriticalBannerProps['sentiment']> = {\n NEGATIVE: 'negative',\n WARNING: 'warning',\n NEUTRAL: 'neutral',\n};\n\nexport const isCriticalBannerData = (\n banner: CriticalBannerLegacyData | CriticalBannerProps,\n): banner is CriticalBannerLegacyData => 'style' in banner;\n\nexport const mapCriticalBannerDataToBannerProps = (\n data: CriticalBannerLegacyData,\n): CriticalBannerProps => ({\n id: data.id,\n title: data.title,\n description: data.subtitle, // subtitle → description\n sentiment: sentimentMap[data.style],\n action: data.action\n ? {\n label: data.action.label,\n href: data.action.href,\n }\n : undefined,\n expanded: !data.collapsed, // collapsed → expanded (inverted)\n});\n"],"names":["sentimentMap","NEGATIVE","WARNING","NEUTRAL","isCriticalBannerData","banner","mapCriticalBannerDataToBannerProps","data","id","title","description","subtitle","sentiment","style","action","label","href","undefined","expanded","collapsed"],"mappings":";;AAGA,MAAMA,YAAY,GAAgF;AAChGC,EAAAA,QAAQ,EAAE,UAAU;AACpBC,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,OAAO,EAAE;CACV;MAEYC,oBAAoB,GAC/BC,MAAsD,IACf,OAAO,IAAIA;AAE7C,MAAMC,kCAAkC,GAC7CC,IAA8B,KACL;EACzBC,EAAE,EAAED,IAAI,CAACC,EAAE;EACXC,KAAK,EAAEF,IAAI,CAACE,KAAK;EACjBC,WAAW,EAAEH,IAAI,CAACI,QAAQ;AAAE;AAC5BC,EAAAA,SAAS,EAAEZ,YAAY,CAACO,IAAI,CAACM,KAAK,CAAC;AACnCC,EAAAA,MAAM,EAAEP,IAAI,CAACO,MAAM,GACf;AACEC,IAAAA,KAAK,EAAER,IAAI,CAACO,MAAM,CAACC,KAAK;AACxBC,IAAAA,IAAI,EAAET,IAAI,CAACO,MAAM,CAACE;AACnB,GAAA,GACDC,SAAS;AACbC,EAAAA,QAAQ,EAAE,CAACX,IAAI,CAACY,SAAS;AAC1B,CAAA;;;"}
@@ -0,0 +1,21 @@
1
+ const sentimentMap = {
2
+ NEGATIVE: 'negative',
3
+ WARNING: 'warning',
4
+ NEUTRAL: 'neutral'
5
+ };
6
+ const isCriticalBannerData = banner => 'style' in banner;
7
+ const mapCriticalBannerDataToBannerProps = data => ({
8
+ id: data.id,
9
+ title: data.title,
10
+ description: data.subtitle,
11
+ // subtitle → description
12
+ sentiment: sentimentMap[data.style],
13
+ action: data.action ? {
14
+ label: data.action.label,
15
+ href: data.action.href
16
+ } : undefined,
17
+ expanded: !data.collapsed // collapsed → expanded (inverted)
18
+ });
19
+
20
+ export { isCriticalBannerData, mapCriticalBannerDataToBannerProps };
21
+ //# sourceMappingURL=helpers.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.mjs","sources":["../../src/FlowNavigation/helpers.ts"],"sourcesContent":["import { CriticalBannerProps } from '../Prompt';\nimport { CriticalBannerLegacyData } from './types';\n\nconst sentimentMap: Record<CriticalBannerLegacyData['style'], CriticalBannerProps['sentiment']> = {\n NEGATIVE: 'negative',\n WARNING: 'warning',\n NEUTRAL: 'neutral',\n};\n\nexport const isCriticalBannerData = (\n banner: CriticalBannerLegacyData | CriticalBannerProps,\n): banner is CriticalBannerLegacyData => 'style' in banner;\n\nexport const mapCriticalBannerDataToBannerProps = (\n data: CriticalBannerLegacyData,\n): CriticalBannerProps => ({\n id: data.id,\n title: data.title,\n description: data.subtitle, // subtitle → description\n sentiment: sentimentMap[data.style],\n action: data.action\n ? {\n label: data.action.label,\n href: data.action.href,\n }\n : undefined,\n expanded: !data.collapsed, // collapsed → expanded (inverted)\n});\n"],"names":["sentimentMap","NEGATIVE","WARNING","NEUTRAL","isCriticalBannerData","banner","mapCriticalBannerDataToBannerProps","data","id","title","description","subtitle","sentiment","style","action","label","href","undefined","expanded","collapsed"],"mappings":"AAGA,MAAMA,YAAY,GAAgF;AAChGC,EAAAA,QAAQ,EAAE,UAAU;AACpBC,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,OAAO,EAAE;CACV;MAEYC,oBAAoB,GAC/BC,MAAsD,IACf,OAAO,IAAIA;AAE7C,MAAMC,kCAAkC,GAC7CC,IAA8B,KACL;EACzBC,EAAE,EAAED,IAAI,CAACC,EAAE;EACXC,KAAK,EAAEF,IAAI,CAACE,KAAK;EACjBC,WAAW,EAAEH,IAAI,CAACI,QAAQ;AAAE;AAC5BC,EAAAA,SAAS,EAAEZ,YAAY,CAACO,IAAI,CAACM,KAAK,CAAC;AACnCC,EAAAA,MAAM,EAAEP,IAAI,CAACO,MAAM,GACf;AACEC,IAAAA,KAAK,EAAER,IAAI,CAACO,MAAM,CAACC,KAAK;AACxBC,IAAAA,IAAI,EAAET,IAAI,CAACO,MAAM,CAACE;AACnB,GAAA,GACDC,SAAS;AACbC,EAAAA,QAAQ,EAAE,CAACX,IAAI,CAACY,SAAS;AAC1B,CAAA;;"}
@@ -35,6 +35,7 @@
35
35
  "neptune.PhoneNumberInput.SelectInput.placeholder": "Vybrat možnost...",
36
36
  "neptune.PhoneNumberInput.countryCodeLabel": "Kód země",
37
37
  "neptune.PhoneNumberInput.phoneNumberLabel": "Telefonní číslo",
38
+ "neptune.PhoneNumberInput.phoneNumberPrefix": "Předčíslí",
38
39
  "neptune.Select.searchPlaceholder": "Hledat...",
39
40
  "neptune.SelectInput.noResultsFound": "Nebyly nalezeny žádné výsledky",
40
41
  "neptune.StatusIcon.iconLabel.error": "Chyba:",
@@ -39,6 +39,7 @@ var cs = {
39
39
  "neptune.PhoneNumberInput.SelectInput.placeholder": "Vybrat možnost...",
40
40
  "neptune.PhoneNumberInput.countryCodeLabel": "Kód země",
41
41
  "neptune.PhoneNumberInput.phoneNumberLabel": "Telefonní číslo",
42
+ "neptune.PhoneNumberInput.phoneNumberPrefix": "Předčíslí",
42
43
  "neptune.Select.searchPlaceholder": "Hledat...",
43
44
  "neptune.SelectInput.noResultsFound": "Nebyly nalezeny žádné výsledky",
44
45
  "neptune.StatusIcon.iconLabel.error": "Chyba:",
@@ -1 +1 @@
1
- {"version":3,"file":"cs.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"cs.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -35,6 +35,7 @@ var cs = {
35
35
  "neptune.PhoneNumberInput.SelectInput.placeholder": "Vybrat možnost...",
36
36
  "neptune.PhoneNumberInput.countryCodeLabel": "Kód země",
37
37
  "neptune.PhoneNumberInput.phoneNumberLabel": "Telefonní číslo",
38
+ "neptune.PhoneNumberInput.phoneNumberPrefix": "Předčíslí",
38
39
  "neptune.Select.searchPlaceholder": "Hledat...",
39
40
  "neptune.SelectInput.noResultsFound": "Nebyly nalezeny žádné výsledky",
40
41
  "neptune.StatusIcon.iconLabel.error": "Chyba:",
@@ -1 +1 @@
1
- {"version":3,"file":"cs.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"cs.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -35,6 +35,7 @@
35
35
  "neptune.PhoneNumberInput.SelectInput.placeholder": "Wähle eine Option...",
36
36
  "neptune.PhoneNumberInput.countryCodeLabel": "Ländercode",
37
37
  "neptune.PhoneNumberInput.phoneNumberLabel": "Telefonnummer",
38
+ "neptune.PhoneNumberInput.phoneNumberPrefix": "Vorwahl",
38
39
  "neptune.Select.searchPlaceholder": "Wird gesucht...",
39
40
  "neptune.SelectInput.noResultsFound": "Keine Ergebnisse gefunden",
40
41
  "neptune.StatusIcon.iconLabel.error": "Fehler:",
@@ -39,6 +39,7 @@ var de = {
39
39
  "neptune.PhoneNumberInput.SelectInput.placeholder": "Wähle eine Option...",
40
40
  "neptune.PhoneNumberInput.countryCodeLabel": "Ländercode",
41
41
  "neptune.PhoneNumberInput.phoneNumberLabel": "Telefonnummer",
42
+ "neptune.PhoneNumberInput.phoneNumberPrefix": "Vorwahl",
42
43
  "neptune.Select.searchPlaceholder": "Wird gesucht...",
43
44
  "neptune.SelectInput.noResultsFound": "Keine Ergebnisse gefunden",
44
45
  "neptune.StatusIcon.iconLabel.error": "Fehler:",
@@ -1 +1 @@
1
- {"version":3,"file":"de.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"de.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -35,6 +35,7 @@ var de = {
35
35
  "neptune.PhoneNumberInput.SelectInput.placeholder": "Wähle eine Option...",
36
36
  "neptune.PhoneNumberInput.countryCodeLabel": "Ländercode",
37
37
  "neptune.PhoneNumberInput.phoneNumberLabel": "Telefonnummer",
38
+ "neptune.PhoneNumberInput.phoneNumberPrefix": "Vorwahl",
38
39
  "neptune.Select.searchPlaceholder": "Wird gesucht...",
39
40
  "neptune.SelectInput.noResultsFound": "Keine Ergebnisse gefunden",
40
41
  "neptune.StatusIcon.iconLabel.error": "Fehler:",
@@ -1 +1 @@
1
- {"version":3,"file":"de.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"de.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -35,6 +35,7 @@
35
35
  "neptune.PhoneNumberInput.SelectInput.placeholder": "Sélectionnez une option…",
36
36
  "neptune.PhoneNumberInput.countryCodeLabel": "Code pays",
37
37
  "neptune.PhoneNumberInput.phoneNumberLabel": "Numéro de téléphone",
38
+ "neptune.PhoneNumberInput.phoneNumberPrefix": "Indicatif",
38
39
  "neptune.Select.searchPlaceholder": "Recherche...",
39
40
  "neptune.SelectInput.noResultsFound": "Aucun résultat trouvé",
40
41
  "neptune.StatusIcon.iconLabel.error": "Erreur :",
@@ -39,6 +39,7 @@ var fr = {
39
39
  "neptune.PhoneNumberInput.SelectInput.placeholder": "Sélectionnez une option…",
40
40
  "neptune.PhoneNumberInput.countryCodeLabel": "Code pays",
41
41
  "neptune.PhoneNumberInput.phoneNumberLabel": "Numéro de téléphone",
42
+ "neptune.PhoneNumberInput.phoneNumberPrefix": "Indicatif",
42
43
  "neptune.Select.searchPlaceholder": "Recherche...",
43
44
  "neptune.SelectInput.noResultsFound": "Aucun résultat trouvé",
44
45
  "neptune.StatusIcon.iconLabel.error": "Erreur :",
@@ -1 +1 @@
1
- {"version":3,"file":"fr.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"fr.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -35,6 +35,7 @@ var fr = {
35
35
  "neptune.PhoneNumberInput.SelectInput.placeholder": "Sélectionnez une option…",
36
36
  "neptune.PhoneNumberInput.countryCodeLabel": "Code pays",
37
37
  "neptune.PhoneNumberInput.phoneNumberLabel": "Numéro de téléphone",
38
+ "neptune.PhoneNumberInput.phoneNumberPrefix": "Indicatif",
38
39
  "neptune.Select.searchPlaceholder": "Recherche...",
39
40
  "neptune.SelectInput.noResultsFound": "Aucun résultat trouvé",
40
41
  "neptune.StatusIcon.iconLabel.error": "Erreur :",
@@ -1 +1 @@
1
- {"version":3,"file":"fr.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"fr.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -35,6 +35,7 @@
35
35
  "neptune.PhoneNumberInput.SelectInput.placeholder": "Escolha uma opção...",
36
36
  "neptune.PhoneNumberInput.countryCodeLabel": "Código do país",
37
37
  "neptune.PhoneNumberInput.phoneNumberLabel": "Número de telefone",
38
+ "neptune.PhoneNumberInput.phoneNumberPrefix": "Prefixo",
38
39
  "neptune.Select.searchPlaceholder": "Buscar...",
39
40
  "neptune.SelectInput.noResultsFound": "Nenhum resultado encontrado",
40
41
  "neptune.StatusIcon.iconLabel.error": "Erro:",
@@ -39,6 +39,7 @@ var pt = {
39
39
  "neptune.PhoneNumberInput.SelectInput.placeholder": "Escolha uma opção...",
40
40
  "neptune.PhoneNumberInput.countryCodeLabel": "Código do país",
41
41
  "neptune.PhoneNumberInput.phoneNumberLabel": "Número de telefone",
42
+ "neptune.PhoneNumberInput.phoneNumberPrefix": "Prefixo",
42
43
  "neptune.Select.searchPlaceholder": "Buscar...",
43
44
  "neptune.SelectInput.noResultsFound": "Nenhum resultado encontrado",
44
45
  "neptune.StatusIcon.iconLabel.error": "Erro:",
@@ -1 +1 @@
1
- {"version":3,"file":"pt.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"pt.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -35,6 +35,7 @@ var pt = {
35
35
  "neptune.PhoneNumberInput.SelectInput.placeholder": "Escolha uma opção...",
36
36
  "neptune.PhoneNumberInput.countryCodeLabel": "Código do país",
37
37
  "neptune.PhoneNumberInput.phoneNumberLabel": "Número de telefone",
38
+ "neptune.PhoneNumberInput.phoneNumberPrefix": "Prefixo",
38
39
  "neptune.Select.searchPlaceholder": "Buscar...",
39
40
  "neptune.SelectInput.noResultsFound": "Nenhum resultado encontrado",
40
41
  "neptune.StatusIcon.iconLabel.error": "Erro:",
@@ -1 +1 @@
1
- {"version":3,"file":"pt.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"pt.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -35,6 +35,7 @@
35
35
  "neptune.PhoneNumberInput.SelectInput.placeholder": "Выберите вариант...",
36
36
  "neptune.PhoneNumberInput.countryCodeLabel": "Код страны",
37
37
  "neptune.PhoneNumberInput.phoneNumberLabel": "Номер телефона",
38
+ "neptune.PhoneNumberInput.phoneNumberPrefix": "Код страны",
38
39
  "neptune.Select.searchPlaceholder": "Поиск...",
39
40
  "neptune.SelectInput.noResultsFound": "Ничего не найдено",
40
41
  "neptune.StatusIcon.iconLabel.error": "Ошибка:",
@@ -39,6 +39,7 @@ var ru = {
39
39
  "neptune.PhoneNumberInput.SelectInput.placeholder": "Выберите вариант...",
40
40
  "neptune.PhoneNumberInput.countryCodeLabel": "Код страны",
41
41
  "neptune.PhoneNumberInput.phoneNumberLabel": "Номер телефона",
42
+ "neptune.PhoneNumberInput.phoneNumberPrefix": "Код страны",
42
43
  "neptune.Select.searchPlaceholder": "Поиск...",
43
44
  "neptune.SelectInput.noResultsFound": "Ничего не найдено",
44
45
  "neptune.StatusIcon.iconLabel.error": "Ошибка:",
@@ -1 +1 @@
1
- {"version":3,"file":"ru.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ru.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -35,6 +35,7 @@ var ru = {
35
35
  "neptune.PhoneNumberInput.SelectInput.placeholder": "Выберите вариант...",
36
36
  "neptune.PhoneNumberInput.countryCodeLabel": "Код страны",
37
37
  "neptune.PhoneNumberInput.phoneNumberLabel": "Номер телефона",
38
+ "neptune.PhoneNumberInput.phoneNumberPrefix": "Код страны",
38
39
  "neptune.Select.searchPlaceholder": "Поиск...",
39
40
  "neptune.SelectInput.noResultsFound": "Ничего не найдено",
40
41
  "neptune.StatusIcon.iconLabel.error": "Ошибка:",
@@ -1 +1 @@
1
- {"version":3,"file":"ru.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ru.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -35,6 +35,7 @@
35
35
  "neptune.PhoneNumberInput.SelectInput.placeholder": "เลือกตัวเลือก...",
36
36
  "neptune.PhoneNumberInput.countryCodeLabel": "รหัสประเทศ",
37
37
  "neptune.PhoneNumberInput.phoneNumberLabel": "หมายเลขโทรศัพท์",
38
+ "neptune.PhoneNumberInput.phoneNumberPrefix": "คำนำหน้า",
38
39
  "neptune.Select.searchPlaceholder": "ค้นหา...",
39
40
  "neptune.SelectInput.noResultsFound": "ไม่พบผลลัพธ์",
40
41
  "neptune.StatusIcon.iconLabel.error": "ข้อผิดพลาด:",
@@ -39,6 +39,7 @@ var th = {
39
39
  "neptune.PhoneNumberInput.SelectInput.placeholder": "เลือกตัวเลือก...",
40
40
  "neptune.PhoneNumberInput.countryCodeLabel": "รหัสประเทศ",
41
41
  "neptune.PhoneNumberInput.phoneNumberLabel": "หมายเลขโทรศัพท์",
42
+ "neptune.PhoneNumberInput.phoneNumberPrefix": "คำนำหน้า",
42
43
  "neptune.Select.searchPlaceholder": "ค้นหา...",
43
44
  "neptune.SelectInput.noResultsFound": "ไม่พบผลลัพธ์",
44
45
  "neptune.StatusIcon.iconLabel.error": "ข้อผิดพลาด:",
@@ -1 +1 @@
1
- {"version":3,"file":"th.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"th.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -35,6 +35,7 @@ var th = {
35
35
  "neptune.PhoneNumberInput.SelectInput.placeholder": "เลือกตัวเลือก...",
36
36
  "neptune.PhoneNumberInput.countryCodeLabel": "รหัสประเทศ",
37
37
  "neptune.PhoneNumberInput.phoneNumberLabel": "หมายเลขโทรศัพท์",
38
+ "neptune.PhoneNumberInput.phoneNumberPrefix": "คำนำหน้า",
38
39
  "neptune.Select.searchPlaceholder": "ค้นหา...",
39
40
  "neptune.SelectInput.noResultsFound": "ไม่พบผลลัพธ์",
40
41
  "neptune.StatusIcon.iconLabel.error": "ข้อผิดพลาด:",
@@ -1 +1 @@
1
- {"version":3,"file":"th.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"th.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -35,6 +35,7 @@
35
35
  "neptune.PhoneNumberInput.SelectInput.placeholder": "Bir seçenek seçin...",
36
36
  "neptune.PhoneNumberInput.countryCodeLabel": "Ülke kodu",
37
37
  "neptune.PhoneNumberInput.phoneNumberLabel": "Telefon numarası",
38
+ "neptune.PhoneNumberInput.phoneNumberPrefix": "Ön ek",
38
39
  "neptune.Select.searchPlaceholder": "Ara...",
39
40
  "neptune.SelectInput.noResultsFound": "Sonuç bulunamadı",
40
41
  "neptune.StatusIcon.iconLabel.error": "Hata:",
@@ -39,6 +39,7 @@ var tr = {
39
39
  "neptune.PhoneNumberInput.SelectInput.placeholder": "Bir seçenek seçin...",
40
40
  "neptune.PhoneNumberInput.countryCodeLabel": "Ülke kodu",
41
41
  "neptune.PhoneNumberInput.phoneNumberLabel": "Telefon numarası",
42
+ "neptune.PhoneNumberInput.phoneNumberPrefix": "Ön ek",
42
43
  "neptune.Select.searchPlaceholder": "Ara...",
43
44
  "neptune.SelectInput.noResultsFound": "Sonuç bulunamadı",
44
45
  "neptune.StatusIcon.iconLabel.error": "Hata:",
@@ -1 +1 @@
1
- {"version":3,"file":"tr.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"tr.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -35,6 +35,7 @@ var tr = {
35
35
  "neptune.PhoneNumberInput.SelectInput.placeholder": "Bir seçenek seçin...",
36
36
  "neptune.PhoneNumberInput.countryCodeLabel": "Ülke kodu",
37
37
  "neptune.PhoneNumberInput.phoneNumberLabel": "Telefon numarası",
38
+ "neptune.PhoneNumberInput.phoneNumberPrefix": "Ön ek",
38
39
  "neptune.Select.searchPlaceholder": "Ara...",
39
40
  "neptune.SelectInput.noResultsFound": "Sonuç bulunamadı",
40
41
  "neptune.StatusIcon.iconLabel.error": "Hata:",
@@ -1 +1 @@
1
- {"version":3,"file":"tr.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"tr.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -11,7 +11,7 @@ export type BodyProps = HTMLAttributes<HTMLSpanElement | HTMLParagraphElement> &
11
11
  */
12
12
  preserveNewlines?: boolean;
13
13
  };
14
- declare const Body: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement | HTMLSpanElement> & {
14
+ declare const Body: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement | HTMLParagraphElement> & {
15
15
  /** @default 'body-default' */
16
16
  type?: BodyTypes;
17
17
  /** @default 'div' */
@@ -21,6 +21,6 @@ declare const Body: import("react").ForwardRefExoticComponent<HTMLAttributes<HTM
21
21
  * @default false
22
22
  */
23
23
  preserveNewlines?: boolean;
24
- } & import("react").RefAttributes<HTMLDivElement | HTMLParagraphElement | HTMLSpanElement | null>>;
24
+ } & import("react").RefAttributes<HTMLDivElement | HTMLSpanElement | HTMLParagraphElement | null>>;
25
25
  export default Body;
26
26
  //# sourceMappingURL=Body.d.ts.map
@@ -1,5 +1,6 @@
1
1
  import { type Step } from '../Stepper/Stepper';
2
2
  import { CriticalBannerProps } from '../Prompt';
3
+ import { CriticalBannerLegacyData } from './types';
3
4
  export interface FlowNavigationProps {
4
5
  /** @default 0 */
5
6
  activeStep?: number;
@@ -14,8 +15,11 @@ export interface FlowNavigationProps {
14
15
  onGoBack?: () => void;
15
16
  /** Steps to be displayed in stepper. If not provided, the stepper won't show. */
16
17
  steps?: readonly Step[];
17
- /** Optional critical banner data, to be displayed above the flow navigation. */
18
- banner?: CriticalBannerProps | null;
18
+ /**
19
+ * Optional critical banner data, to be displayed above the flow navigation.
20
+ * Accepts either the internal `CriticalBannerProps` shape, or the legacy backend `CriticalBannerData` shape — the latter is mapped to `CriticalBannerProps` internally.
21
+ */
22
+ banner?: CriticalBannerLegacyData | CriticalBannerProps | null;
19
23
  /**
20
24
  * Controls whether the bottom border is displayed.
21
25
  * @default true
@@ -1 +1 @@
1
- {"version":3,"file":"FlowNavigation.d.ts","sourceRoot":"","sources":["../../../src/FlowNavigation/FlowNavigation.tsx"],"names":[],"mappings":"AAQA,OAAgB,EAAE,KAAK,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rB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,2FAA2F;IAC3F,OAAO,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IACpE,sIAAsI;IACtI,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,iFAAiF;IACjF,KAAK,CAAC,EAAE,SAAS,IAAI,EAAE,CAAC;IACxB;;;OAGG;IACH,MAAM,CAAC,EAAE,wBAAwB,GAAG,mBAAmB,GAAG,IAAI,CAAC;IAC/D;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,QAAA,MAAM,cAAc,GAAI,yFAUrB,mBAAmB,gCAoFrB,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { CriticalBannerProps } from '../Prompt';
2
+ import { CriticalBannerLegacyData } from './types';
3
+ export declare const isCriticalBannerData: (banner: CriticalBannerLegacyData | CriticalBannerProps) => banner is CriticalBannerLegacyData;
4
+ export declare const mapCriticalBannerDataToBannerProps: (data: CriticalBannerLegacyData) => CriticalBannerProps;
5
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/FlowNavigation/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAQnD,eAAO,MAAM,oBAAoB,GAC/B,QAAQ,wBAAwB,GAAG,mBAAmB,KACrD,MAAM,IAAI,wBAA6C,CAAC;AAE3D,eAAO,MAAM,kCAAkC,GAC7C,MAAM,wBAAwB,KAC7B,mBAYD,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export { default } from './FlowNavigation';
2
2
  export type { FlowNavigationProps } from './FlowNavigation';
3
+ export type { CriticalBannerLegacyData } from './types';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FlowNavigation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FlowNavigation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,YAAY,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,15 @@
1
+ export type CriticalBannerStyle = 'WARNING' | 'NEGATIVE' | 'NEUTRAL';
2
+ export type CriticalBannerAction = {
3
+ label: string;
4
+ href: string;
5
+ };
6
+ export type CriticalBannerLegacyData = {
7
+ id: string;
8
+ title: string;
9
+ subtitle?: string;
10
+ style: CriticalBannerStyle;
11
+ action?: CriticalBannerAction;
12
+ mixpanelEvent?: string;
13
+ collapsed?: boolean;
14
+ };
15
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/FlowNavigation/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;AAErE,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,mBAAmB,CAAC;IAC3B,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC"}
@@ -16,6 +16,6 @@ declare const IconButton: import("react").ForwardRefExoticComponent<{
16
16
  /** @default 'default' */
17
17
  type?: "default" | "negative";
18
18
  'data-testid'?: string;
19
- } & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "onClick" | "target" | "href"> & Pick<ButtonHTMLAttributes<HTMLButtonElement>, "disabled" | "onClick"> & Pick<HTMLAttributes<HTMLDivElement>, "id" | "className" | "tabIndex" | "role" | "aria-label" | "children"> & import("react").RefAttributes<unknown>>;
19
+ } & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "onClick" | "target" | "href"> & Pick<ButtonHTMLAttributes<HTMLButtonElement>, "disabled" | "onClick"> & Pick<HTMLAttributes<HTMLDivElement>, "children" | "className" | "id" | "tabIndex" | "role" | "aria-label"> & import("react").RefAttributes<unknown>>;
20
20
  export default IconButton;
21
21
  //# sourceMappingURL=IconButton.d.ts.map