@transferwise/components 46.137.1 → 46.139.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 (60) hide show
  1. package/build/flowNavigation/FlowNavigation.js +2 -4
  2. package/build/flowNavigation/FlowNavigation.js.map +1 -1
  3. package/build/flowNavigation/FlowNavigation.mjs +2 -4
  4. package/build/flowNavigation/FlowNavigation.mjs.map +1 -1
  5. package/build/i18n/uk.json +2 -0
  6. package/build/i18n/uk.json.js +2 -0
  7. package/build/i18n/uk.json.js.map +1 -1
  8. package/build/i18n/uk.json.mjs +2 -0
  9. package/build/i18n/uk.json.mjs.map +1 -1
  10. package/build/loader/Loader.js +16 -6
  11. package/build/loader/Loader.js.map +1 -1
  12. package/build/loader/Loader.mjs +17 -7
  13. package/build/loader/Loader.mjs.map +1 -1
  14. package/build/logo/Logo.js +3 -1
  15. package/build/logo/Logo.js.map +1 -1
  16. package/build/logo/Logo.mjs +3 -1
  17. package/build/logo/Logo.mjs.map +1 -1
  18. package/build/logo/logo-assets.js +147 -15
  19. package/build/logo/logo-assets.js.map +1 -1
  20. package/build/logo/logo-assets.mjs +147 -15
  21. package/build/logo/logo-assets.mjs.map +1 -1
  22. package/build/main.css +16 -4
  23. package/build/moneyInput/MoneyInput.js +2 -1
  24. package/build/moneyInput/MoneyInput.js.map +1 -1
  25. package/build/moneyInput/MoneyInput.mjs +2 -1
  26. package/build/moneyInput/MoneyInput.mjs.map +1 -1
  27. package/build/styles/listItem/ListItem.css +1 -0
  28. package/build/styles/loader/Loader.css +14 -4
  29. package/build/styles/main.css +16 -4
  30. package/build/types/flowNavigation/FlowNavigation.d.ts.map +1 -1
  31. package/build/types/loader/Loader.d.ts +4 -1
  32. package/build/types/loader/Loader.d.ts.map +1 -1
  33. package/build/types/logo/Logo.d.ts +7 -1
  34. package/build/types/logo/Logo.d.ts.map +1 -1
  35. package/build/types/logo/logo-assets.d.ts +144 -12
  36. package/build/types/logo/logo-assets.d.ts.map +1 -1
  37. package/build/types/moneyInput/MoneyInput.d.ts +1 -0
  38. package/build/types/moneyInput/MoneyInput.d.ts.map +1 -1
  39. package/package.json +1 -1
  40. package/src/flowNavigation/FlowNavigation.story.tsx +14 -9
  41. package/src/flowNavigation/FlowNavigation.test.js +2 -2
  42. package/src/flowNavigation/FlowNavigation.test.story.tsx +77 -0
  43. package/src/flowNavigation/FlowNavigation.tsx +2 -5
  44. package/src/i18n/uk.json +2 -0
  45. package/src/listItem/ListItem.css +1 -0
  46. package/src/listItem/ListItem.less +1 -0
  47. package/src/loader/Loader.css +14 -4
  48. package/src/loader/Loader.less +54 -88
  49. package/src/loader/Loader.story.tsx +4 -0
  50. package/src/loader/Loader.test.tsx +20 -5
  51. package/src/loader/Loader.tsx +18 -7
  52. package/src/logo/Logo.story.tsx +40 -0
  53. package/src/logo/Logo.test.story.tsx +51 -0
  54. package/src/logo/Logo.tsx +11 -1
  55. package/src/logo/logo-assets.tsx +55 -8
  56. package/src/main.css +16 -4
  57. package/src/moneyInput/MoneyInput.story.tsx +20 -0
  58. package/src/moneyInput/MoneyInput.test.tsx +49 -0
  59. package/src/moneyInput/MoneyInput.tsx +2 -0
  60. package/src/ssr.test.tsx +1 -0
@@ -88,13 +88,11 @@ const FlowNavigation = ({
88
88
  className: "m-x-1"
89
89
  }), closeButton]
90
90
  }),
91
- bottomContent: !done && (steps.length > 0 ? /*#__PURE__*/jsxRuntime.jsx(Stepper.default, {
91
+ bottomContent: !done && steps.length > 0 ? /*#__PURE__*/jsxRuntime.jsx(Stepper.default, {
92
92
  activeStep: activeStep,
93
93
  steps: steps,
94
94
  className: clsx.clsx('np-flow-navigation__stepper')
95
- }) : /*#__PURE__*/jsxRuntime.jsx("div", {
96
- className: "np-flow-navigation__stepper"
97
- })),
95
+ }) : null,
98
96
  layout: !screenLg ? layouts.Layout.VERTICAL : layouts.Layout.HORIZONTAL
99
97
  })
100
98
  });
@@ -1 +1 @@
1
- {"version":3,"file":"FlowNavigation.js","sources":["../../src/flowNavigation/FlowNavigation.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { useIntl } from 'react-intl';\n\nimport { Breakpoint, 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';\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';\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;\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 you don't need the stepper, please use OverlayHeader instead */\n steps: readonly Step[];\n}\n\nconst FlowNavigation = ({\n activeStep = 0,\n avatar,\n logo = <Logo />,\n done = false,\n onClose,\n onGoBack,\n steps,\n}: FlowNavigationProps) => {\n const intl = useIntl();\n\n const closeButton = onClose != null && <CloseButton size=\"lg\" onClick={onClose} />;\n\n const screenSm = useScreenSize(Breakpoint.SMALL);\n const screenLg = useScreenSize(Breakpoint.LARGE);\n\n const newAvatar = done ? null : avatar;\n\n const displayGoBack = onGoBack != null && activeStep > 0;\n\n return (\n <div\n className={clsx('np-flow-navigation d-flex align-items-center justify-content-center p-y-3', {\n 'np-flow-navigation--border-bottom': !done,\n })}\n >\n <FlowHeader\n className={clsx(\n 'np-flow-navigation__content p-x-3',\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 && (\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 &&\n (steps.length > 0 ? (\n <Stepper\n activeStep={activeStep}\n steps={steps}\n className={clsx('np-flow-navigation__stepper')}\n />\n ) : (\n <div className=\"np-flow-navigation__stepper\" />\n ))\n }\n layout={!screenLg ? Layout.VERTICAL : Layout.HORIZONTAL}\n />\n </div>\n );\n};\n\nexport default FlowNavigation;\n"],"names":["FlowNavigation","activeStep","avatar","logo","_jsx","Logo","done","onClose","onGoBack","steps","intl","useIntl","closeButton","CloseButton","size","onClick","screenSm","useScreenSize","Breakpoint","SMALL","screenLg","LARGE","newAvatar","displayGoBack","className","clsx","children","FlowHeader","leftContent","_jsxs","_Fragment","IconButton","priority","type","formatMessage","messages","back","ArrowLeft","AnimatedLabel","activeLabel","rightContent","bottomContent","length","Stepper","layout","Layout","VERTICAL","HORIZONTAL"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAMA,cAAc,GAAGA,CAAC;AACtBC,EAAAA,UAAU,GAAG,CAAC;EACdC,MAAM;AACNC,EAAAA,IAAI,gBAAGC,cAAA,CAACC,YAAI,IAAA,CAAG;AACfC,EAAAA,IAAI,GAAG,KAAK;EACZC,OAAO;EACPC,QAAQ;AACRC,EAAAA;AAAK,CACe,KAAI;AACxB,EAAA,MAAMC,IAAI,GAAGC,iBAAO,EAAE;EAEtB,MAAMC,WAAW,GAAGL,OAAO,IAAI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A,CAAA,KAAA,EAAA;AAAKoB,UAAAA,SAAS,EAAC,sBAAsB;AAAAE,UAAAA,QAAA,EAAEvB;SAAU,CAClD,EACA,CAACa,QAAQ,IAAI,CAACV,IAAI,iBACjBF,cAAA,CAACkC,qBAAa,EAAA;AAACd,UAAAA,SAAS,EAAC,OAAO;AAACf,UAAAA,KAAK,EAAEA,KAAM;AAAC8B,UAAAA,WAAW,EAAEtC;AAAW,SAAA,CACxE;AAAA,OACH,CACD;AACDuC,MAAAA,YAAY,eACVX,eAAA,CAAA,KAAA,EAAA;AAAKL,QAAAA,SAAS,EAAC,iFAAiF;AAAAE,QAAAA,QAAA,GAC7FJ,SAAS,EACTA,SAAS,IAAIV,WAAW,iBAAIR,cAAA,CAAA,MAAA,EAAA;AAAMoB,UAAAA,SAAS,EAAC;SAAO,CAAG,EACtDZ,WAAW;AAAA,OACT,CACN;AACD6B,MAAAA,aAAa,EACX,CAACnC,IAAI,KACJG,KAAK,CAACiC,MAAM,GAAG,CAAC,gBACftC,cAAA,CAACuC,eAAO,EAAA;AACN1C,QAAAA,UAAU,EAAEA,UAAW;AACvBQ,QAAAA,KAAK,EAAEA,KAAM;QACbe,SAAS,EAAEC,SAAI,CAAC,6BAA6B;OAAE,CAC/C,gBAEFrB,cAAA,CAAA,KAAA,EAAA;AAAKoB,QAAAA,SAAS,EAAC;AAA6B,OAAA,CAC7C,CACF;MACDoB,MAAM,EAAE,CAACxB,QAAQ,GAAGyB,cAAM,CAACC,QAAQ,GAAGD,cAAM,CAACE;KAAW;AAE5D,GAAK,CAAC;AAEV;;;;"}
1
+ {"version":3,"file":"FlowNavigation.js","sources":["../../src/flowNavigation/FlowNavigation.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { useIntl } from 'react-intl';\n\nimport { Breakpoint, 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';\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';\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;\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 you don't need the stepper, please use OverlayHeader instead */\n steps: readonly Step[];\n}\n\nconst FlowNavigation = ({\n activeStep = 0,\n avatar,\n logo = <Logo />,\n done = false,\n onClose,\n onGoBack,\n steps,\n}: FlowNavigationProps) => {\n const intl = useIntl();\n\n const closeButton = onClose != null && <CloseButton size=\"lg\" onClick={onClose} />;\n\n const screenSm = useScreenSize(Breakpoint.SMALL);\n const screenLg = useScreenSize(Breakpoint.LARGE);\n\n const newAvatar = done ? null : avatar;\n\n const displayGoBack = onGoBack != null && activeStep > 0;\n\n return (\n <div\n className={clsx('np-flow-navigation d-flex align-items-center justify-content-center p-y-3', {\n 'np-flow-navigation--border-bottom': !done,\n })}\n >\n <FlowHeader\n className={clsx(\n 'np-flow-navigation__content p-x-3',\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 && (\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 && steps.length > 0 ? (\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 </div>\n );\n};\n\nexport default FlowNavigation;\n"],"names":["FlowNavigation","activeStep","avatar","logo","_jsx","Logo","done","onClose","onGoBack","steps","intl","useIntl","closeButton","CloseButton","size","onClick","screenSm","useScreenSize","Breakpoint","SMALL","screenLg","LARGE","newAvatar","displayGoBack","className","clsx","children","FlowHeader","leftContent","_jsxs","_Fragment","IconButton","priority","type","formatMessage","messages","back","ArrowLeft","AnimatedLabel","activeLabel","rightContent","bottomContent","length","Stepper","layout","Layout","VERTICAL","HORIZONTAL"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAMA,cAAc,GAAGA,CAAC;AACtBC,EAAAA,UAAU,GAAG,CAAC;EACdC,MAAM;AACNC,EAAAA,IAAI,gBAAGC,cAAA,CAACC,YAAI,IAAA,CAAG;AACfC,EAAAA,IAAI,GAAG,KAAK;EACZC,OAAO;EACPC,QAAQ;AACRC,EAAAA;AAAK,CACe,KAAI;AACxB,EAAA,MAAMC,IAAI,GAAGC,iBAAO,EAAE;EAEtB,MAAMC,WAAW,GAAGL,OAAO,IAAI,IAAI,iBAAIH,cAAA,CAACS,uBAAW,EAAA;AAACC,IAAAA,IAAI,EAAC,IAAI;AAACC,IAAAA,OAAO,EAAER;AAAQ,IAAG;AAElF,EAAA,MAAMS,QAAQ,GAAGC,2BAAa,CAACC,qBAAU,CAACC,KAAK,CAAC;AAChD,EAAA,MAAMC,QAAQ,GAAGH,2BAAa,CAACC,qBAAU,CAACG,KAAK,CAAC;AAEh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C;AAAW,SAAA,CACxE;AAAA,OACH,CACD;AACDuC,MAAAA,YAAY,eACVX,eAAA,CAAA,KAAA,EAAA;AAAKL,QAAAA,SAAS,EAAC,iFAAiF;AAAAE,QAAAA,QAAA,GAC7FJ,SAAS,EACTA,SAAS,IAAIV,WAAW,iBAAIR,cAAA,CAAA,MAAA,EAAA;AAAMoB,UAAAA,SAAS,EAAC;SAAO,CAAG,EACtDZ,WAAW;AAAA,OACT,CACN;AACD6B,MAAAA,aAAa,EACX,CAACnC,IAAI,IAAIG,KAAK,CAACiC,MAAM,GAAG,CAAC,gBACvBtC,cAAA,CAACuC,eAAO,EAAA;AACN1C,QAAAA,UAAU,EAAEA,UAAW;AACvBQ,QAAAA,KAAK,EAAEA,KAAM;QACbe,SAAS,EAAEC,SAAI,CAAC,6BAA6B;OAAE,CAC/C,GACA,IACL;MACDmB,MAAM,EAAE,CAACxB,QAAQ,GAAGyB,cAAM,CAACC,QAAQ,GAAGD,cAAM,CAACE;KAAW;AAE5D,GAAK,CAAC;AAEV;;;;"}
@@ -84,13 +84,11 @@ const FlowNavigation = ({
84
84
  className: "m-x-1"
85
85
  }), closeButton]
86
86
  }),
87
- bottomContent: !done && (steps.length > 0 ? /*#__PURE__*/jsx(Stepper, {
87
+ bottomContent: !done && steps.length > 0 ? /*#__PURE__*/jsx(Stepper, {
88
88
  activeStep: activeStep,
89
89
  steps: steps,
90
90
  className: clsx('np-flow-navigation__stepper')
91
- }) : /*#__PURE__*/jsx("div", {
92
- className: "np-flow-navigation__stepper"
93
- })),
91
+ }) : null,
94
92
  layout: !screenLg ? Layout.VERTICAL : Layout.HORIZONTAL
95
93
  })
96
94
  });
@@ -1 +1 @@
1
- {"version":3,"file":"FlowNavigation.mjs","sources":["../../src/flowNavigation/FlowNavigation.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { useIntl } from 'react-intl';\n\nimport { Breakpoint, 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';\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';\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;\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 you don't need the stepper, please use OverlayHeader instead */\n steps: readonly Step[];\n}\n\nconst FlowNavigation = ({\n activeStep = 0,\n avatar,\n logo = <Logo />,\n done = false,\n onClose,\n onGoBack,\n steps,\n}: FlowNavigationProps) => {\n const intl = useIntl();\n\n const closeButton = onClose != null && <CloseButton size=\"lg\" onClick={onClose} />;\n\n const screenSm = useScreenSize(Breakpoint.SMALL);\n const screenLg = useScreenSize(Breakpoint.LARGE);\n\n const newAvatar = done ? null : avatar;\n\n const displayGoBack = onGoBack != null && activeStep > 0;\n\n return (\n <div\n className={clsx('np-flow-navigation d-flex align-items-center justify-content-center p-y-3', {\n 'np-flow-navigation--border-bottom': !done,\n })}\n >\n <FlowHeader\n className={clsx(\n 'np-flow-navigation__content p-x-3',\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 && (\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 &&\n (steps.length > 0 ? (\n <Stepper\n activeStep={activeStep}\n steps={steps}\n className={clsx('np-flow-navigation__stepper')}\n />\n ) : (\n <div className=\"np-flow-navigation__stepper\" />\n ))\n }\n layout={!screenLg ? Layout.VERTICAL : Layout.HORIZONTAL}\n />\n </div>\n );\n};\n\nexport default FlowNavigation;\n"],"names":["FlowNavigation","activeStep","avatar","logo","_jsx","Logo","done","onClose","onGoBack","steps","intl","useIntl","closeButton","CloseButton","size","onClick","screenSm","useScreenSize","Breakpoint","SMALL","screenLg","LARGE","newAvatar","displayGoBack","className","clsx","children","FlowHeader","leftContent","_jsxs","_Fragment","IconButton","priority","type","formatMessage","messages","back","ArrowLeft","AnimatedLabel","activeLabel","rightContent","bottomContent","length","Stepper","layout","Layout","VERTICAL","HORIZONTAL"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAMA,cAAc,GAAGA,CAAC;AACtBC,EAAAA,UAAU,GAAG,CAAC;EACdC,MAAM;AACNC,EAAAA,IAAI,gBAAGC,GAAA,CAACC,IAAI,IAAA,CAAG;AACfC,EAAAA,IAAI,GAAG,KAAK;EACZC,OAAO;EACPC,QAAQ;AACRC,EAAAA;AAAK,CACe,KAAI;AACxB,EAAA,MAAMC,IAAI,GAAGC,OAAO,EAAE;EAEtB,MAAMC,WAAW,GAAGL,OAAO,IAAI,IAAI,iBAAIH,GAAA,CAACS,WAAW,EAAA;AAACC,IAAAA,IAAI,EAAC,IAAI;AAACC,IAAAA,OAAO,EAAER;AAAQ,IAAG;AAElF,EAAA,MAAMS,QAAQ,GAAGC,aAAa,CAACC,UAAU,CA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AAAA,SAAS,EAAC,OAAO;AAACf,UAAAA,KAAK,EAAEA,KAAM;AAAC8B,UAAAA,WAAW,EAAEtC;AAAW,SAAA,CACxE;AAAA,OACH,CACD;AACDuC,MAAAA,YAAY,eACVX,IAAA,CAAA,KAAA,EAAA;AAAKL,QAAAA,SAAS,EAAC,iFAAiF;AAAAE,QAAAA,QAAA,GAC7FJ,SAAS,EACTA,SAAS,IAAIV,WAAW,iBAAIR,GAAA,CAAA,MAAA,EAAA;AAAMoB,UAAAA,SAAS,EAAC;SAAO,CAAG,EACtDZ,WAAW;AAAA,OACT,CACN;AACD6B,MAAAA,aAAa,EACX,CAACnC,IAAI,KACJG,KAAK,CAACiC,MAAM,GAAG,CAAC,gBACftC,GAAA,CAACuC,OAAO,EAAA;AACN1C,QAAAA,UAAU,EAAEA,UAAW;AACvBQ,QAAAA,KAAK,EAAEA,KAAM;QACbe,SAAS,EAAEC,IAAI,CAAC,6BAA6B;OAAE,CAC/C,gBAEFrB,GAAA,CAAA,KAAA,EAAA;AAAKoB,QAAAA,SAAS,EAAC;AAA6B,OAAA,CAC7C,CACF;MACDoB,MAAM,EAAE,CAACxB,QAAQ,GAAGyB,MAAM,CAACC,QAAQ,GAAGD,MAAM,CAACE;KAAW;AAE5D,GAAK,CAAC;AAEV;;;;"}
1
+ {"version":3,"file":"FlowNavigation.mjs","sources":["../../src/flowNavigation/FlowNavigation.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { useIntl } from 'react-intl';\n\nimport { Breakpoint, 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';\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';\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;\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 you don't need the stepper, please use OverlayHeader instead */\n steps: readonly Step[];\n}\n\nconst FlowNavigation = ({\n activeStep = 0,\n avatar,\n logo = <Logo />,\n done = false,\n onClose,\n onGoBack,\n steps,\n}: FlowNavigationProps) => {\n const intl = useIntl();\n\n const closeButton = onClose != null && <CloseButton size=\"lg\" onClick={onClose} />;\n\n const screenSm = useScreenSize(Breakpoint.SMALL);\n const screenLg = useScreenSize(Breakpoint.LARGE);\n\n const newAvatar = done ? null : avatar;\n\n const displayGoBack = onGoBack != null && activeStep > 0;\n\n return (\n <div\n className={clsx('np-flow-navigation d-flex align-items-center justify-content-center p-y-3', {\n 'np-flow-navigation--border-bottom': !done,\n })}\n >\n <FlowHeader\n className={clsx(\n 'np-flow-navigation__content p-x-3',\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 && (\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 && steps.length > 0 ? (\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 </div>\n );\n};\n\nexport default FlowNavigation;\n"],"names":["FlowNavigation","activeStep","avatar","logo","_jsx","Logo","done","onClose","onGoBack","steps","intl","useIntl","closeButton","CloseButton","size","onClick","screenSm","useScreenSize","Breakpoint","SMALL","screenLg","LARGE","newAvatar","displayGoBack","className","clsx","children","FlowHeader","leftContent","_jsxs","_Fragment","IconButton","priority","type","formatMessage","messages","back","ArrowLeft","AnimatedLabel","activeLabel","rightContent","bottomContent","length","Stepper","layout","Layout","VERTICAL","HORIZONTAL"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAMA,cAAc,GAAGA,CAAC;AACtBC,EAAAA,UAAU,GAAG,CAAC;EACdC,MAAM;AACNC,EAAAA,IAAI,gBAAGC,GAAA,CAACC,IAAI,IAAA,CAAG;AACfC,EAAAA,IAAI,GAAG,KAAK;EACZC,OAAO;EACPC,QAAQ;AACRC,EAAAA;AAAK,CACe,KAAI;AACxB,EAAA,MAAMC,IAAI,GAAGC,OAAO,EAAE;EAEtB,MAAMC,WAAW,GAAGL,OAAO,IAAI,IAAI,iBAAIH,GAAA,CAACS,WAAW,EAAA;AAACC,IAAAA,IAAI,EAAC,IAAI;AAACC,IAAAA,OAAO,EAAER;AAAQ,IAAG;AAElF,EAAA,MAAMS,QAAQ,GAAGC,aAAa,CAACC,UAAU,CAACC,KAAK,CAAC;AAChD,EAAA,MAAMC,QAAQ,GAAGH,aAAa,CAACC,UAAU,CAACG,KAAK,CAAC;AAEhD,EAAA,MAAMC,SAAS,GAAGhB,IAAI,GAAG,IAAI,GAAGJ,MAAM;EAEtC,MAAMqB,aAAa,GAAGf,QAAQ,IAAI,IAAI,IAAIP,UAAU,GAAG,CAAC;AAExD,EAAA,oBACEG,GAAA,CAAA,KAAA,EAAA;AACEoB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GAAA,CAAA,MAAA,EAAA;AAAMoB,UAAAA,SAAS,EAAC;SAAO,CAAG,EACtDZ,WAAW;AAAA,OACT,CACN;AACD6B,MAAAA,aAAa,EACX,CAACnC,IAAI,IAAIG,KAAK,CAACiC,MAAM,GAAG,CAAC,gBACvBtC,GAAA,CAACuC,OAAO,EAAA;AACN1C,QAAAA,UAAU,EAAEA,UAAW;AACvBQ,QAAAA,KAAK,EAAEA,KAAM;QACbe,SAAS,EAAEC,IAAI,CAAC,6BAA6B;OAAE,CAC/C,GACA,IACL;MACDmB,MAAM,EAAE,CAACxB,QAAQ,GAAGyB,MAAM,CAACC,QAAQ,GAAGD,MAAM,CAACE;KAAW;AAE5D,GAAK,CAAC;AAEV;;;;"}
@@ -16,6 +16,8 @@
16
16
  "neptune.DateLookup.selected": "вибрано",
17
17
  "neptune.DateLookup.twentyYears": "20 років",
18
18
  "neptune.DateLookup.year": "рік",
19
+ "neptune.Expander.collapseAriaLabel": "Згорнути",
20
+ "neptune.Expander.expandAriaLabel": "Розгорнути",
19
21
  "neptune.ExpressiveMoneyInput.currency.search.placeholder": "Вкажіть валюту / країну",
20
22
  "neptune.ExpressiveMoneyInput.currency.select.currency": "Виберіть валюту",
21
23
  "neptune.FlowNavigation.back": "назад до попереднього кроку",
@@ -20,6 +20,8 @@ var uk = {
20
20
  "neptune.DateLookup.selected": "вибрано",
21
21
  "neptune.DateLookup.twentyYears": "20 років",
22
22
  "neptune.DateLookup.year": "рік",
23
+ "neptune.Expander.collapseAriaLabel": "Згорнути",
24
+ "neptune.Expander.expandAriaLabel": "Розгорнути",
23
25
  "neptune.ExpressiveMoneyInput.currency.search.placeholder": "Вкажіть валюту / країну",
24
26
  "neptune.ExpressiveMoneyInput.currency.select.currency": "Виберіть валюту",
25
27
  "neptune.FlowNavigation.back": "назад до попереднього кроку",
@@ -1 +1 @@
1
- {"version":3,"file":"uk.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"uk.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -16,6 +16,8 @@ var uk = {
16
16
  "neptune.DateLookup.selected": "вибрано",
17
17
  "neptune.DateLookup.twentyYears": "20 років",
18
18
  "neptune.DateLookup.year": "рік",
19
+ "neptune.Expander.collapseAriaLabel": "Згорнути",
20
+ "neptune.Expander.expandAriaLabel": "Розгорнути",
19
21
  "neptune.ExpressiveMoneyInput.currency.search.placeholder": "Вкажіть валюту / країну",
20
22
  "neptune.ExpressiveMoneyInput.currency.select.currency": "Виберіть валюту",
21
23
  "neptune.FlowNavigation.back": "назад до попереднього кроку",
@@ -1 +1 @@
1
- {"version":3,"file":"uk.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"uk.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -5,12 +5,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var componentsTheming = require('@wise/components-theming');
6
6
  var clsx = require('clsx');
7
7
  var React = require('react');
8
+ var Body = require('../body/Body.js');
8
9
  require('../common/theme.js');
9
10
  require('../common/direction.js');
10
11
  require('../common/propsValues/control.js');
11
12
  require('../common/propsValues/breakpoint.js');
12
13
  var size = require('../common/propsValues/size.js');
13
- require('../common/propsValues/typography.js');
14
+ var typography = require('../common/propsValues/typography.js');
14
15
  require('../common/propsValues/width.js');
15
16
  require('../common/propsValues/type.js');
16
17
  require('../common/propsValues/dateMode.js');
@@ -34,6 +35,7 @@ const Loader = ({
34
35
  small = false,
35
36
  size: size$1 = size.Size.MEDIUM,
36
37
  displayInstantly = false,
38
+ label,
37
39
  classNames = {},
38
40
  ...restProps
39
41
  }) => {
@@ -64,11 +66,19 @@ const Loader = ({
64
66
  console.warn('Loader is forbidden to use with Forest Green theme. Check the https://wise.design/components/screen-loader for more info.');
65
67
  return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {});
66
68
  }
67
- return /*#__PURE__*/jsxRuntime.jsx("div", {
68
- className: clsx.clsx(style('tw-loader'), style(`tw-loader--${supportedSize}`), {
69
- 'tw-loader--visible': hasDebounced
70
- }),
71
- "data-testid": restProps['data-testid']
69
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
70
+ className: style('tw-loader'),
71
+ "data-testid": restProps['data-testid'],
72
+ children: [/*#__PURE__*/jsxRuntime.jsx("div", {
73
+ className: clsx.clsx(style('tw-loader-asset'), style(`tw-loader-asset--${supportedSize}`), {
74
+ 'tw-loader-asset--visible': hasDebounced
75
+ })
76
+ }), label && hasDebounced && /*#__PURE__*/jsxRuntime.jsx(Body.default, {
77
+ type: typography.Typography.BODY_LARGE_BOLD,
78
+ as: "span",
79
+ className: style('text-secondary'),
80
+ children: label
81
+ })]
72
82
  });
73
83
  };
74
84
  const getSupportedSize = size$1 => {
@@ -1 +1 @@
1
- {"version":3,"file":"Loader.js","sources":["../../src/loader/Loader.tsx"],"sourcesContent":["import { useTheme } from '@wise/components-theming';\nimport { clsx } from 'clsx';\nimport { useEffect, useState } from 'react';\n\nimport { Size, SizeExtraSmall, SizeSmall, SizeMedium, SizeLarge, SizeExtraLarge } from '../common';\n\n// TODO: We gracefully deprecated xs, lg and xl -- remove these as part of a future breaking change to this component\ntype DeprecatedSize = SizeExtraSmall | SizeLarge | SizeExtraLarge;\n\ntype SizeType = SizeSmall | SizeMedium;\n\nexport type LoaderProps = {\n /**\n * @deprecated Use `size` instead.\n * @default false\n */\n small?: boolean;\n /** @default 'md' */\n size?: SizeType | DeprecatedSize;\n /** @default false */\n displayInstantly?: boolean;\n // TODO: refactor in favor of prop from `CommonProps` type\n /** @default {} */\n classNames?: Record<string, string>;\n 'data-testid'?: string;\n};\n\n/**\n * Loader component\n *\n * Docs link: https://transferwise.github.io/neptune-web/components/progress/Loader\n *\n * @param root0\n * @param root0.small\n * @param root0.size\n * @param root0.classNames\n */\nconst Loader = ({\n small = false,\n size = Size.MEDIUM,\n displayInstantly = false,\n classNames = {},\n ...restProps\n}: LoaderProps) => {\n const { theme } = useTheme();\n const [hasDebounced, setHasDebounced] = useState(displayInstantly);\n\n useEffect(() => {\n let cancelled: boolean;\n let timeout: ReturnType<typeof setTimeout> | undefined;\n\n if (!displayInstantly) {\n timeout = setTimeout(() => {\n if (!cancelled) {\n setHasDebounced(true);\n }\n }, 1000);\n }\n\n return () => {\n cancelled = true;\n\n clearTimeout(timeout);\n };\n }, []);\n\n const style = (className: string): string => classNames[className] || className;\n const legacySize: SizeType | DeprecatedSize = small ? Size.SMALL : size;\n const supportedSize = getSupportedSize(legacySize);\n\n if (theme === 'forest-green') {\n // eslint-disable-next-line no-console\n console.warn(\n 'Loader is forbidden to use with Forest Green theme. Check the https://wise.design/components/screen-loader for more info.',\n );\n return <></>;\n }\n\n return (\n <div\n className={clsx(style('tw-loader'), style(`tw-loader--${supportedSize}`), {\n 'tw-loader--visible': hasDebounced,\n })}\n data-testid={restProps['data-testid']}\n />\n );\n};\n\nconst getSupportedSize = (size: SizeType | DeprecatedSize): SizeType => {\n switch (size) {\n case Size.SMALL:\n case Size.EXTRA_SMALL:\n return Size.SMALL;\n\n case Size.EXTRA_LARGE:\n case Size.LARGE:\n case Size.MEDIUM:\n default:\n return Size.MEDIUM;\n }\n};\n\nexport default Loader;\n"],"names":["Loader","small","size","Size","MEDIUM","displayInstantly","classNames","restProps","theme","useTheme","hasDebounced","setHasDebounced","useState","useEffect","cancelled","timeout","setTimeout","clearTimeout","style","className","legacySize","SMALL","supportedSize","getSupportedSize","console","warn","_jsx","_Fragment","clsx","EXTRA_SMALL","EXTRA_LARGE","LARGE"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,MAAMA,MAAM,GAAGA,CAAC;AACdC,EAAAA,KAAK,GAAG,KAAK;QACbC,MAAI,GAAGC,SAAI,CAACC,MAAM;AAClBC,EAAAA,gBAAgB,GAAG,KAAK;EACxBC,UAAU,GAAG,EAAE;EACf,GAAGC;AAAS,CACA,KAAI;EAChB,MAAM;AAAEC,IAAAA;GAAO,GAAGC,0BAAQ,EAAE;EAC5B,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAGC,cAAQ,CAACP,gBAAgB,CAAC;AAElEQ,EAAAA,eAAS,CAAC,MAAK;AACb,IAAA,IAAIC,SAAkB;AACtB,IAAA,IAAIC,OAAkD;IAEtD,IAAI,CAACV,gBAAgB,EAAE;MACrBU,OAAO,GAAGC,UAAU,CAAC,MAAK;QACxB,IAAI,CAACF,SAAS,EAAE;UACdH,eAAe,CAAC,IAAI,CAAC;AACvB,QAAA;MACF,CAAC,EAAE,IAAI,CAAC;AACV,IAAA;AAEA,IAAA,OAAO,MAAK;AACVG,MAAAA,SAAS,GAAG,IAAI;MAEhBG,YAAY,CAACF,OAAO,CAAC;IACvB,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMG,KAAK,GAAIC,SAAiB,IAAab,UAAU,CAACa,SAAS,CAAC,IAAIA,SAAS;EAC/E,MAAMC,UAAU,GAA8BnB,KAAK,GAAGE,SAAI,CAACkB,KAAK,GAAGnB,MAAI;AACvE,EAAA,MAAMoB,aAAa,GAAGC,gBAAgB,CAACH,UAAU,CAAC;EAElD,IAAIZ,KAAK,KAAK,cAAc,EAAE;AAC5B;AACAgB,IAAAA,OAAO,CAACC,IAAI,CACV,2HAA2H,CAC5H;AACD,IAAA,oBAAOC,cAAA,CAAAC,mBAAA,EAAA,GAAK;AACd,EAAA;AAEA,EAAA,oBACED,cAAA,CAAA,KAAA,EAAA;AACEP,IAAAA,SAAS,EAAES,SAAI,CAACV,KAAK,CAAC,WAAW,CAAC,EAAEA,KAAK,CAAC,CAAA,WAAA,EAAcI,aAAa,CAAA,CAAE,CAAC,EAAE;AACxE,MAAA,oBAAoB,EAAEZ;AACvB,KAAA,CAAE;IACH,aAAA,EAAaH,SAAS,CAAC,aAAa;AAAE,GAAA,CACtC;AAEN;AAEA,MAAMgB,gBAAgB,GAAIrB,MAA+B,IAAc;AACrE,EAAA,QAAQA,MAAI;IACV,KAAKC,SAAI,CAACkB,KAAK;IACf,KAAKlB,SAAI,CAAC0B,WAAW;MACnB,OAAO1B,SAAI,CAACkB,KAAK;IAEnB,KAAKlB,SAAI,CAAC2B,WAAW;IACrB,KAAK3B,SAAI,CAAC4B,KAAK;IACf,KAAK5B,SAAI,CAACC,MAAM;AAChB,IAAA;MACE,OAAOD,SAAI,CAACC,MAAM;AACtB;AACF,CAAC;;;;"}
1
+ {"version":3,"file":"Loader.js","sources":["../../src/loader/Loader.tsx"],"sourcesContent":["import { useTheme } from '@wise/components-theming';\nimport { clsx } from 'clsx';\nimport { ReactNode, useEffect, useState } from 'react';\n\nimport Body from '../body';\nimport { Size, SizeExtraSmall, SizeSmall, SizeMedium, SizeLarge, SizeExtraLarge } from '../common';\nimport { Typography } from '../common/propsValues/typography';\n\n// TODO: We gracefully deprecated xs, lg and xl -- remove these as part of a future breaking change to this component\ntype DeprecatedSize = SizeExtraSmall | SizeLarge | SizeExtraLarge;\n\ntype SizeType = SizeSmall | SizeMedium;\n\nexport type LoaderProps = {\n /**\n * @deprecated Use `size` instead.\n * @default false\n */\n small?: boolean;\n /** @default 'md' */\n size?: SizeType | DeprecatedSize;\n /** @default false */\n displayInstantly?: boolean;\n /** Optional label displayed below the loader */\n label?: ReactNode;\n // TODO: refactor in favor of prop from `CommonProps` type\n /** @default {} */\n classNames?: Record<string, string>;\n 'data-testid'?: string;\n};\n\n/**\n * Loader component\n *\n * Docs link: https://transferwise.github.io/neptune-web/components/progress/Loader\n *\n * @param root0\n * @param root0.small\n * @param root0.size\n * @param root0.classNames\n */\nconst Loader = ({\n small = false,\n size = Size.MEDIUM,\n displayInstantly = false,\n label,\n classNames = {},\n ...restProps\n}: LoaderProps) => {\n const { theme } = useTheme();\n const [hasDebounced, setHasDebounced] = useState(displayInstantly);\n\n useEffect(() => {\n let cancelled: boolean;\n let timeout: ReturnType<typeof setTimeout> | undefined;\n\n if (!displayInstantly) {\n timeout = setTimeout(() => {\n if (!cancelled) {\n setHasDebounced(true);\n }\n }, 1000);\n }\n\n return () => {\n cancelled = true;\n\n clearTimeout(timeout);\n };\n }, []);\n\n const style = (className: string): string => classNames[className] || className;\n const legacySize: SizeType | DeprecatedSize = small ? Size.SMALL : size;\n const supportedSize = getSupportedSize(legacySize);\n\n if (theme === 'forest-green') {\n // eslint-disable-next-line no-console\n console.warn(\n 'Loader is forbidden to use with Forest Green theme. Check the https://wise.design/components/screen-loader for more info.',\n );\n return <></>;\n }\n\n return (\n <div className={style('tw-loader')} data-testid={restProps['data-testid']}>\n <div\n className={clsx(style('tw-loader-asset'), style(`tw-loader-asset--${supportedSize}`), {\n 'tw-loader-asset--visible': hasDebounced,\n })}\n />\n {label && hasDebounced && (\n <Body type={Typography.BODY_LARGE_BOLD} as=\"span\" className={style('text-secondary')}>\n {label}\n </Body>\n )}\n </div>\n );\n};\n\nconst getSupportedSize = (size: SizeType | DeprecatedSize): SizeType => {\n switch (size) {\n case Size.SMALL:\n case Size.EXTRA_SMALL:\n return Size.SMALL;\n\n case Size.EXTRA_LARGE:\n case Size.LARGE:\n case Size.MEDIUM:\n default:\n return Size.MEDIUM;\n }\n};\n\nexport default Loader;\n"],"names":["Loader","small","size","Size","MEDIUM","displayInstantly","label","classNames","restProps","theme","useTheme","hasDebounced","setHasDebounced","useState","useEffect","cancelled","timeout","setTimeout","clearTimeout","style","className","legacySize","SMALL","supportedSize","getSupportedSize","console","warn","_jsx","_Fragment","_jsxs","children","clsx","Body","type","Typography","BODY_LARGE_BOLD","as","EXTRA_SMALL","EXTRA_LARGE","LARGE"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,MAAMA,MAAM,GAAGA,CAAC;AACdC,EAAAA,KAAK,GAAG,KAAK;QACbC,MAAI,GAAGC,SAAI,CAACC,MAAM;AAClBC,EAAAA,gBAAgB,GAAG,KAAK;EACxBC,KAAK;EACLC,UAAU,GAAG,EAAE;EACf,GAAGC;AAAS,CACA,KAAI;EAChB,MAAM;AAAEC,IAAAA;GAAO,GAAGC,0BAAQ,EAAE;EAC5B,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAGC,cAAQ,CAACR,gBAAgB,CAAC;AAElES,EAAAA,eAAS,CAAC,MAAK;AACb,IAAA,IAAIC,SAAkB;AACtB,IAAA,IAAIC,OAAkD;IAEtD,IAAI,CAACX,gBAAgB,EAAE;MACrBW,OAAO,GAAGC,UAAU,CAAC,MAAK;QACxB,IAAI,CAACF,SAAS,EAAE;UACdH,eAAe,CAAC,IAAI,CAAC;AACvB,QAAA;MACF,CAAC,EAAE,IAAI,CAAC;AACV,IAAA;AAEA,IAAA,OAAO,MAAK;AACVG,MAAAA,SAAS,GAAG,IAAI;MAEhBG,YAAY,CAACF,OAAO,CAAC;IACvB,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMG,KAAK,GAAIC,SAAiB,IAAab,UAAU,CAACa,SAAS,CAAC,IAAIA,SAAS;EAC/E,MAAMC,UAAU,GAA8BpB,KAAK,GAAGE,SAAI,CAACmB,KAAK,GAAGpB,MAAI;AACvE,EAAA,MAAMqB,aAAa,GAAGC,gBAAgB,CAACH,UAAU,CAAC;EAElD,IAAIZ,KAAK,KAAK,cAAc,EAAE;AAC5B;AACAgB,IAAAA,OAAO,CAACC,IAAI,CACV,2HAA2H,CAC5H;AACD,IAAA,oBAAOC,cAAA,CAAAC,mBAAA,EAAA,GAAK;AACd,EAAA;AAEA,EAAA,oBACEC,eAAA,CAAA,KAAA,EAAA;AAAKT,IAAAA,SAAS,EAAED,KAAK,CAAC,WAAW,CAAE;IAAC,aAAA,EAAaX,SAAS,CAAC,aAAa,CAAE;AAAAsB,IAAAA,QAAA,gBACxEH,cAAA,CAAA,KAAA,EAAA;AACEP,MAAAA,SAAS,EAAEW,SAAI,CAACZ,KAAK,CAAC,iBAAiB,CAAC,EAAEA,KAAK,CAAC,CAAA,iBAAA,EAAoBI,aAAa,CAAA,CAAE,CAAC,EAAE;AACpF,QAAA,0BAA0B,EAAEZ;OAC7B;KAAE,CAEL,EAACL,KAAK,IAAIK,YAAY,iBACpBgB,cAAA,CAACK,YAAI,EAAA;MAACC,IAAI,EAAEC,qBAAU,CAACC,eAAgB;AAACC,MAAAA,EAAE,EAAC,MAAM;AAAChB,MAAAA,SAAS,EAAED,KAAK,CAAC,gBAAgB,CAAE;AAAAW,MAAAA,QAAA,EAClFxB;AAAK,KACF,CACP;AAAA,GACE,CAAC;AAEV;AAEA,MAAMkB,gBAAgB,GAAItB,MAA+B,IAAc;AACrE,EAAA,QAAQA,MAAI;IACV,KAAKC,SAAI,CAACmB,KAAK;IACf,KAAKnB,SAAI,CAACkC,WAAW;MACnB,OAAOlC,SAAI,CAACmB,KAAK;IAEnB,KAAKnB,SAAI,CAACmC,WAAW;IACrB,KAAKnC,SAAI,CAACoC,KAAK;IACf,KAAKpC,SAAI,CAACC,MAAM;AAChB,IAAA;MACE,OAAOD,SAAI,CAACC,MAAM;AACtB;AACF,CAAC;;;;"}
@@ -1,12 +1,13 @@
1
1
  import { useTheme } from '@wise/components-theming';
2
2
  import { clsx } from 'clsx';
3
3
  import { useState, useEffect } from 'react';
4
+ import Body from '../body/Body.mjs';
4
5
  import '../common/theme.mjs';
5
6
  import '../common/direction.mjs';
6
7
  import '../common/propsValues/control.mjs';
7
8
  import '../common/propsValues/breakpoint.mjs';
8
9
  import { Size } from '../common/propsValues/size.mjs';
9
- import '../common/propsValues/typography.mjs';
10
+ import { Typography } from '../common/propsValues/typography.mjs';
10
11
  import '../common/propsValues/width.mjs';
11
12
  import '../common/propsValues/type.mjs';
12
13
  import '../common/propsValues/dateMode.mjs';
@@ -24,12 +25,13 @@ import '@transferwise/formatting';
24
25
  import '@transferwise/icons';
25
26
  import 'react-intl';
26
27
  import '../common/closeButton/CloseButton.messages.mjs';
27
- import { jsx, Fragment } from 'react/jsx-runtime';
28
+ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
28
29
 
29
30
  const Loader = ({
30
31
  small = false,
31
32
  size = Size.MEDIUM,
32
33
  displayInstantly = false,
34
+ label,
33
35
  classNames = {},
34
36
  ...restProps
35
37
  }) => {
@@ -60,11 +62,19 @@ const Loader = ({
60
62
  console.warn('Loader is forbidden to use with Forest Green theme. Check the https://wise.design/components/screen-loader for more info.');
61
63
  return /*#__PURE__*/jsx(Fragment, {});
62
64
  }
63
- return /*#__PURE__*/jsx("div", {
64
- className: clsx(style('tw-loader'), style(`tw-loader--${supportedSize}`), {
65
- 'tw-loader--visible': hasDebounced
66
- }),
67
- "data-testid": restProps['data-testid']
65
+ return /*#__PURE__*/jsxs("div", {
66
+ className: style('tw-loader'),
67
+ "data-testid": restProps['data-testid'],
68
+ children: [/*#__PURE__*/jsx("div", {
69
+ className: clsx(style('tw-loader-asset'), style(`tw-loader-asset--${supportedSize}`), {
70
+ 'tw-loader-asset--visible': hasDebounced
71
+ })
72
+ }), label && hasDebounced && /*#__PURE__*/jsx(Body, {
73
+ type: Typography.BODY_LARGE_BOLD,
74
+ as: "span",
75
+ className: style('text-secondary'),
76
+ children: label
77
+ })]
68
78
  });
69
79
  };
70
80
  const getSupportedSize = size => {
@@ -1 +1 @@
1
- {"version":3,"file":"Loader.mjs","sources":["../../src/loader/Loader.tsx"],"sourcesContent":["import { useTheme } from '@wise/components-theming';\nimport { clsx } from 'clsx';\nimport { useEffect, useState } from 'react';\n\nimport { Size, SizeExtraSmall, SizeSmall, SizeMedium, SizeLarge, SizeExtraLarge } from '../common';\n\n// TODO: We gracefully deprecated xs, lg and xl -- remove these as part of a future breaking change to this component\ntype DeprecatedSize = SizeExtraSmall | SizeLarge | SizeExtraLarge;\n\ntype SizeType = SizeSmall | SizeMedium;\n\nexport type LoaderProps = {\n /**\n * @deprecated Use `size` instead.\n * @default false\n */\n small?: boolean;\n /** @default 'md' */\n size?: SizeType | DeprecatedSize;\n /** @default false */\n displayInstantly?: boolean;\n // TODO: refactor in favor of prop from `CommonProps` type\n /** @default {} */\n classNames?: Record<string, string>;\n 'data-testid'?: string;\n};\n\n/**\n * Loader component\n *\n * Docs link: https://transferwise.github.io/neptune-web/components/progress/Loader\n *\n * @param root0\n * @param root0.small\n * @param root0.size\n * @param root0.classNames\n */\nconst Loader = ({\n small = false,\n size = Size.MEDIUM,\n displayInstantly = false,\n classNames = {},\n ...restProps\n}: LoaderProps) => {\n const { theme } = useTheme();\n const [hasDebounced, setHasDebounced] = useState(displayInstantly);\n\n useEffect(() => {\n let cancelled: boolean;\n let timeout: ReturnType<typeof setTimeout> | undefined;\n\n if (!displayInstantly) {\n timeout = setTimeout(() => {\n if (!cancelled) {\n setHasDebounced(true);\n }\n }, 1000);\n }\n\n return () => {\n cancelled = true;\n\n clearTimeout(timeout);\n };\n }, []);\n\n const style = (className: string): string => classNames[className] || className;\n const legacySize: SizeType | DeprecatedSize = small ? Size.SMALL : size;\n const supportedSize = getSupportedSize(legacySize);\n\n if (theme === 'forest-green') {\n // eslint-disable-next-line no-console\n console.warn(\n 'Loader is forbidden to use with Forest Green theme. Check the https://wise.design/components/screen-loader for more info.',\n );\n return <></>;\n }\n\n return (\n <div\n className={clsx(style('tw-loader'), style(`tw-loader--${supportedSize}`), {\n 'tw-loader--visible': hasDebounced,\n })}\n data-testid={restProps['data-testid']}\n />\n );\n};\n\nconst getSupportedSize = (size: SizeType | DeprecatedSize): SizeType => {\n switch (size) {\n case Size.SMALL:\n case Size.EXTRA_SMALL:\n return Size.SMALL;\n\n case Size.EXTRA_LARGE:\n case Size.LARGE:\n case Size.MEDIUM:\n default:\n return Size.MEDIUM;\n }\n};\n\nexport default Loader;\n"],"names":["Loader","small","size","Size","MEDIUM","displayInstantly","classNames","restProps","theme","useTheme","hasDebounced","setHasDebounced","useState","useEffect","cancelled","timeout","setTimeout","clearTimeout","style","className","legacySize","SMALL","supportedSize","getSupportedSize","console","warn","_jsx","_Fragment","clsx","EXTRA_SMALL","EXTRA_LARGE","LARGE"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,MAAMA,MAAM,GAAGA,CAAC;AACdC,EAAAA,KAAK,GAAG,KAAK;EACbC,IAAI,GAAGC,IAAI,CAACC,MAAM;AAClBC,EAAAA,gBAAgB,GAAG,KAAK;EACxBC,UAAU,GAAG,EAAE;EACf,GAAGC;AAAS,CACA,KAAI;EAChB,MAAM;AAAEC,IAAAA;GAAO,GAAGC,QAAQ,EAAE;EAC5B,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAGC,QAAQ,CAACP,gBAAgB,CAAC;AAElEQ,EAAAA,SAAS,CAAC,MAAK;AACb,IAAA,IAAIC,SAAkB;AACtB,IAAA,IAAIC,OAAkD;IAEtD,IAAI,CAACV,gBAAgB,EAAE;MACrBU,OAAO,GAAGC,UAAU,CAAC,MAAK;QACxB,IAAI,CAACF,SAAS,EAAE;UACdH,eAAe,CAAC,IAAI,CAAC;AACvB,QAAA;MACF,CAAC,EAAE,IAAI,CAAC;AACV,IAAA;AAEA,IAAA,OAAO,MAAK;AACVG,MAAAA,SAAS,GAAG,IAAI;MAEhBG,YAAY,CAACF,OAAO,CAAC;IACvB,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMG,KAAK,GAAIC,SAAiB,IAAab,UAAU,CAACa,SAAS,CAAC,IAAIA,SAAS;EAC/E,MAAMC,UAAU,GAA8BnB,KAAK,GAAGE,IAAI,CAACkB,KAAK,GAAGnB,IAAI;AACvE,EAAA,MAAMoB,aAAa,GAAGC,gBAAgB,CAACH,UAAU,CAAC;EAElD,IAAIZ,KAAK,KAAK,cAAc,EAAE;AAC5B;AACAgB,IAAAA,OAAO,CAACC,IAAI,CACV,2HAA2H,CAC5H;AACD,IAAA,oBAAOC,GAAA,CAAAC,QAAA,EAAA,GAAK;AACd,EAAA;AAEA,EAAA,oBACED,GAAA,CAAA,KAAA,EAAA;AACEP,IAAAA,SAAS,EAAES,IAAI,CAACV,KAAK,CAAC,WAAW,CAAC,EAAEA,KAAK,CAAC,CAAA,WAAA,EAAcI,aAAa,CAAA,CAAE,CAAC,EAAE;AACxE,MAAA,oBAAoB,EAAEZ;AACvB,KAAA,CAAE;IACH,aAAA,EAAaH,SAAS,CAAC,aAAa;AAAE,GAAA,CACtC;AAEN;AAEA,MAAMgB,gBAAgB,GAAIrB,IAA+B,IAAc;AACrE,EAAA,QAAQA,IAAI;IACV,KAAKC,IAAI,CAACkB,KAAK;IACf,KAAKlB,IAAI,CAAC0B,WAAW;MACnB,OAAO1B,IAAI,CAACkB,KAAK;IAEnB,KAAKlB,IAAI,CAAC2B,WAAW;IACrB,KAAK3B,IAAI,CAAC4B,KAAK;IACf,KAAK5B,IAAI,CAACC,MAAM;AAChB,IAAA;MACE,OAAOD,IAAI,CAACC,MAAM;AACtB;AACF,CAAC;;;;"}
1
+ {"version":3,"file":"Loader.mjs","sources":["../../src/loader/Loader.tsx"],"sourcesContent":["import { useTheme } from '@wise/components-theming';\nimport { clsx } from 'clsx';\nimport { ReactNode, useEffect, useState } from 'react';\n\nimport Body from '../body';\nimport { Size, SizeExtraSmall, SizeSmall, SizeMedium, SizeLarge, SizeExtraLarge } from '../common';\nimport { Typography } from '../common/propsValues/typography';\n\n// TODO: We gracefully deprecated xs, lg and xl -- remove these as part of a future breaking change to this component\ntype DeprecatedSize = SizeExtraSmall | SizeLarge | SizeExtraLarge;\n\ntype SizeType = SizeSmall | SizeMedium;\n\nexport type LoaderProps = {\n /**\n * @deprecated Use `size` instead.\n * @default false\n */\n small?: boolean;\n /** @default 'md' */\n size?: SizeType | DeprecatedSize;\n /** @default false */\n displayInstantly?: boolean;\n /** Optional label displayed below the loader */\n label?: ReactNode;\n // TODO: refactor in favor of prop from `CommonProps` type\n /** @default {} */\n classNames?: Record<string, string>;\n 'data-testid'?: string;\n};\n\n/**\n * Loader component\n *\n * Docs link: https://transferwise.github.io/neptune-web/components/progress/Loader\n *\n * @param root0\n * @param root0.small\n * @param root0.size\n * @param root0.classNames\n */\nconst Loader = ({\n small = false,\n size = Size.MEDIUM,\n displayInstantly = false,\n label,\n classNames = {},\n ...restProps\n}: LoaderProps) => {\n const { theme } = useTheme();\n const [hasDebounced, setHasDebounced] = useState(displayInstantly);\n\n useEffect(() => {\n let cancelled: boolean;\n let timeout: ReturnType<typeof setTimeout> | undefined;\n\n if (!displayInstantly) {\n timeout = setTimeout(() => {\n if (!cancelled) {\n setHasDebounced(true);\n }\n }, 1000);\n }\n\n return () => {\n cancelled = true;\n\n clearTimeout(timeout);\n };\n }, []);\n\n const style = (className: string): string => classNames[className] || className;\n const legacySize: SizeType | DeprecatedSize = small ? Size.SMALL : size;\n const supportedSize = getSupportedSize(legacySize);\n\n if (theme === 'forest-green') {\n // eslint-disable-next-line no-console\n console.warn(\n 'Loader is forbidden to use with Forest Green theme. Check the https://wise.design/components/screen-loader for more info.',\n );\n return <></>;\n }\n\n return (\n <div className={style('tw-loader')} data-testid={restProps['data-testid']}>\n <div\n className={clsx(style('tw-loader-asset'), style(`tw-loader-asset--${supportedSize}`), {\n 'tw-loader-asset--visible': hasDebounced,\n })}\n />\n {label && hasDebounced && (\n <Body type={Typography.BODY_LARGE_BOLD} as=\"span\" className={style('text-secondary')}>\n {label}\n </Body>\n )}\n </div>\n );\n};\n\nconst getSupportedSize = (size: SizeType | DeprecatedSize): SizeType => {\n switch (size) {\n case Size.SMALL:\n case Size.EXTRA_SMALL:\n return Size.SMALL;\n\n case Size.EXTRA_LARGE:\n case Size.LARGE:\n case Size.MEDIUM:\n default:\n return Size.MEDIUM;\n }\n};\n\nexport default Loader;\n"],"names":["Loader","small","size","Size","MEDIUM","displayInstantly","label","classNames","restProps","theme","useTheme","hasDebounced","setHasDebounced","useState","useEffect","cancelled","timeout","setTimeout","clearTimeout","style","className","legacySize","SMALL","supportedSize","getSupportedSize","console","warn","_jsx","_Fragment","_jsxs","children","clsx","Body","type","Typography","BODY_LARGE_BOLD","as","EXTRA_SMALL","EXTRA_LARGE","LARGE"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,MAAMA,MAAM,GAAGA,CAAC;AACdC,EAAAA,KAAK,GAAG,KAAK;EACbC,IAAI,GAAGC,IAAI,CAACC,MAAM;AAClBC,EAAAA,gBAAgB,GAAG,KAAK;EACxBC,KAAK;EACLC,UAAU,GAAG,EAAE;EACf,GAAGC;AAAS,CACA,KAAI;EAChB,MAAM;AAAEC,IAAAA;GAAO,GAAGC,QAAQ,EAAE;EAC5B,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAGC,QAAQ,CAACR,gBAAgB,CAAC;AAElES,EAAAA,SAAS,CAAC,MAAK;AACb,IAAA,IAAIC,SAAkB;AACtB,IAAA,IAAIC,OAAkD;IAEtD,IAAI,CAACX,gBAAgB,EAAE;MACrBW,OAAO,GAAGC,UAAU,CAAC,MAAK;QACxB,IAAI,CAACF,SAAS,EAAE;UACdH,eAAe,CAAC,IAAI,CAAC;AACvB,QAAA;MACF,CAAC,EAAE,IAAI,CAAC;AACV,IAAA;AAEA,IAAA,OAAO,MAAK;AACVG,MAAAA,SAAS,GAAG,IAAI;MAEhBG,YAAY,CAACF,OAAO,CAAC;IACvB,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMG,KAAK,GAAIC,SAAiB,IAAab,UAAU,CAACa,SAAS,CAAC,IAAIA,SAAS;EAC/E,MAAMC,UAAU,GAA8BpB,KAAK,GAAGE,IAAI,CAACmB,KAAK,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E',
74
74
  format = 'default',
75
75
  display = 'responsive',
76
+ size = 24,
76
77
  'aria-label': ariaLabel
77
78
  }) {
78
79
  const isScreenSm = !useScreenSize.useScreenSize(breakpoint.Breakpoint.SMALL);
79
80
  const compact = display === 'compact' || display === 'responsive' && isScreenSm;
80
81
  const assetName = compact ? 'FastFlag' : getAssetName(type, format);
81
82
  const Asset = logoAssets[assetName];
83
+ const sizes = logoAssets$1.logoAssetsDimensions[assetName];
82
84
  const {
83
85
  width,
84
86
  height
85
- } = logoAssets$1.logoAssetsDimensions[assetName];
87
+ } = logoAssets$1.logoAssetsDimensions[assetName][Number(size)] ?? sizes[24];
86
88
  return /*#__PURE__*/jsxRuntime.jsx("span", {
87
89
  className: clsx.clsx('np-logo', className),
88
90
  role: "img",
@@ -1 +1 @@
1
- {"version":3,"file":"Logo.js","sources":["../../src/logo/Logo.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nimport {\n WiseLogo,\n WiseBusinessPrimary,\n WiseBusinessSecondary,\n WisePlatformPrimary,\n WisePlatformSecondary,\n FastFlag,\n logoAssetsDimensions,\n} from './logo-assets';\nimport type { LogoAssetName } from './logo-assets';\nimport { Breakpoint } from '../common';\nimport { useScreenSize } from '../common/hooks/useScreenSize';\nimport { AriaAttributes } from 'react';\n\nexport enum LogoType {\n WISE = 'WISE',\n WISE_BUSINESS = 'WISE_BUSINESS',\n WISE_PLATFORM = 'WISE_PLATFORM',\n}\n\nexport enum LogoDisplay {\n RESPONSIVE = 'responsive',\n COMPACT = 'compact',\n FULL = 'full',\n}\n\nexport enum LogoFormat {\n DEFAULT = 'default',\n PRIMARY_LOCKUP = 'primary-lockup',\n SECONDARY_LOCKUP = 'secondary-lockup',\n}\n\nexport interface LogoProps {\n /** Extra classes applied to Logo */\n className?: string;\n /**\n * Renders a light-coloured version suited for dark backgrounds.\n * @default false\n * @deprecated dark mode comes out of the box, this property has no effect\n */\n inverse?: boolean;\n /**\n * What type of logo to display\n * @default 'WISE'\n */\n type?: `${LogoType}`;\n /**\n * Controls which logo variant is shown.\n * - `\"responsive\"` (default): full wordmark on large screens, fast-flag mark on small screens (<600 px).\n * - `\"compact\"`: always renders the fast-flag mark regardless of screen size.\n * - `\"full\"`: always renders the full wordmark/lockup regardless of screen size.\n * @default 'responsive'\n */\n display?: `${LogoDisplay}`;\n /**\n * Controls the format of the logo.\n * - `\"default\"`: plain Wise wordmark, no product name.\n * - `\"primary-lockup\"`: product name shown inline alongside the wordmark.\n * - `\"secondary-lockup\"`: stacked (two-line) variant with the product name.\n * @default 'default'\n */\n format?: `${LogoFormat}`;\n /**\n * Override default ({@link labelByType}) screen reader messages\n */\n 'aria-label'?: AriaAttributes['aria-label'];\n}\n\nconst labelByType = {\n WISE: 'Wise',\n WISE_BUSINESS: 'Wise Business',\n WISE_PLATFORM: 'Wise Platform',\n} satisfies Record<`${LogoType}`, string>;\n\nconst logoAssets: Record<LogoAssetName, () => JSX.Element> = {\n FastFlag,\n WiseLogo,\n WiseBusinessPrimary,\n WiseBusinessSecondary,\n WisePlatformPrimary,\n WisePlatformSecondary,\n};\n\n/**\n * Renders the Wise wordmark logo. Responsive — shows the flag-only mark on small viewports\n * and the full wordmark on ≥576px (small breakpoint and above).\n *\n * @see {@link https://wise.design/foundations/logo Design Spec}\n */\nexport default function Logo({\n className,\n type = 'WISE',\n format = 'default',\n display = 'responsive',\n 'aria-label': ariaLabel,\n}: LogoProps) {\n const isScreenSm = !useScreenSize(Breakpoint.SMALL);\n const compact = display === 'compact' || (display === 'responsive' && isScreenSm);\n\n const assetName = compact ? 'FastFlag' : getAssetName(type, format);\n const Asset = logoAssets[assetName];\n const { width, height } = logoAssetsDimensions[assetName];\n\n return (\n <span\n className={clsx('np-logo', className)}\n role=\"img\"\n aria-label={ariaLabel ?? labelByType[type]}\n style={\n {\n '--wds-logo-width': `${width}px`,\n '--wds-logo-height': `${height}px`,\n } as React.CSSProperties\n }\n >\n <Asset />\n </span>\n );\n}\n\nfunction getAssetName(type: `${LogoType}`, format: `${LogoFormat}`): LogoAssetName {\n if (format !== 'default') {\n if (type === 'WISE_BUSINESS') {\n return format === 'secondary-lockup' ? 'WiseBusinessSecondary' : 'WiseBusinessPrimary';\n }\n if (type === 'WISE_PLATFORM') {\n return format === 'secondary-lockup' ? 'WisePlatformSecondary' : 'WisePlatformPrimary';\n }\n }\n return 'WiseLogo';\n}\n"],"names":["LogoType","LogoDisplay","LogoFormat","labelByType","WISE","WISE_BUSINESS","WISE_PLATFORM","logoAssets","FastFlag","WiseLogo","WiseBusinessPrimary","WiseBusinessSecondary","WisePlatformPrimary","WisePlatformSecondary","Logo","className","type","format","display","ariaLabel","isScreenSm","useScreenSize","Breakpoint","SMALL","compact","assetName","getAssetName","Asset","width","height","logoAssetsDimensions","_jsx","clsx","role","style","children"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBYA;AAAZ,CAAA,UAAYA,QAAQ,EAAA;AAClBA,EAAAA,QAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACbA,EAAAA,QAAA,CAAA,eAAA,CAAA,GAAA,eAA+B;AAC/BA,EAAAA,QAAA,CAAA,eAAA,CAAA,GAAA,eAA+B;AACjC,CAAC,EAJWA,gBAAQ,KAARA,gBAAQ,GAAA,EAAA,CAAA,CAAA;AAMRC;AAAZ,CAAA,UAAYA,WAAW,EAAA;AACrBA,EAAAA,WAAA,CAAA,YAAA,CAAA,GAAA,YAAyB;AACzBA,EAAAA,WAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnBA,EAAAA,WAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACf,CAAC,EAJWA,mBAAW,KAAXA,mBAAW,GAAA,EAAA,CAAA,CAAA;AAMXC;AAAZ,CAAA,UAAYA,UAAU,EAAA;AACpBA,EAAAA,UAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnBA,EAAAA,UAAA,CAAA,gBAAA,CAAA,GAAA,gBAAiC;AACjCA,EAAAA,UAAA,CAAA,kBAAA,CA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GC,MAAM,CAAA,EAAA;KAEjC;AAAAM,IAAAA,QAAA,eAEDJ,cAAA,CAACJ,KAAK,EAAA,EAAA;AACR,GAAM,CAAC;AAEX;AAEA,SAASD,YAAYA,CAACV,IAAmB,EAAEC,MAAuB,EAAA;EAChE,IAAIA,MAAM,KAAK,SAAS,EAAE;IACxB,IAAID,IAAI,KAAK,eAAe,EAAE;AAC5B,MAAA,OAAOC,MAAM,KAAK,kBAAkB,GAAG,uBAAuB,GAAG,qBAAqB;AACxF,IAAA;IACA,IAAID,IAAI,KAAK,eAAe,EAAE;AAC5B,MAAA,OAAOC,MAAM,KAAK,kBAAkB,GAAG,uBAAuB,GAAG,qBAAqB;AACxF,IAAA;AACF,EAAA;AACA,EAAA,OAAO,UAAU;AACnB;;;;"}
1
+ {"version":3,"file":"Logo.js","sources":["../../src/logo/Logo.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nimport {\n WiseLogo,\n WiseBusinessPrimary,\n WiseBusinessSecondary,\n WisePlatformPrimary,\n WisePlatformSecondary,\n FastFlag,\n logoAssetsDimensions,\n} from './logo-assets';\nimport type { LogoAssetName } from './logo-assets';\nimport { Breakpoint } from '../common';\nimport { useScreenSize } from '../common/hooks/useScreenSize';\nimport { AriaAttributes } from 'react';\n\nexport enum LogoType {\n WISE = 'WISE',\n WISE_BUSINESS = 'WISE_BUSINESS',\n WISE_PLATFORM = 'WISE_PLATFORM',\n}\n\nexport enum LogoDisplay {\n RESPONSIVE = 'responsive',\n COMPACT = 'compact',\n FULL = 'full',\n}\n\nexport enum LogoFormat {\n DEFAULT = 'default',\n PRIMARY_LOCKUP = 'primary-lockup',\n SECONDARY_LOCKUP = 'secondary-lockup',\n}\n\nexport type LogoSize = 16 | 18 | 20 | 24 | 28 | 36 | '16' | '18' | '20' | '24' | '28' | '36';\n\nexport interface LogoProps {\n /** Extra classes applied to Logo */\n className?: string;\n /**\n * Renders a light-coloured version suited for dark backgrounds.\n * @default false\n * @deprecated dark mode comes out of the box, this property has no effect\n */\n inverse?: boolean;\n /**\n * What type of logo to display\n * @default 'WISE'\n */\n type?: `${LogoType}`;\n /**\n * Controls which logo variant is shown.\n * - `\"responsive\"` (default): full wordmark on large screens, fast-flag mark on small screens (<600 px).\n * - `\"compact\"`: always renders the fast-flag mark regardless of screen size.\n * - `\"full\"`: always renders the full wordmark/lockup regardless of screen size.\n * @default 'responsive'\n */\n display?: `${LogoDisplay}`;\n /**\n * Controls the format of the logo.\n * - `\"default\"`: plain Wise wordmark, no product name.\n * - `\"primary-lockup\"`: product name shown inline alongside the wordmark.\n * - `\"secondary-lockup\"`: stacked (two-line) variant with the product name.\n * @default 'default'\n */\n format?: `${LogoFormat}`;\n /**\n * Controls the height and width of the logo in pixels.\n * @default 24\n */\n size?: LogoSize;\n /**\n * Override default ({@link labelByType}) screen reader messages\n */\n 'aria-label'?: AriaAttributes['aria-label'];\n}\n\nconst labelByType = {\n WISE: 'Wise',\n WISE_BUSINESS: 'Wise Business',\n WISE_PLATFORM: 'Wise Platform',\n} satisfies Record<`${LogoType}`, string>;\n\nconst logoAssets: Record<LogoAssetName, () => JSX.Element> = {\n FastFlag,\n WiseLogo,\n WiseBusinessPrimary,\n WiseBusinessSecondary,\n WisePlatformPrimary,\n WisePlatformSecondary,\n};\n\n/**\n * Renders the Wise wordmark logo. Responsive — shows the flag-only mark on small viewports\n * and the full wordmark on ≥576px (small breakpoint and above).\n *\n * @see {@link https://wise.design/foundations/logo Design Spec}\n */\nexport default function Logo({\n className,\n type = 'WISE',\n format = 'default',\n display = 'responsive',\n size = 24,\n 'aria-label': ariaLabel,\n}: LogoProps) {\n const isScreenSm = !useScreenSize(Breakpoint.SMALL);\n const compact = display === 'compact' || (display === 'responsive' && isScreenSm);\n\n const assetName = compact ? 'FastFlag' : getAssetName(type, format);\n const Asset = logoAssets[assetName];\n const sizes = logoAssetsDimensions[assetName];\n const { width, height } =\n logoAssetsDimensions[assetName][Number(size) as keyof typeof sizes] ?? sizes[24];\n\n return (\n <span\n className={clsx('np-logo', className)}\n role=\"img\"\n aria-label={ariaLabel ?? labelByType[type]}\n style={\n {\n '--wds-logo-width': `${width}px`,\n '--wds-logo-height': `${height}px`,\n } as React.CSSProperties\n }\n >\n <Asset />\n </span>\n );\n}\n\nfunction getAssetName(type: `${LogoType}`, format: `${LogoFormat}`): LogoAssetName {\n if (format !== 'default') {\n if (type === 'WISE_BUSINESS') {\n return format === 'secondary-lockup' ? 'WiseBusinessSecondary' : 'WiseBusinessPrimary';\n }\n if (type === 'WISE_PLATFORM') {\n return format === 'secondary-lockup' ? 'WisePlatformSecondary' : 'WisePlatformPrimary';\n }\n }\n return 'WiseLogo';\n}\n"],"names":["LogoType","LogoDisplay","LogoFormat","labelByType","WISE","WISE_BUSINESS","WISE_PLATFORM","logoAssets","FastFlag","WiseLogo","WiseBusinessPrimary","WiseBusinessSecondary","WisePlatformPrimary","WisePlatformSecondary","Logo","className","type","format","display","size","ariaLabel","isScreenSm","useScreenSize","Breakpoint","SMALL","compact","assetName","getAssetName","Asset","sizes","logoAssetsDimensions","width","height","Number","_jsx","clsx","role","style","children"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBYA;AAAZ,CAAA,UAAYA,QAAQ,EAAA;AAClBA,EAAAA,QAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACbA,EAAAA,QAAA,CAAA,eAAA,CAAA,GAAA,eAA+B;AAC/BA,EAAAA,QAAA,CAAA,eAAA,CAAA,GAAA,eAA+B;AACjC,CAAC,EAJWA,gBAAQ,KAARA,gBAAQ,GAAA,EAAA,CAAA,CAAA;AAMRC;AAAZ,CAAA,UAAYA,WAAW,EAAA;AACrBA,EAAAA,WAAA,CAAA,YAAA,CAAA,GAAA,YAAyB;AACzBA,EAAAA,WAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnBA,EAAAA,WAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACf,CAAC,EAJWA,mBAAW,KAAXA,mBAAW,GAAA,EAAA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AAC,IAAIU,KAAK,CAAC,EAAE,CAAC;AAElF,EAAA,oBACEK,cAAA,CAAA,MAAA,EAAA;AACEnB,IAAAA,SAAS,EAAEoB,SAAI,CAAC,SAAS,EAAEpB,SAAS,CAAE;AACtCqB,IAAAA,IAAI,EAAC,KAAK;AACV,IAAA,YAAA,EAAYhB,SAAS,IAAIjB,WAAW,CAACa,IAAI,CAAE;AAC3CqB,IAAAA,KAAK,EACH;MACE,kBAAkB,EAAE,CAAA,EAAGN,KAAK,CAAA,EAAA,CAAI;MAChC,mBAAmB,EAAE,GAAGC,MAAM,CAAA,EAAA;KAEjC;AAAAM,IAAAA,QAAA,eAEDJ,cAAA,CAACN,KAAK,EAAA,EAAA;AACR,GAAM,CAAC;AAEX;AAEA,SAASD,YAAYA,CAACX,IAAmB,EAAEC,MAAuB,EAAA;EAChE,IAAIA,MAAM,KAAK,SAAS,EAAE;IACxB,IAAID,IAAI,KAAK,eAAe,EAAE;AAC5B,MAAA,OAAOC,MAAM,KAAK,kBAAkB,GAAG,uBAAuB,GAAG,qBAAqB;AACxF,IAAA;IACA,IAAID,IAAI,KAAK,eAAe,EAAE;AAC5B,MAAA,OAAOC,MAAM,KAAK,kBAAkB,GAAG,uBAAuB,GAAG,qBAAqB;AACxF,IAAA;AACF,EAAA;AACA,EAAA,OAAO,UAAU;AACnB;;;;"}
@@ -69,16 +69,18 @@ function Logo({
69
69
  type = 'WISE',
70
70
  format = 'default',
71
71
  display = 'responsive',
72
+ size = 24,
72
73
  'aria-label': ariaLabel
73
74
  }) {
74
75
  const isScreenSm = !useScreenSize(Breakpoint.SMALL);
75
76
  const compact = display === 'compact' || display === 'responsive' && isScreenSm;
76
77
  const assetName = compact ? 'FastFlag' : getAssetName(type, format);
77
78
  const Asset = logoAssets[assetName];
79
+ const sizes = logoAssetsDimensions[assetName];
78
80
  const {
79
81
  width,
80
82
  height
81
- } = logoAssetsDimensions[assetName];
83
+ } = logoAssetsDimensions[assetName][Number(size)] ?? sizes[24];
82
84
  return /*#__PURE__*/jsx("span", {
83
85
  className: clsx('np-logo', className),
84
86
  role: "img",
@@ -1 +1 @@
1
- {"version":3,"file":"Logo.mjs","sources":["../../src/logo/Logo.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nimport {\n WiseLogo,\n WiseBusinessPrimary,\n WiseBusinessSecondary,\n WisePlatformPrimary,\n WisePlatformSecondary,\n FastFlag,\n logoAssetsDimensions,\n} from './logo-assets';\nimport type { LogoAssetName } from './logo-assets';\nimport { Breakpoint } from '../common';\nimport { useScreenSize } from '../common/hooks/useScreenSize';\nimport { AriaAttributes } from 'react';\n\nexport enum LogoType {\n WISE = 'WISE',\n WISE_BUSINESS = 'WISE_BUSINESS',\n WISE_PLATFORM = 'WISE_PLATFORM',\n}\n\nexport enum LogoDisplay {\n RESPONSIVE = 'responsive',\n COMPACT = 'compact',\n FULL = 'full',\n}\n\nexport enum LogoFormat {\n DEFAULT = 'default',\n PRIMARY_LOCKUP = 'primary-lockup',\n SECONDARY_LOCKUP = 'secondary-lockup',\n}\n\nexport interface LogoProps {\n /** Extra classes applied to Logo */\n className?: string;\n /**\n * Renders a light-coloured version suited for dark backgrounds.\n * @default false\n * @deprecated dark mode comes out of the box, this property has no effect\n */\n inverse?: boolean;\n /**\n * What type of logo to display\n * @default 'WISE'\n */\n type?: `${LogoType}`;\n /**\n * Controls which logo variant is shown.\n * - `\"responsive\"` (default): full wordmark on large screens, fast-flag mark on small screens (<600 px).\n * - `\"compact\"`: always renders the fast-flag mark regardless of screen size.\n * - `\"full\"`: always renders the full wordmark/lockup regardless of screen size.\n * @default 'responsive'\n */\n display?: `${LogoDisplay}`;\n /**\n * Controls the format of the logo.\n * - `\"default\"`: plain Wise wordmark, no product name.\n * - `\"primary-lockup\"`: product name shown inline alongside the wordmark.\n * - `\"secondary-lockup\"`: stacked (two-line) variant with the product name.\n * @default 'default'\n */\n format?: `${LogoFormat}`;\n /**\n * Override default ({@link labelByType}) screen reader messages\n */\n 'aria-label'?: AriaAttributes['aria-label'];\n}\n\nconst labelByType = {\n WISE: 'Wise',\n WISE_BUSINESS: 'Wise Business',\n WISE_PLATFORM: 'Wise Platform',\n} satisfies Record<`${LogoType}`, string>;\n\nconst logoAssets: Record<LogoAssetName, () => JSX.Element> = {\n FastFlag,\n WiseLogo,\n WiseBusinessPrimary,\n WiseBusinessSecondary,\n WisePlatformPrimary,\n WisePlatformSecondary,\n};\n\n/**\n * Renders the Wise wordmark logo. Responsive — shows the flag-only mark on small viewports\n * and the full wordmark on ≥576px (small breakpoint and above).\n *\n * @see {@link https://wise.design/foundations/logo Design Spec}\n */\nexport default function Logo({\n className,\n type = 'WISE',\n format = 'default',\n display = 'responsive',\n 'aria-label': ariaLabel,\n}: LogoProps) {\n const isScreenSm = !useScreenSize(Breakpoint.SMALL);\n const compact = display === 'compact' || (display === 'responsive' && isScreenSm);\n\n const assetName = compact ? 'FastFlag' : getAssetName(type, format);\n const Asset = logoAssets[assetName];\n const { width, height } = logoAssetsDimensions[assetName];\n\n return (\n <span\n className={clsx('np-logo', className)}\n role=\"img\"\n aria-label={ariaLabel ?? labelByType[type]}\n style={\n {\n '--wds-logo-width': `${width}px`,\n '--wds-logo-height': `${height}px`,\n } as React.CSSProperties\n }\n >\n <Asset />\n </span>\n );\n}\n\nfunction getAssetName(type: `${LogoType}`, format: `${LogoFormat}`): LogoAssetName {\n if (format !== 'default') {\n if (type === 'WISE_BUSINESS') {\n return format === 'secondary-lockup' ? 'WiseBusinessSecondary' : 'WiseBusinessPrimary';\n }\n if (type === 'WISE_PLATFORM') {\n return format === 'secondary-lockup' ? 'WisePlatformSecondary' : 'WisePlatformPrimary';\n }\n }\n return 'WiseLogo';\n}\n"],"names":["LogoType","LogoDisplay","LogoFormat","labelByType","WISE","WISE_BUSINESS","WISE_PLATFORM","logoAssets","FastFlag","WiseLogo","WiseBusinessPrimary","WiseBusinessSecondary","WisePlatformPrimary","WisePlatformSecondary","Logo","className","type","format","display","ariaLabel","isScreenSm","useScreenSize","Breakpoint","SMALL","compact","assetName","getAssetName","Asset","width","height","logoAssetsDimensions","_jsx","clsx","role","style","children"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgBYA;AAAZ,CAAA,UAAYA,QAAQ,EAAA;AAClBA,EAAAA,QAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACbA,EAAAA,QAAA,CAAA,eAAA,CAAA,GAAA,eAA+B;AAC/BA,EAAAA,QAAA,CAAA,eAAA,CAAA,GAAA,eAA+B;AACjC,CAAC,EAJWA,QAAQ,KAARA,QAAQ,GAAA,EAAA,CAAA,CAAA;IAMRC;AAAZ,CAAA,UAAYA,WAAW,EAAA;AACrBA,EAAAA,WAAA,CAAA,YAAA,CAAA,GAAA,YAAyB;AACzBA,EAAAA,WAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnBA,EAAAA,WAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACf,CAAC,EAJWA,WAAW,KAAXA,WAAW,GAAA,EAAA,CAAA,CAAA;IAMXC;AAAZ,CAAA,UAAYA,UAAU,EAAA;AACpBA,EAAAA,UAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnBA,EAAAA,UAAA,CAAA,gBAAA,CAAA,GAAA,gBAAiC;AACjCA,EAAAA,UAAA,CAAA,kBAAA,CAAA,GAAA,kBAAqC;AACvC,CAAC,EAJWA,UAAU,KAAVA,UAAU,GAAA,EAAA,CAAA,CAAA;AA0CtB,MAAMC,WAAW,GAAG;AAClBC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,aAAa,EAAE,eAAe;AAC9BC,EAAAA,aAAa,EAAE;CACwB;AAEzC,MAAMC,UAAU,GAA6C;EAC3DC,QAAQ;EACRC,QAAQ;EACRC,mBAAmB;EACnBC,qBAAqB;EACrBC,mBAAmB;AACnBC,EAAAA;CACD;AAED;;;;;AAKG;AACW,SAAUC,IAAIA,CAAC;EAC3BC,SAAS;AACTC,EAAAA,IAAI,GAAG,MAAM;AACbC,EAA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;AACF,EAAA;AACA,EAAA,OAAO,UAAU;AACnB;;;;"}
1
+ {"version":3,"file":"Logo.mjs","sources":["../../src/logo/Logo.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nimport {\n WiseLogo,\n WiseBusinessPrimary,\n WiseBusinessSecondary,\n WisePlatformPrimary,\n WisePlatformSecondary,\n FastFlag,\n logoAssetsDimensions,\n} from './logo-assets';\nimport type { LogoAssetName } from './logo-assets';\nimport { Breakpoint } from '../common';\nimport { useScreenSize } from '../common/hooks/useScreenSize';\nimport { AriaAttributes } from 'react';\n\nexport enum LogoType {\n WISE = 'WISE',\n WISE_BUSINESS = 'WISE_BUSINESS',\n WISE_PLATFORM = 'WISE_PLATFORM',\n}\n\nexport enum LogoDisplay {\n RESPONSIVE = 'responsive',\n COMPACT = 'compact',\n FULL = 'full',\n}\n\nexport enum LogoFormat {\n DEFAULT = 'default',\n PRIMARY_LOCKUP = 'primary-lockup',\n SECONDARY_LOCKUP = 'secondary-lockup',\n}\n\nexport type LogoSize = 16 | 18 | 20 | 24 | 28 | 36 | '16' | '18' | '20' | '24' | '28' | '36';\n\nexport interface LogoProps {\n /** Extra classes applied to Logo */\n className?: string;\n /**\n * Renders a light-coloured version suited for dark backgrounds.\n * @default false\n * @deprecated dark mode comes out of the box, this property has no effect\n */\n inverse?: boolean;\n /**\n * What type of logo to display\n * @default 'WISE'\n */\n type?: `${LogoType}`;\n /**\n * Controls which logo variant is shown.\n * - `\"responsive\"` (default): full wordmark on large screens, fast-flag mark on small screens (<600 px).\n * - `\"compact\"`: always renders the fast-flag mark regardless of screen size.\n * - `\"full\"`: always renders the full wordmark/lockup regardless of screen size.\n * @default 'responsive'\n */\n display?: `${LogoDisplay}`;\n /**\n * Controls the format of the logo.\n * - `\"default\"`: plain Wise wordmark, no product name.\n * - `\"primary-lockup\"`: product name shown inline alongside the wordmark.\n * - `\"secondary-lockup\"`: stacked (two-line) variant with the product name.\n * @default 'default'\n */\n format?: `${LogoFormat}`;\n /**\n * Controls the height and width of the logo in pixels.\n * @default 24\n */\n size?: LogoSize;\n /**\n * Override default ({@link labelByType}) screen reader messages\n */\n 'aria-label'?: AriaAttributes['aria-label'];\n}\n\nconst labelByType = {\n WISE: 'Wise',\n WISE_BUSINESS: 'Wise Business',\n WISE_PLATFORM: 'Wise Platform',\n} satisfies Record<`${LogoType}`, string>;\n\nconst logoAssets: Record<LogoAssetName, () => JSX.Element> = {\n FastFlag,\n WiseLogo,\n WiseBusinessPrimary,\n WiseBusinessSecondary,\n WisePlatformPrimary,\n WisePlatformSecondary,\n};\n\n/**\n * Renders the Wise wordmark logo. Responsive — shows the flag-only mark on small viewports\n * and the full wordmark on ≥576px (small breakpoint and above).\n *\n * @see {@link https://wise.design/foundations/logo Design Spec}\n */\nexport default function Logo({\n className,\n type = 'WISE',\n format = 'default',\n display = 'responsive',\n size = 24,\n 'aria-label': ariaLabel,\n}: LogoProps) {\n const isScreenSm = !useScreenSize(Breakpoint.SMALL);\n const compact = display === 'compact' || (display === 'responsive' && isScreenSm);\n\n const assetName = compact ? 'FastFlag' : getAssetName(type, format);\n const Asset = logoAssets[assetName];\n const sizes = logoAssetsDimensions[assetName];\n const { width, height } =\n logoAssetsDimensions[assetName][Number(size) as keyof typeof sizes] ?? sizes[24];\n\n return (\n <span\n className={clsx('np-logo', className)}\n role=\"img\"\n aria-label={ariaLabel ?? labelByType[type]}\n style={\n {\n '--wds-logo-width': `${width}px`,\n '--wds-logo-height': `${height}px`,\n } as React.CSSProperties\n }\n >\n <Asset />\n </span>\n );\n}\n\nfunction getAssetName(type: `${LogoType}`, format: `${LogoFormat}`): LogoAssetName {\n if (format !== 'default') {\n if (type === 'WISE_BUSINESS') {\n return format === 'secondary-lockup' ? 'WiseBusinessSecondary' : 'WiseBusinessPrimary';\n }\n if (type === 'WISE_PLATFORM') {\n return format === 'secondary-lockup' ? 'WisePlatformSecondary' : 'WisePlatformPrimary';\n }\n }\n return 'WiseLogo';\n}\n"],"names":["LogoType","LogoDisplay","LogoFormat","labelByType","WISE","WISE_BUSINESS","WISE_PLATFORM","logoAssets","FastFlag","WiseLogo","WiseBusinessPrimary","WiseBusinessSecondary","WisePlatformPrimary","WisePlatformSecondary","Logo","className","type","format","display","size","ariaLabel","isScreenSm","useScreenSize","Breakpoint","SMALL","compact","assetName","getAssetName","Asset","sizes","logoAssetsDimensions","width","height","Number","_jsx","clsx","role","style","children"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgBYA;AAAZ,CAAA,UAAYA,QAAQ,EAAA;AAClBA,EAAAA,QAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACbA,EAAAA,QAAA,CAAA,eAAA,CAAA,GAAA,eAA+B;AAC/BA,EAAAA,QAAA,CAAA,eAAA,CAAA,GAAA,eAA+B;AACjC,CAAC,EAJWA,QAAQ,KAARA,QAAQ,GAAA,EAAA,CAAA,CAAA;IAMRC;AAAZ,CAAA,UAAYA,WAAW,EAAA;AACrBA,EAAAA,WAAA,CAAA,YAAA,CAAA,GAAA,YAAyB;AACzBA,EAAAA,WAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnBA,EAAAA,WAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACf,CAAC,EAJWA,WAAW,KAAXA,WAAW,GAAA,EAAA,CAAA,CAAA;IAMXC;AAAZ,CAAA,UAAYA,UAAU,EAAA;AACpBA,EAAAA,UAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnBA,EAAAA,UAAA,CAAA,gBAAA,CAAA,GAAA,gBAAiC;AACjCA,EAAAA,UAAA,CAAA,kBAAA,CAAA,GAAA,kBAAqC;AACvC,CAAC,EAJWA,UAAU,KAAVA,UAAU,GAAA,EAAA,CAAA,CAAA;AAiDtB,MAAMC,WAAW,GAAG;AAClBC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,aAAa,EAAE,eAAe;AAC9BC,EAAAA,aAAa,EAAE;CACwB;AAEzC,MAAMC,UAAU,GAA6C;EAC3DC,QAAQ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C;AAEX;AAEA,SAASD,YAAYA,CAACX,IAAmB,EAAEC,MAAuB,EAAA;EAChE,IAAIA,MAAM,KAAK,SAAS,EAAE;IACxB,IAAID,IAAI,KAAK,eAAe,EAAE;AAC5B,MAAA,OAAOC,MAAM,KAAK,kBAAkB,GAAG,uBAAuB,GAAG,qBAAqB;AACxF,IAAA;IACA,IAAID,IAAI,KAAK,eAAe,EAAE;AAC5B,MAAA,OAAOC,MAAM,KAAK,kBAAkB,GAAG,uBAAuB,GAAG,qBAAqB;AACxF,IAAA;AACF,EAAA;AACA,EAAA,OAAO,UAAU;AACnB;;;;"}
@@ -4,39 +4,171 @@ var jsxRuntime = require('react/jsx-runtime');
4
4
 
5
5
  const logoAssetsDimensions = {
6
6
  FastFlag: {
7
- width: 22,
8
- height: 24
7
+ 16: {
8
+ width: 16,
9
+ height: 16
10
+ },
11
+ 18: {
12
+ width: 18,
13
+ height: 18
14
+ },
15
+ 20: {
16
+ width: 20,
17
+ height: 20
18
+ },
19
+ 24: {
20
+ width: 24,
21
+ height: 24
22
+ },
23
+ 28: {
24
+ width: 28,
25
+ height: 28
26
+ },
27
+ 36: {
28
+ width: 36,
29
+ height: 36
30
+ }
9
31
  },
10
32
  WiseLogo: {
11
- width: 94,
12
- height: 24
33
+ 16: {
34
+ width: 64,
35
+ height: 16
36
+ },
37
+ 18: {
38
+ width: 72,
39
+ height: 18
40
+ },
41
+ 20: {
42
+ width: 80,
43
+ height: 20
44
+ },
45
+ 24: {
46
+ width: 96,
47
+ height: 24
48
+ },
49
+ 28: {
50
+ width: 112,
51
+ height: 28
52
+ },
53
+ 36: {
54
+ width: 144,
55
+ height: 36
56
+ }
13
57
  },
14
58
  WiseBusinessPrimary: {
15
- width: 210,
16
- height: 24
59
+ 16: {
60
+ width: 140,
61
+ height: 16
62
+ },
63
+ 18: {
64
+ width: 157.5,
65
+ height: 18
66
+ },
67
+ 20: {
68
+ width: 175,
69
+ height: 20
70
+ },
71
+ 24: {
72
+ width: 210,
73
+ height: 24
74
+ },
75
+ 28: {
76
+ width: 245,
77
+ height: 28
78
+ },
79
+ 36: {
80
+ width: 315,
81
+ height: 36
82
+ }
17
83
  },
18
84
  WiseBusinessSecondary: {
19
- width: 97,
20
- height: 46
85
+ 16: {
86
+ width: 68,
87
+ height: 32
88
+ },
89
+ 18: {
90
+ width: 76.5,
91
+ height: 36
92
+ },
93
+ 20: {
94
+ width: 85,
95
+ height: 40
96
+ },
97
+ 24: {
98
+ width: 102,
99
+ height: 48
100
+ },
101
+ 28: {
102
+ width: 119,
103
+ height: 56
104
+ },
105
+ 36: {
106
+ width: 153,
107
+ height: 72
108
+ }
21
109
  },
22
110
  WisePlatformPrimary: {
23
- width: 205,
24
- height: 24
111
+ 16: {
112
+ width: 136,
113
+ height: 16
114
+ },
115
+ 18: {
116
+ width: 153,
117
+ height: 18
118
+ },
119
+ 20: {
120
+ width: 170,
121
+ height: 20
122
+ },
123
+ 24: {
124
+ width: 204,
125
+ height: 24
126
+ },
127
+ 28: {
128
+ width: 238,
129
+ height: 28
130
+ },
131
+ 36: {
132
+ width: 306,
133
+ height: 36
134
+ }
25
135
  },
26
136
  WisePlatformSecondary: {
27
- width: 94,
28
- height: 46
137
+ 16: {
138
+ width: 64,
139
+ height: 32
140
+ },
141
+ 18: {
142
+ width: 72,
143
+ height: 36
144
+ },
145
+ 20: {
146
+ width: 80,
147
+ height: 40
148
+ },
149
+ 24: {
150
+ width: 96,
151
+ height: 48
152
+ },
153
+ 28: {
154
+ width: 112,
155
+ height: 56
156
+ },
157
+ 36: {
158
+ width: 144,
159
+ height: 72
160
+ }
29
161
  }
30
162
  };
31
163
  function svgProps(name) {
32
164
  const {
33
165
  width,
34
166
  height
35
- } = logoAssetsDimensions[name];
167
+ } = logoAssetsDimensions[name][24];
36
168
  return {
37
169
  xmlns: 'http://www.w3.org/2000/svg',
38
- width,
39
- height,
170
+ width: '100%',
171
+ height: '100%',
40
172
  viewBox: `0 0 ${width} ${height}`
41
173
  };
42
174
  }