@transferwise/components 0.0.0-experimental-e76a002 → 0.0.0-experimental-a39eaa6

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 (38) hide show
  1. package/build/Container/Container.js +1 -2
  2. package/build/Container/Container.js.map +1 -1
  3. package/build/Container/Container.mjs +1 -2
  4. package/build/Container/Container.mjs.map +1 -1
  5. package/build/FlowNavigation/FlowNavigation.js +5 -14
  6. package/build/FlowNavigation/FlowNavigation.js.map +1 -1
  7. package/build/FlowNavigation/FlowNavigation.mjs +5 -14
  8. package/build/FlowNavigation/FlowNavigation.mjs.map +1 -1
  9. package/build/_deprecated/OverlayHeader/OverlayHeader.js +6 -41
  10. package/build/_deprecated/OverlayHeader/OverlayHeader.js.map +1 -1
  11. package/build/_deprecated/OverlayHeader/OverlayHeader.mjs +6 -41
  12. package/build/_deprecated/OverlayHeader/OverlayHeader.mjs.map +1 -1
  13. package/build/main.css +8 -40
  14. package/build/styles/Container/Container.css +0 -5
  15. package/build/styles/FlowNavigation/FlowNavigation.css +7 -13
  16. package/build/styles/main.css +8 -40
  17. package/build/types/Container/Container.d.ts +1 -5
  18. package/build/types/Container/Container.d.ts.map +1 -1
  19. package/build/types/FlowNavigation/FlowNavigation.d.ts +2 -9
  20. package/build/types/FlowNavigation/FlowNavigation.d.ts.map +1 -1
  21. package/build/types/_deprecated/OverlayHeader/OverlayHeader.d.ts.map +1 -1
  22. package/package.json +1 -1
  23. package/src/Container/Container.css +0 -5
  24. package/src/Container/Container.less +0 -6
  25. package/src/Container/Container.test.tsx +0 -17
  26. package/src/Container/Container.tsx +1 -14
  27. package/src/Container/_stories/Container.story.tsx +0 -44
  28. package/src/FlowNavigation/FlowNavigation.css +7 -13
  29. package/src/FlowNavigation/FlowNavigation.less +6 -15
  30. package/src/FlowNavigation/FlowNavigation.tsx +6 -27
  31. package/src/FlowNavigation/_stories/FlowNavigation.story.tsx +4 -87
  32. package/src/Loader/_stories/Loader.story.tsx +0 -48
  33. package/src/_deprecated/OverlayHeader/OverlayHeader.tsx +2 -21
  34. package/src/main.css +8 -40
  35. package/src/main.less +0 -1
  36. package/build/styles/_deprecated/OverlayHeader/OverlayHeader.css +0 -15
  37. package/src/_deprecated/OverlayHeader/OverlayHeader.css +0 -15
  38. package/src/_deprecated/OverlayHeader/OverlayHeader.less +0 -24
@@ -7,7 +7,6 @@ var jsxRuntime = require('react/jsx-runtime');
7
7
 
8
8
  const Container = ({
9
9
  size = 'standard',
10
- alignContent = 'none',
11
10
  as,
12
11
  className,
13
12
  children,
@@ -16,7 +15,7 @@ const Container = ({
16
15
  const Element = as ?? 'div';
17
16
  return /*#__PURE__*/jsxRuntime.jsx(Element, {
18
17
  ...otherProps,
19
- className: clsx.clsx('wds-container', `wds-container--${size}`, alignContent !== 'none' && `wds-container--align-${alignContent}`, className),
18
+ className: clsx.clsx('wds-container', `wds-container--${size}`, className),
20
19
  children: children
21
20
  });
22
21
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Container.js","sources":["../../src/Container/Container.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { ComponentPropsWithRef, ElementType, PropsWithChildren } from 'react';\n\nimport { CommonProps } from '../common';\n\ntype ContainerOwnProps<T extends ElementType> = CommonProps & {\n /** Controls the maximum width: `fluid` (100%), `standard` (1160px), `narrow` (840px), `compact` (600px). @default 'standard' */\n size?: 'fluid' | 'standard' | 'narrow' | 'compact';\n /** Controls content alignment within the container.\n * `none` applies no positioning, `center` centers content both vertically and horizontally.\n * @default 'none' */\n alignContent?: 'none' | 'center';\n as?: T;\n};\n\nexport type ContainerProps<T extends ElementType = 'div'> = PropsWithChildren<\n ContainerOwnProps<T>\n> &\n Omit<ComponentPropsWithRef<T>, keyof ContainerOwnProps<T> | 'children'>;\n\n/**\n * Centers page content within a responsive max-width boundary, with automatic horizontal padding that adapts to the viewport size.\n *\n * **Design guidance**: <a href=\"https://docs.wise.design/foundations/grid\" target=\"_blank\">wise.design/foundations/grid</a>\n */\nconst Container = <T extends ElementType = 'div'>({\n size = 'standard',\n alignContent = 'none',\n as,\n className,\n children,\n ...otherProps\n}: ContainerProps<T>) => {\n const Element = as ?? 'div';\n return (\n <Element\n {...otherProps}\n className={clsx(\n 'wds-container',\n `wds-container--${size}`,\n alignContent !== 'none' && `wds-container--align-${alignContent}`,\n className,\n )}\n >\n {children}\n </Element>\n );\n};\n\nexport default Container;\n"],"names":["Container","size","alignContent","as","className","children","otherProps","Element","_jsx","clsx"],"mappings":";;;;;;;AAyBA,MAAMA,SAAS,GAAGA,CAAgC;AAChDC,EAAAA,IAAI,GAAG,UAAU;AACjBC,EAAAA,YAAY,GAAG,MAAM;EACrBC,EAAE;EACFC,SAAS;EACTC,QAAQ;EACR,GAAGC;AAAU,CACK,KAAI;AACtB,EAAA,MAAMC,OAAO,GAAGJ,EAAE,IAAI,KAAK;EAC3B,oBACEK,cAAA,CAACD,OAAO,EAAA;AAAA,IAAA,GACFD,UAAU;AACdF,IAAAA,SAAS,EAAEK,SAAI,CACb,eAAe,EACf,CAAA,eAAA,EAAkBR,IAAI,CAAA,CAAE,EACxBC,YAAY,KAAK,MAAM,IAAI,CAAA,qBAAA,EAAwBA,YAAY,CAAA,CAAE,EACjEE,SAAS,CACT;AAAAC,IAAAA,QAAA,EAEDA;AAAQ,GACF,CAAC;AAEd;;;;"}
1
+ {"version":3,"file":"Container.js","sources":["../../src/Container/Container.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { ComponentPropsWithRef, ElementType, PropsWithChildren } from 'react';\n\nimport { CommonProps } from '../common';\n\ntype ContainerOwnProps<T extends ElementType> = CommonProps & {\n /** Controls the maximum width: `fluid` (100%), `standard` (1160px), `narrow` (840px), `compact` (600px). @default 'standard' */\n size?: 'fluid' | 'standard' | 'narrow' | 'compact';\n as?: T;\n};\n\nexport type ContainerProps<T extends ElementType = 'div'> = PropsWithChildren<\n ContainerOwnProps<T>\n> &\n Omit<ComponentPropsWithRef<T>, keyof ContainerOwnProps<T> | 'children'>;\n\n/**\n * Centers page content within a responsive max-width boundary, with automatic horizontal padding that adapts to the viewport size.\n *\n * **Design guidance**: <a href=\"https://docs.wise.design/foundations/grid\" target=\"_blank\">wise.design/foundations/grid</a>\n */\nconst Container = <T extends ElementType = 'div'>({\n size = 'standard',\n as,\n className,\n children,\n ...otherProps\n}: ContainerProps<T>) => {\n const Element = as ?? 'div';\n return (\n <Element {...otherProps} className={clsx('wds-container', `wds-container--${size}`, className)}>\n {children}\n </Element>\n );\n};\n\nexport default Container;\n"],"names":["Container","size","as","className","children","otherProps","Element","_jsx","clsx"],"mappings":";;;;;;;AAqBA,MAAMA,SAAS,GAAGA,CAAgC;AAChDC,EAAAA,IAAI,GAAG,UAAU;EACjBC,EAAE;EACFC,SAAS;EACTC,QAAQ;EACR,GAAGC;AAAU,CACK,KAAI;AACtB,EAAA,MAAMC,OAAO,GAAGJ,EAAE,IAAI,KAAK;EAC3B,oBACEK,cAAA,CAACD,OAAO,EAAA;AAAA,IAAA,GAAKD,UAAU;IAAEF,SAAS,EAAEK,SAAI,CAAC,eAAe,EAAE,kBAAkBP,IAAI,CAAA,CAAE,EAAEE,SAAS,CAAE;AAAAC,IAAAA,QAAA,EAC5FA;AAAQ,GACF,CAAC;AAEd;;;;"}
@@ -3,7 +3,6 @@ import { jsx } from 'react/jsx-runtime';
3
3
 
4
4
  const Container = ({
5
5
  size = 'standard',
6
- alignContent = 'none',
7
6
  as,
8
7
  className,
9
8
  children,
@@ -12,7 +11,7 @@ const Container = ({
12
11
  const Element = as ?? 'div';
13
12
  return /*#__PURE__*/jsx(Element, {
14
13
  ...otherProps,
15
- className: clsx('wds-container', `wds-container--${size}`, alignContent !== 'none' && `wds-container--align-${alignContent}`, className),
14
+ className: clsx('wds-container', `wds-container--${size}`, className),
16
15
  children: children
17
16
  });
18
17
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Container.mjs","sources":["../../src/Container/Container.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { ComponentPropsWithRef, ElementType, PropsWithChildren } from 'react';\n\nimport { CommonProps } from '../common';\n\ntype ContainerOwnProps<T extends ElementType> = CommonProps & {\n /** Controls the maximum width: `fluid` (100%), `standard` (1160px), `narrow` (840px), `compact` (600px). @default 'standard' */\n size?: 'fluid' | 'standard' | 'narrow' | 'compact';\n /** Controls content alignment within the container.\n * `none` applies no positioning, `center` centers content both vertically and horizontally.\n * @default 'none' */\n alignContent?: 'none' | 'center';\n as?: T;\n};\n\nexport type ContainerProps<T extends ElementType = 'div'> = PropsWithChildren<\n ContainerOwnProps<T>\n> &\n Omit<ComponentPropsWithRef<T>, keyof ContainerOwnProps<T> | 'children'>;\n\n/**\n * Centers page content within a responsive max-width boundary, with automatic horizontal padding that adapts to the viewport size.\n *\n * **Design guidance**: <a href=\"https://docs.wise.design/foundations/grid\" target=\"_blank\">wise.design/foundations/grid</a>\n */\nconst Container = <T extends ElementType = 'div'>({\n size = 'standard',\n alignContent = 'none',\n as,\n className,\n children,\n ...otherProps\n}: ContainerProps<T>) => {\n const Element = as ?? 'div';\n return (\n <Element\n {...otherProps}\n className={clsx(\n 'wds-container',\n `wds-container--${size}`,\n alignContent !== 'none' && `wds-container--align-${alignContent}`,\n className,\n )}\n >\n {children}\n </Element>\n );\n};\n\nexport default Container;\n"],"names":["Container","size","alignContent","as","className","children","otherProps","Element","_jsx","clsx"],"mappings":";;;AAyBA,MAAMA,SAAS,GAAGA,CAAgC;AAChDC,EAAAA,IAAI,GAAG,UAAU;AACjBC,EAAAA,YAAY,GAAG,MAAM;EACrBC,EAAE;EACFC,SAAS;EACTC,QAAQ;EACR,GAAGC;AAAU,CACK,KAAI;AACtB,EAAA,MAAMC,OAAO,GAAGJ,EAAE,IAAI,KAAK;EAC3B,oBACEK,GAAA,CAACD,OAAO,EAAA;AAAA,IAAA,GACFD,UAAU;AACdF,IAAAA,SAAS,EAAEK,IAAI,CACb,eAAe,EACf,CAAA,eAAA,EAAkBR,IAAI,CAAA,CAAE,EACxBC,YAAY,KAAK,MAAM,IAAI,CAAA,qBAAA,EAAwBA,YAAY,CAAA,CAAE,EACjEE,SAAS,CACT;AAAAC,IAAAA,QAAA,EAEDA;AAAQ,GACF,CAAC;AAEd;;;;"}
1
+ {"version":3,"file":"Container.mjs","sources":["../../src/Container/Container.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { ComponentPropsWithRef, ElementType, PropsWithChildren } from 'react';\n\nimport { CommonProps } from '../common';\n\ntype ContainerOwnProps<T extends ElementType> = CommonProps & {\n /** Controls the maximum width: `fluid` (100%), `standard` (1160px), `narrow` (840px), `compact` (600px). @default 'standard' */\n size?: 'fluid' | 'standard' | 'narrow' | 'compact';\n as?: T;\n};\n\nexport type ContainerProps<T extends ElementType = 'div'> = PropsWithChildren<\n ContainerOwnProps<T>\n> &\n Omit<ComponentPropsWithRef<T>, keyof ContainerOwnProps<T> | 'children'>;\n\n/**\n * Centers page content within a responsive max-width boundary, with automatic horizontal padding that adapts to the viewport size.\n *\n * **Design guidance**: <a href=\"https://docs.wise.design/foundations/grid\" target=\"_blank\">wise.design/foundations/grid</a>\n */\nconst Container = <T extends ElementType = 'div'>({\n size = 'standard',\n as,\n className,\n children,\n ...otherProps\n}: ContainerProps<T>) => {\n const Element = as ?? 'div';\n return (\n <Element {...otherProps} className={clsx('wds-container', `wds-container--${size}`, className)}>\n {children}\n </Element>\n );\n};\n\nexport default Container;\n"],"names":["Container","size","as","className","children","otherProps","Element","_jsx","clsx"],"mappings":";;;AAqBA,MAAMA,SAAS,GAAGA,CAAgC;AAChDC,EAAAA,IAAI,GAAG,UAAU;EACjBC,EAAE;EACFC,SAAS;EACTC,QAAQ;EACR,GAAGC;AAAU,CACK,KAAI;AACtB,EAAA,MAAMC,OAAO,GAAGJ,EAAE,IAAI,KAAK;EAC3B,oBACEK,GAAA,CAACD,OAAO,EAAA;AAAA,IAAA,GAAKD,UAAU;IAAEF,SAAS,EAAEK,IAAI,CAAC,eAAe,EAAE,kBAAkBP,IAAI,CAAA,CAAE,EAAEE,SAAS,CAAE;AAAAC,IAAAA,QAAA,EAC5FA;AAAQ,GACF,CAAC;AAEd;;;;"}
@@ -46,7 +46,6 @@ const FlowNavigation = ({
46
46
  onClose,
47
47
  onGoBack,
48
48
  steps,
49
- composable = false,
50
49
  showBottomBorder = true
51
50
  }) => {
52
51
  const intl = reactIntl.useIntl();
@@ -59,7 +58,7 @@ const FlowNavigation = ({
59
58
  const newAvatar = done ? null : avatar;
60
59
  const displayGoBack = onGoBack != null && activeStep > 0;
61
60
  const flowHeaderContent = /*#__PURE__*/jsxRuntime.jsx(FlowHeader.default, {
62
- className: clsx.clsx('np-flow-navigation__content', !composable && 'p-x-3', screenSm == null ? 'np-flow-navigation--hidden' : {
61
+ className: clsx.clsx('np-flow-navigation__content', screenSm == null ? 'np-flow-navigation--hidden' : {
63
62
  'np-flow-navigation--xs-max': !screenSm,
64
63
  // Size switches on parent container which may or may not have the same size as the window.
65
64
  'np-flow-navigation--sm': screenSm,
@@ -95,18 +94,10 @@ const FlowNavigation = ({
95
94
  }) : null,
96
95
  layout: !screenLg ? layouts.Layout.VERTICAL : layouts.Layout.HORIZONTAL
97
96
  });
98
- if (composable) {
99
- return /*#__PURE__*/jsxRuntime.jsx(Container.default, {
100
- size: "fluid",
101
- className: clsx.clsx('np-flow-navigation np-flow-navigation--composable', {
102
- 'np-flow-navigation--border-bottom': showBottomBorder
103
- }),
104
- children: flowHeaderContent
105
- });
106
- }
107
- return /*#__PURE__*/jsxRuntime.jsx("div", {
108
- className: clsx.clsx('np-flow-navigation p-y-3', {
109
- 'np-flow-navigation--border-bottom': !done
97
+ return /*#__PURE__*/jsxRuntime.jsx(Container.default, {
98
+ size: "fluid",
99
+ className: clsx.clsx('np-flow-navigation', {
100
+ 'np-flow-navigation--border-bottom': showBottomBorder
110
101
  }),
111
102
  children: flowHeaderContent
112
103
  });
@@ -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';\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;\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 * When true, renders in composable mode using a fluid Container.\n * This allows the FlowNavigation to be used within custom layout containers.\n * @default false\n */\n composable?: boolean;\n /**\n * Controls whether the bottom border is displayed.\n * Only applies to the composable variant. Non-composable variant always uses the done state.\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 composable = false,\n showBottomBorder = true,\n}: FlowNavigationProps) => {\n const intl = useIntl();\n const screenSm = useScreenSize(Breakpoint.SMALL);\n const screenLg = useScreenSize(Breakpoint.LARGE);\n\n const closeButton = onClose != null && <CloseButton size=\"lg\" onClick={onClose} />;\n\n const newAvatar = done ? null : avatar;\n const displayGoBack = onGoBack != null && activeStep > 0;\n\n const flowHeaderContent = (\n <FlowHeader\n className={clsx(\n 'np-flow-navigation__content',\n !composable && '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 && steps && steps.length > 0 && (\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 && 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 );\n\n if (composable) {\n return (\n <Container\n size=\"fluid\"\n className={clsx('np-flow-navigation np-flow-navigation--composable', {\n 'np-flow-navigation--border-bottom': showBottomBorder,\n })}\n >\n {flowHeaderContent}\n </Container>\n );\n }\n\n return (\n <div\n className={clsx('np-flow-navigation p-y-3', {\n 'np-flow-navigation--border-bottom': !done,\n })}\n >\n {flowHeaderContent}\n </div>\n );\n};\n\nexport default FlowNavigation;\n"],"names":["defaultLogo","_jsx","Logo","FlowNavigation","activeStep","avatar","logo","done","onClose","onGoBack","steps","composable","showBottomBorder","intl","useIntl","screenSm","useScreenSize","Breakpoint","SMALL","screenLg","LARGE","closeButton","CloseButton","size","onClick","newAvatar","displayGoBack","flowHeaderContent","FlowHeader","className","clsx","leftContent","_jsxs","_Fragment","children","IconButton","priority","type","formatMessage","messages","back","ArrowLeft","length","AnimatedLab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C,SAAI,CAAC,6BAA6B;KAAE,CAC/C,GACA,IACL;IACDkB,MAAM,EAAE,CAAC7B,QAAQ,GAAG8B,cAAM,CAACC,QAAQ,GAAGD,cAAM,CAACE;AAAW,GAAA,CAE3D;AAED,EAAA,IAAIxC,UAAU,EAAE;IACd,oBACEV,cAAA,CAACmD,iBAAS,EAAA;AACR7B,MAAAA,IAAI,EAAC,OAAO;AACZM,MAAAA,SAAS,EAAEC,SAAI,CAAC,mDAAmD,EAAE;AACnE,QAAA,mCAAmC,EAAElB;AACtC,OAAA,CAAE;AAAAsB,MAAAA,QAAA,EAEFP;AAAiB,KACT,CAAC;AAEhB,EAAA;AAEA,EAAA,oBACE1B,cAAA,CAAA,KAAA,EAAA;AACE4B,IAAAA,SAAS,EAAEC,SAAI,CAAC,0BAA0B,EAAE;AAC1C,MAAA,mCAAmC,EAAE,CAACvB;AACvC,KAAA,CAAE;AAAA2B,IAAAA,QAAA,EAEFP;AAAiB,GACf,CAAC;AAEV;;;;"}
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';\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 * 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 showBottomBorder = true,\n}: FlowNavigationProps) => {\n const intl = useIntl();\n const screenSm = useScreenSize(Breakpoint.SMALL);\n const screenLg = useScreenSize(Breakpoint.LARGE);\n\n const closeButton = onClose != null && <CloseButton size=\"lg\" onClick={onClose} />;\n\n const newAvatar = done ? null : avatar;\n const displayGoBack = onGoBack != null && activeStep > 0;\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 && steps && steps.length > 0 && (\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 && 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 );\n\n return (\n <Container\n size=\"fluid\"\n className={clsx('np-flow-navigation', {\n 'np-flow-navigation--border-bottom': showBottomBorder,\n })}\n >\n {flowHeaderContent}\n </Container>\n );\n};\n\nexport default FlowNavigation;\n"],"names":["defaultLogo","_jsx","Logo","FlowNavigation","activeStep","avatar","logo","done","onClose","onGoBack","steps","showBottomBorder","intl","useIntl","screenSm","useScreenSize","Breakpoint","SMALL","screenLg","LARGE","closeButton","CloseButton","size","onClick","newAvatar","displayGoBack","flowHeaderContent","FlowHeader","className","clsx","leftContent","_jsxs","_Fragment","children","IconButton","priority","type","formatMessage","messages","back","ArrowLeft","length","AnimatedLabel","activeLabel","rightContent","bottomContent","Stepper","layout","Layout","VERTICAL","HORIZONTAL","Container"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,MAAMA,WAAW,gBAAGC,cAAA,CAACC,YAAI,KAAG;AAuB5B,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,gBAAgB,GAAG;AAAI,CACH,KAAI;AACxB,EAAA,MAAMC,IAAI,GAAGC,iBAAO,EAAE;AACtB,EAAA,MAAMC,QAAQ,GAAGC,2BAAa,CAACC,wBAAU,CAACC,KAAK,CAAC;AAChD,EAAA,MAAMC,QAAQ,GAAGH,2BAAa,CAACC,wBAAU,CAACG,KAAK,CAAC;EAEhD,MAAMC,WAAW,GAAGZ,OAAO,IAAI,IAAI,iBAAIP,cAAA,CAACoB,uBAAW,EAAA;AAACC,IAAAA,IAAI,EAAC,IAAI;AAACC,IAAAA,OAAO,EAAEf;AAAQ,IAAG;AAElF,EAAA,MAAMgB,SAAS,GAAGjB,IAAI,GAAG,IAAI,GAAGF,MAAM;EAC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AAA,GAC7FT,SAAS,EACTA,SAAS,IAAIJ,WAAW,iBAAInB,cAAA,CAAA,MAAA,EAAA;AAAM2B,QAAAA,SAAS,EAAC;OAAO,CAAG,EACtDR,WAAW;AAAA,KACT,CACN;AACDyB,IAAAA,aAAa,EACX,CAACtC,IAAI,IAAIG,KAAK,IAAIA,KAAK,CAAC+B,MAAM,GAAG,CAAC,gBAChCxC,cAAA,CAAC6C,eAAO,EAAA;AACN1C,MAAAA,UAAU,EAAEA,UAAW;AACvBM,MAAAA,KAAK,EAAEA,KAAM;MACbkB,SAAS,EAAEC,SAAI,CAAC,6BAA6B;KAAE,CAC/C,GACA,IACL;IACDkB,MAAM,EAAE,CAAC7B,QAAQ,GAAG8B,cAAM,CAACC,QAAQ,GAAGD,cAAM,CAACE;AAAW,GAAA,CAE3D;EAED,oBACEjD,cAAA,CAACkD,iBAAS,EAAA;AACR7B,IAAAA,IAAI,EAAC,OAAO;AACZM,IAAAA,SAAS,EAAEC,SAAI,CAAC,oBAAoB,EAAE;AACpC,MAAA,mCAAmC,EAAElB;AACtC,KAAA,CAAE;AAAAsB,IAAAA,QAAA,EAEFP;AAAiB,GACT,CAAC;AAEhB;;;;"}
@@ -42,7 +42,6 @@ const FlowNavigation = ({
42
42
  onClose,
43
43
  onGoBack,
44
44
  steps,
45
- composable = false,
46
45
  showBottomBorder = true
47
46
  }) => {
48
47
  const intl = useIntl();
@@ -55,7 +54,7 @@ const FlowNavigation = ({
55
54
  const newAvatar = done ? null : avatar;
56
55
  const displayGoBack = onGoBack != null && activeStep > 0;
57
56
  const flowHeaderContent = /*#__PURE__*/jsx(FlowHeader, {
58
- className: clsx('np-flow-navigation__content', !composable && 'p-x-3', screenSm == null ? 'np-flow-navigation--hidden' : {
57
+ className: clsx('np-flow-navigation__content', screenSm == null ? 'np-flow-navigation--hidden' : {
59
58
  'np-flow-navigation--xs-max': !screenSm,
60
59
  // Size switches on parent container which may or may not have the same size as the window.
61
60
  'np-flow-navigation--sm': screenSm,
@@ -91,18 +90,10 @@ const FlowNavigation = ({
91
90
  }) : null,
92
91
  layout: !screenLg ? Layout.VERTICAL : Layout.HORIZONTAL
93
92
  });
94
- if (composable) {
95
- return /*#__PURE__*/jsx(Container, {
96
- size: "fluid",
97
- className: clsx('np-flow-navigation np-flow-navigation--composable', {
98
- 'np-flow-navigation--border-bottom': showBottomBorder
99
- }),
100
- children: flowHeaderContent
101
- });
102
- }
103
- return /*#__PURE__*/jsx("div", {
104
- className: clsx('np-flow-navigation p-y-3', {
105
- 'np-flow-navigation--border-bottom': !done
93
+ return /*#__PURE__*/jsx(Container, {
94
+ size: "fluid",
95
+ className: clsx('np-flow-navigation', {
96
+ 'np-flow-navigation--border-bottom': showBottomBorder
106
97
  }),
107
98
  children: flowHeaderContent
108
99
  });
@@ -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';\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;\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 * When true, renders in composable mode using a fluid Container.\n * This allows the FlowNavigation to be used within custom layout containers.\n * @default false\n */\n composable?: boolean;\n /**\n * Controls whether the bottom border is displayed.\n * Only applies to the composable variant. Non-composable variant always uses the done state.\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 composable = false,\n showBottomBorder = true,\n}: FlowNavigationProps) => {\n const intl = useIntl();\n const screenSm = useScreenSize(Breakpoint.SMALL);\n const screenLg = useScreenSize(Breakpoint.LARGE);\n\n const closeButton = onClose != null && <CloseButton size=\"lg\" onClick={onClose} />;\n\n const newAvatar = done ? null : avatar;\n const displayGoBack = onGoBack != null && activeStep > 0;\n\n const flowHeaderContent = (\n <FlowHeader\n className={clsx(\n 'np-flow-navigation__content',\n !composable && '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 && steps && steps.length > 0 && (\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 && 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 );\n\n if (composable) {\n return (\n <Container\n size=\"fluid\"\n className={clsx('np-flow-navigation np-flow-navigation--composable', {\n 'np-flow-navigation--border-bottom': showBottomBorder,\n })}\n >\n {flowHeaderContent}\n </Container>\n );\n }\n\n return (\n <div\n className={clsx('np-flow-navigation p-y-3', {\n 'np-flow-navigation--border-bottom': !done,\n })}\n >\n {flowHeaderContent}\n </div>\n );\n};\n\nexport default FlowNavigation;\n"],"names":["defaultLogo","_jsx","Logo","FlowNavigation","activeStep","avatar","logo","done","onClose","onGoBack","steps","composable","showBottomBorder","intl","useIntl","screenSm","useScreenSize","Breakpoint","SMALL","screenLg","LARGE","closeButton","CloseButton","size","onClick","newAvatar","displayGoBack","flowHeaderContent","FlowHeader","className","clsx","leftContent","_jsxs","_Fragment","children","IconButton","priority","type","formatMessage","messages","back","ArrowLeft","length","AnimatedLabel","activeLabel","rightContent","bottomContent","Stepper","layout","Layout","VERTICAL","HORIZONTAL","Container"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,MAAMA,WAAW,gBAAGC,GAAA,CAACC,IAAI,KAAG;AA8B5B,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,UAAU,GAAG,KAAK;AAClBC,EAAAA,gBAAgB,GAAG;AAAI,CACH,KAAI;AACxB,EAAA,MAAMC,IAAI,GAAGC,OAAO,EAAE;AACtB,EAAA,MAAMC,QAAQ,GAAGC,aAAa,CAACC,UAAU,CAACC,KAAK,CAAC;AAChD,EAAA,MAAMC,QAAQ,GAAGH,aAAa,CAACC,UAAU,CAACG,KAAK,CAAC;EAEhD,MAAMC,WAAW,GAAGb,OAAO,IAAI,IAAI,iBAAIP,GAAA,CAACqB,WAAW,E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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';\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 * 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 showBottomBorder = true,\n}: FlowNavigationProps) => {\n const intl = useIntl();\n const screenSm = useScreenSize(Breakpoint.SMALL);\n const screenLg = useScreenSize(Breakpoint.LARGE);\n\n const closeButton = onClose != null && <CloseButton size=\"lg\" onClick={onClose} />;\n\n const newAvatar = done ? null : avatar;\n const displayGoBack = onGoBack != null && activeStep > 0;\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 && steps && steps.length > 0 && (\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 && 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 );\n\n return (\n <Container\n size=\"fluid\"\n className={clsx('np-flow-navigation', {\n 'np-flow-navigation--border-bottom': showBottomBorder,\n })}\n >\n {flowHeaderContent}\n </Container>\n );\n};\n\nexport default FlowNavigation;\n"],"names":["defaultLogo","_jsx","Logo","FlowNavigation","activeStep","avatar","logo","done","onClose","onGoBack","steps","showBottomBorder","intl","useIntl","screenSm","useScreenSize","Breakpoint","SMALL","screenLg","LARGE","closeButton","CloseButton","size","onClick","newAvatar","displayGoBack","flowHeaderContent","FlowHeader","className","clsx","leftContent","_jsxs","_Fragment","children","IconButton","priority","type","formatMessage","messages","back","ArrowLeft","length","AnimatedLabel","activeLabel","rightContent","bottomContent","Stepper","layout","Layout","VERTICAL","HORIZONTAL","Container"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,MAAMA,WAAW,gBAAGC,GAAA,CAACC,IAAI,KAAG;AAuB5B,MAAMC,cAAc,GAAGA,CAAC;AACtBC,EAAAA,UAAU,GAAG,CAAC;EACdC,MAAM;AACNC,EAAAA,IAAI,GAAGN,W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T,CAAC;AAEhB;;;;"}
@@ -2,32 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var clsx = require('clsx');
6
- require('../../common/theme.js');
7
- require('../../common/direction.js');
8
- require('@transferwise/neptune-tokens');
9
- require('../../common/PropsValues/control.js');
10
- var size = require('../../common/PropsValues/size.js');
11
- require('../../common/PropsValues/typography.js');
12
- require('../../common/PropsValues/width.js');
13
- require('../../common/PropsValues/type.js');
14
- require('../../common/PropsValues/dateMode.js');
15
- require('../../common/PropsValues/monthFormat.js');
16
- require('../../common/PropsValues/position.js');
17
- require('../../common/PropsValues/layouts.js');
18
- require('../../common/PropsValues/status.js');
19
- require('../../common/PropsValues/sentiment.js');
20
- require('../../common/PropsValues/profileType.js');
21
- require('../../common/PropsValues/variant.js');
22
- require('../../common/PropsValues/scroll.js');
23
- require('../../common/PropsValues/markdownNodeType.js');
24
- require('../../common/fileType.js');
25
- require('@transferwise/formatting');
26
- var CloseButton = require('../../common/CloseButton/CloseButton.js');
27
- require('react');
28
- var jsxRuntime = require('react/jsx-runtime');
29
- var FlowHeader = require('../../common/FlowHeader/FlowHeader.js');
30
5
  var Logo = require('../../Logo/Logo.js');
6
+ var FlowNavigation = require('../../FlowNavigation/FlowNavigation.js');
7
+ var jsxRuntime = require('react/jsx-runtime');
31
8
 
32
9
  const defaultLogo = /*#__PURE__*/jsxRuntime.jsx(Logo.default, {});
33
10
  /**
@@ -38,22 +15,10 @@ function OverlayHeader({
38
15
  onClose,
39
16
  logo = defaultLogo
40
17
  }) {
41
- const closeButton = onClose && /*#__PURE__*/jsxRuntime.jsx(CloseButton.CloseButton, {
42
- size: size.Size.LARGE,
43
- onClick: onClose
44
- });
45
- return /*#__PURE__*/jsxRuntime.jsx("div", {
46
- className: "np-overlay-header d-flex justify-content-center",
47
- children: /*#__PURE__*/jsxRuntime.jsx(FlowHeader.default, {
48
- className: "np-overlay-header__content p-a-3",
49
- leftContent: logo,
50
- rightContent: /*#__PURE__*/jsxRuntime.jsxs("div", {
51
- className: clsx.clsx('d-flex', 'align-items-center', 'order-2'),
52
- children: [avatar, avatar && closeButton && /*#__PURE__*/jsxRuntime.jsx("span", {
53
- className: clsx.clsx('m-x-1')
54
- }), closeButton]
55
- })
56
- })
18
+ return /*#__PURE__*/jsxRuntime.jsx(FlowNavigation.default, {
19
+ avatar,
20
+ onClose,
21
+ logo
57
22
  });
58
23
  }
59
24
 
@@ -1 +1 @@
1
- {"version":3,"file":"OverlayHeader.js","sources":["../../../src/_deprecated/OverlayHeader/OverlayHeader.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nimport { Size } from '../../common';\nimport { CloseButton } from '../../common/CloseButton';\nimport FlowHeader from '../../common/FlowHeader';\nimport Logo from '../../Logo';\n\n/**\n * @deprecated Use `FlowNavigation` component instead, with `steps={[]}`\n */\nexport interface OverlayHeaderProps {\n /** An Avatar */\n avatar?: React.ReactNode;\n logo?: React.ReactNode;\n /** Function called when the close is clicked */\n onClose?: React.MouseEventHandler<HTMLButtonElement>;\n}\n\nconst defaultLogo = <Logo />;\n\n/**\n * @deprecated Use `FlowNavigation` component instead\n */\nexport default function OverlayHeader({ avatar, onClose, logo = defaultLogo }: OverlayHeaderProps) {\n const closeButton = onClose && <CloseButton size={Size.LARGE} onClick={onClose} />;\n return (\n <div className=\"np-overlay-header d-flex justify-content-center\">\n <FlowHeader\n className=\"np-overlay-header__content p-a-3\"\n leftContent={logo}\n rightContent={\n <div className={clsx('d-flex', 'align-items-center', 'order-2')}>\n {avatar}\n {avatar && closeButton && <span className={clsx('m-x-1')} />}\n {closeButton}\n </div>\n }\n />\n </div>\n );\n}\n"],"names":["defaultLogo","_jsx","Logo","OverlayHeader","avatar","onClose","logo","closeButton","CloseButton","size","Size","LARGE","onClick","className","children","FlowHeader","leftContent","rightContent","_jsxs","clsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,MAAMA,WAAW,gBAAGC,cAAA,CAACC,YAAI,KAAG;AAE5B;;AAEG;AACW,SAAUC,aAAaA,CAAC;EAAEC,MAAM;EAAEC,OAAO;AAAEC,EAAAA,IAAI,GAAGN;AAAW,CAAsB,EAAA;AAC/F,EAAA,MAAMO,WAAW,GAAGF,OAAO,iBAAIJ,cAAA,CAACO,uBAAW,EAAA;IAACC,IAAI,EAAEC,SAAI,CAACC,KAAM;AAACC,IAAAA,OAAO,EAAEP;AAAQ,GAAA,CAAG;AAClF,EAAA,oBACEJ,cAAA,CAAA,KAAA,EAAA;AAAKY,IAAAA,SAAS,EAAC,iDAAiD;IAAAC,QAAA,eAC9Db,cAAA,CAACc,kBAAU,EAAA;AACTF,MAAAA,SAAS,EAAC,kCAAkC;AAC5CG,MAAAA,WAAW,EAAEV,IAAK;AAClBW,MAAAA,YAAY,eACVC,eAAA,CAAA,KAAA,EAAA;QAAKL,SAAS,EAAEM,SAAI,CAAC,QAAQ,EAAE,oBAAoB,EAAE,SAAS,CAAE;AAAAL,QAAAA,QAAA,GAC7DV,MAAM,EACNA,MAAM,IAAIG,WAAW,iBAAIN,cAAA,CAAA,MAAA,EAAA;UAAMY,SAAS,EAAEM,SAAI,CAAC,OAAO;UAAK,EAC3DZ,WAAW;OACT;KACN;AAEL,GAAK,CAAC;AAEV;;;;"}
1
+ {"version":3,"file":"OverlayHeader.js","sources":["../../../src/_deprecated/OverlayHeader/OverlayHeader.tsx"],"sourcesContent":["import Logo from '../../Logo';\nimport FlowNavigation from '../../FlowNavigation';\n\n/**\n * @deprecated Use `FlowNavigation` component instead, with `steps={[]}`\n */\nexport interface OverlayHeaderProps {\n /** An Avatar */\n avatar?: React.ReactNode;\n logo?: React.ReactNode;\n /** Function called when the close is clicked */\n onClose?: React.MouseEventHandler<HTMLButtonElement>;\n}\n\nconst defaultLogo = <Logo />;\n\n/**\n * @deprecated Use `FlowNavigation` component instead\n */\nexport default function OverlayHeader({ avatar, onClose, logo = defaultLogo }: OverlayHeaderProps) {\n return <FlowNavigation {...{ avatar, onClose, logo }} />;\n}\n"],"names":["defaultLogo","_jsx","Logo","OverlayHeader","avatar","onClose","logo","FlowNavigation"],"mappings":";;;;;;;;AAcA,MAAMA,WAAW,gBAAGC,cAAA,CAACC,YAAI,KAAG;AAE5B;;AAEG;AACW,SAAUC,aAAaA,CAAC;EAAEC,MAAM;EAAEC,OAAO;AAAEC,EAAAA,IAAI,GAAGN;AAAW,CAAsB,EAAA;EAC/F,oBAAOC,cAAA,CAACM,sBAAc,EAAA;IAAOH,MAAM;IAAEC,OAAO;AAAEC,IAAAA;AAAI,IAAM;AAC1D;;;;"}
@@ -1,29 +1,6 @@
1
- import { clsx } from 'clsx';
2
- import '../../common/theme.mjs';
3
- import '../../common/direction.mjs';
4
- import '@transferwise/neptune-tokens';
5
- import '../../common/PropsValues/control.mjs';
6
- import { Size } from '../../common/PropsValues/size.mjs';
7
- import '../../common/PropsValues/typography.mjs';
8
- import '../../common/PropsValues/width.mjs';
9
- import '../../common/PropsValues/type.mjs';
10
- import '../../common/PropsValues/dateMode.mjs';
11
- import '../../common/PropsValues/monthFormat.mjs';
12
- import '../../common/PropsValues/position.mjs';
13
- import '../../common/PropsValues/layouts.mjs';
14
- import '../../common/PropsValues/status.mjs';
15
- import '../../common/PropsValues/sentiment.mjs';
16
- import '../../common/PropsValues/profileType.mjs';
17
- import '../../common/PropsValues/variant.mjs';
18
- import '../../common/PropsValues/scroll.mjs';
19
- import '../../common/PropsValues/markdownNodeType.mjs';
20
- import '../../common/fileType.mjs';
21
- import '@transferwise/formatting';
22
- import { CloseButton } from '../../common/CloseButton/CloseButton.mjs';
23
- import 'react';
24
- import { jsx, jsxs } from 'react/jsx-runtime';
25
- import FlowHeader from '../../common/FlowHeader/FlowHeader.mjs';
26
1
  import Logo from '../../Logo/Logo.mjs';
2
+ import FlowNavigation from '../../FlowNavigation/FlowNavigation.mjs';
3
+ import { jsx } from 'react/jsx-runtime';
27
4
 
28
5
  const defaultLogo = /*#__PURE__*/jsx(Logo, {});
29
6
  /**
@@ -34,22 +11,10 @@ function OverlayHeader({
34
11
  onClose,
35
12
  logo = defaultLogo
36
13
  }) {
37
- const closeButton = onClose && /*#__PURE__*/jsx(CloseButton, {
38
- size: Size.LARGE,
39
- onClick: onClose
40
- });
41
- return /*#__PURE__*/jsx("div", {
42
- className: "np-overlay-header d-flex justify-content-center",
43
- children: /*#__PURE__*/jsx(FlowHeader, {
44
- className: "np-overlay-header__content p-a-3",
45
- leftContent: logo,
46
- rightContent: /*#__PURE__*/jsxs("div", {
47
- className: clsx('d-flex', 'align-items-center', 'order-2'),
48
- children: [avatar, avatar && closeButton && /*#__PURE__*/jsx("span", {
49
- className: clsx('m-x-1')
50
- }), closeButton]
51
- })
52
- })
14
+ return /*#__PURE__*/jsx(FlowNavigation, {
15
+ avatar,
16
+ onClose,
17
+ logo
53
18
  });
54
19
  }
55
20
 
@@ -1 +1 @@
1
- {"version":3,"file":"OverlayHeader.mjs","sources":["../../../src/_deprecated/OverlayHeader/OverlayHeader.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nimport { Size } from '../../common';\nimport { CloseButton } from '../../common/CloseButton';\nimport FlowHeader from '../../common/FlowHeader';\nimport Logo from '../../Logo';\n\n/**\n * @deprecated Use `FlowNavigation` component instead, with `steps={[]}`\n */\nexport interface OverlayHeaderProps {\n /** An Avatar */\n avatar?: React.ReactNode;\n logo?: React.ReactNode;\n /** Function called when the close is clicked */\n onClose?: React.MouseEventHandler<HTMLButtonElement>;\n}\n\nconst defaultLogo = <Logo />;\n\n/**\n * @deprecated Use `FlowNavigation` component instead\n */\nexport default function OverlayHeader({ avatar, onClose, logo = defaultLogo }: OverlayHeaderProps) {\n const closeButton = onClose && <CloseButton size={Size.LARGE} onClick={onClose} />;\n return (\n <div className=\"np-overlay-header d-flex justify-content-center\">\n <FlowHeader\n className=\"np-overlay-header__content p-a-3\"\n leftContent={logo}\n rightContent={\n <div className={clsx('d-flex', 'align-items-center', 'order-2')}>\n {avatar}\n {avatar && closeButton && <span className={clsx('m-x-1')} />}\n {closeButton}\n </div>\n }\n />\n </div>\n );\n}\n"],"names":["defaultLogo","_jsx","Logo","OverlayHeader","avatar","onClose","logo","closeButton","CloseButton","size","Size","LARGE","onClick","className","children","FlowHeader","leftContent","rightContent","_jsxs","clsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,MAAMA,WAAW,gBAAGC,GAAA,CAACC,IAAI,KAAG;AAE5B;;AAEG;AACW,SAAUC,aAAaA,CAAC;EAAEC,MAAM;EAAEC,OAAO;AAAEC,EAAAA,IAAI,GAAGN;AAAW,CAAsB,EAAA;AAC/F,EAAA,MAAMO,WAAW,GAAGF,OAAO,iBAAIJ,GAAA,CAACO,WAAW,EAAA;IAACC,IAAI,EAAEC,IAAI,CAACC,KAAM;AAACC,IAAAA,OAAO,EAAEP;AAAQ,GAAA,CAAG;AAClF,EAAA,oBACEJ,GAAA,CAAA,KAAA,EAAA;AAAKY,IAAAA,SAAS,EAAC,iDAAiD;IAAAC,QAAA,eAC9Db,GAAA,CAACc,UAAU,EAAA;AACTF,MAAAA,SAAS,EAAC,kCAAkC;AAC5CG,MAAAA,WAAW,EAAEV,IAAK;AAClBW,MAAAA,YAAY,eACVC,IAAA,CAAA,KAAA,EAAA;QAAKL,SAAS,EAAEM,IAAI,CAAC,QAAQ,EAAE,oBAAoB,EAAE,SAAS,CAAE;AAAAL,QAAAA,QAAA,GAC7DV,MAAM,EACNA,MAAM,IAAIG,WAAW,iBAAIN,GAAA,CAAA,MAAA,EAAA;UAAMY,SAAS,EAAEM,IAAI,CAAC,OAAO;UAAK,EAC3DZ,WAAW;OACT;KACN;AAEL,GAAK,CAAC;AAEV;;;;"}
1
+ {"version":3,"file":"OverlayHeader.mjs","sources":["../../../src/_deprecated/OverlayHeader/OverlayHeader.tsx"],"sourcesContent":["import Logo from '../../Logo';\nimport FlowNavigation from '../../FlowNavigation';\n\n/**\n * @deprecated Use `FlowNavigation` component instead, with `steps={[]}`\n */\nexport interface OverlayHeaderProps {\n /** An Avatar */\n avatar?: React.ReactNode;\n logo?: React.ReactNode;\n /** Function called when the close is clicked */\n onClose?: React.MouseEventHandler<HTMLButtonElement>;\n}\n\nconst defaultLogo = <Logo />;\n\n/**\n * @deprecated Use `FlowNavigation` component instead\n */\nexport default function OverlayHeader({ avatar, onClose, logo = defaultLogo }: OverlayHeaderProps) {\n return <FlowNavigation {...{ avatar, onClose, logo }} />;\n}\n"],"names":["defaultLogo","_jsx","Logo","OverlayHeader","avatar","onClose","logo","FlowNavigation"],"mappings":";;;;AAcA,MAAMA,WAAW,gBAAGC,GAAA,CAACC,IAAI,KAAG;AAE5B;;AAEG;AACW,SAAUC,aAAaA,CAAC;EAAEC,MAAM;EAAEC,OAAO;AAAEC,EAAAA,IAAI,GAAGN;AAAW,CAAsB,EAAA;EAC/F,oBAAOC,GAAA,CAACM,cAAc,EAAA;IAAOH,MAAM;IAAEC,OAAO;AAAEC,IAAAA;AAAI,IAAM;AAC1D;;;;"}
package/build/main.css CHANGED
@@ -26110,12 +26110,6 @@ a[data-toggle="tooltip"] {
26110
26110
  max-width: var(--wds-container-width-fluid);
26111
26111
  }
26112
26112
 
26113
- .wds-container--align-center {
26114
- display: flex;
26115
- flex-direction: column;
26116
- align-items: center;
26117
- }
26118
-
26119
26113
  .critical-comms {
26120
26114
  border-radius: 16px;
26121
26115
  border-radius: var(--radius-medium);
@@ -29019,7 +29013,13 @@ button.np-option {
29019
29013
  justify-content: center;
29020
29014
  width: 100%;
29021
29015
  box-sizing: border-box;
29022
- min-height: 96px;
29016
+ min-height: 80px;
29017
+ }
29018
+
29019
+ @media (min-width: 320.02px) {
29020
+ .np-flow-navigation {
29021
+ min-height: 128px;
29022
+ }
29023
29023
  }
29024
29024
 
29025
29025
  .np-flow-navigation--border-bottom {
@@ -29030,7 +29030,7 @@ button.np-option {
29030
29030
  .np-flow-navigation__content {
29031
29031
  width: 100%;
29032
29032
  min-width: 320px;
29033
- max-width: calc(1160px - 36px);
29033
+ max-width: none;
29034
29034
  }
29035
29035
 
29036
29036
  .np-flow-navigation__stepper {
@@ -29107,20 +29107,6 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
29107
29107
  visibility: hidden;
29108
29108
  }
29109
29109
 
29110
- .np-flow-navigation--composable {
29111
- min-height: 80px;
29112
- }
29113
-
29114
- @media (min-width: 320.02px) {
29115
- .np-flow-navigation--composable {
29116
- min-height: 128px;
29117
- }
29118
- }
29119
-
29120
- .np-flow-navigation--composable .np-flow-navigation__content {
29121
- max-width: none;
29122
- }
29123
-
29124
29110
  .np-theme-personal--forest-green .np-flow-navigation .np-flow-header__left path,
29125
29111
  .np-theme-personal--bright-green .np-flow-navigation .np-flow-header__left path,
29126
29112
  .np-theme-personal--dark .np-flow-navigation .np-flow-header__left path {
@@ -31656,24 +31642,6 @@ html:not([dir="rtl"]) .np-navigation-option {
31656
31642
  text-decoration: var(--nudge-link-text-decoration);
31657
31643
  }
31658
31644
 
31659
- .np-overlay-header .np-overlay-header__content {
31660
- min-height: 97px;
31661
- width: 100%;
31662
- min-width: 320px;
31663
- max-width: calc(1160px - 36px);
31664
- }
31665
-
31666
- .np-theme-personal .np-overlay-header {
31667
- border-bottom: 1px solid rgba(0,0,0,0.10196);
31668
- border-bottom: 1px solid var(--color-border-neutral);
31669
- }
31670
-
31671
- .np-theme-personal--forest-green .np-overlay-header .np-flow-header__left path,
31672
- .np-theme-personal--bright-green .np-overlay-header .np-flow-header__left path,
31673
- .np-theme-personal--dark .np-overlay-header .np-flow-header__left path {
31674
- fill: var(--color-interactive-primary);
31675
- }
31676
-
31677
31645
  .tw-telephone {
31678
31646
  display: flex;
31679
31647
  }
@@ -36,8 +36,3 @@
36
36
  .wds-container--fluid {
37
37
  max-width: var(--wds-container-width-fluid);
38
38
  }
39
- .wds-container--align-center {
40
- display: flex;
41
- flex-direction: column;
42
- align-items: center;
43
- }
@@ -4,7 +4,12 @@
4
4
  justify-content: center;
5
5
  width: 100%;
6
6
  box-sizing: border-box;
7
- min-height: 96px;
7
+ min-height: 80px;
8
+ }
9
+ @media (min-width: 320.02px) {
10
+ .np-flow-navigation {
11
+ min-height: 128px;
12
+ }
8
13
  }
9
14
  .np-flow-navigation--border-bottom {
10
15
  border-bottom: 1px solid rgba(0,0,0,0.10196);
@@ -13,7 +18,7 @@
13
18
  .np-flow-navigation__content {
14
19
  width: 100%;
15
20
  min-width: 320px;
16
- max-width: calc(1160px - 36px);
21
+ max-width: none;
17
22
  }
18
23
  .np-flow-navigation__stepper {
19
24
  padding-bottom: 0 !important;
@@ -72,17 +77,6 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
72
77
  .np-flow-navigation--hidden {
73
78
  visibility: hidden;
74
79
  }
75
- .np-flow-navigation--composable {
76
- min-height: 80px;
77
- }
78
- @media (min-width: 320.02px) {
79
- .np-flow-navigation--composable {
80
- min-height: 128px;
81
- }
82
- }
83
- .np-flow-navigation--composable .np-flow-navigation__content {
84
- max-width: none;
85
- }
86
80
  .np-theme-personal--forest-green .np-flow-navigation .np-flow-header__left path,
87
81
  .np-theme-personal--bright-green .np-flow-navigation .np-flow-header__left path,
88
82
  .np-theme-personal--dark .np-flow-navigation .np-flow-header__left path {
@@ -26110,12 +26110,6 @@ a[data-toggle="tooltip"] {
26110
26110
  max-width: var(--wds-container-width-fluid);
26111
26111
  }
26112
26112
 
26113
- .wds-container--align-center {
26114
- display: flex;
26115
- flex-direction: column;
26116
- align-items: center;
26117
- }
26118
-
26119
26113
  .critical-comms {
26120
26114
  border-radius: 16px;
26121
26115
  border-radius: var(--radius-medium);
@@ -29019,7 +29013,13 @@ button.np-option {
29019
29013
  justify-content: center;
29020
29014
  width: 100%;
29021
29015
  box-sizing: border-box;
29022
- min-height: 96px;
29016
+ min-height: 80px;
29017
+ }
29018
+
29019
+ @media (min-width: 320.02px) {
29020
+ .np-flow-navigation {
29021
+ min-height: 128px;
29022
+ }
29023
29023
  }
29024
29024
 
29025
29025
  .np-flow-navigation--border-bottom {
@@ -29030,7 +29030,7 @@ button.np-option {
29030
29030
  .np-flow-navigation__content {
29031
29031
  width: 100%;
29032
29032
  min-width: 320px;
29033
- max-width: calc(1160px - 36px);
29033
+ max-width: none;
29034
29034
  }
29035
29035
 
29036
29036
  .np-flow-navigation__stepper {
@@ -29107,20 +29107,6 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
29107
29107
  visibility: hidden;
29108
29108
  }
29109
29109
 
29110
- .np-flow-navigation--composable {
29111
- min-height: 80px;
29112
- }
29113
-
29114
- @media (min-width: 320.02px) {
29115
- .np-flow-navigation--composable {
29116
- min-height: 128px;
29117
- }
29118
- }
29119
-
29120
- .np-flow-navigation--composable .np-flow-navigation__content {
29121
- max-width: none;
29122
- }
29123
-
29124
29110
  .np-theme-personal--forest-green .np-flow-navigation .np-flow-header__left path,
29125
29111
  .np-theme-personal--bright-green .np-flow-navigation .np-flow-header__left path,
29126
29112
  .np-theme-personal--dark .np-flow-navigation .np-flow-header__left path {
@@ -31656,24 +31642,6 @@ html:not([dir="rtl"]) .np-navigation-option {
31656
31642
  text-decoration: var(--nudge-link-text-decoration);
31657
31643
  }
31658
31644
 
31659
- .np-overlay-header .np-overlay-header__content {
31660
- min-height: 97px;
31661
- width: 100%;
31662
- min-width: 320px;
31663
- max-width: calc(1160px - 36px);
31664
- }
31665
-
31666
- .np-theme-personal .np-overlay-header {
31667
- border-bottom: 1px solid rgba(0,0,0,0.10196);
31668
- border-bottom: 1px solid var(--color-border-neutral);
31669
- }
31670
-
31671
- .np-theme-personal--forest-green .np-overlay-header .np-flow-header__left path,
31672
- .np-theme-personal--bright-green .np-overlay-header .np-flow-header__left path,
31673
- .np-theme-personal--dark .np-overlay-header .np-flow-header__left path {
31674
- fill: var(--color-interactive-primary);
31675
- }
31676
-
31677
31645
  .tw-telephone {
31678
31646
  display: flex;
31679
31647
  }
@@ -3,10 +3,6 @@ import { CommonProps } from '../common';
3
3
  type ContainerOwnProps<T extends ElementType> = CommonProps & {
4
4
  /** Controls the maximum width: `fluid` (100%), `standard` (1160px), `narrow` (840px), `compact` (600px). @default 'standard' */
5
5
  size?: 'fluid' | 'standard' | 'narrow' | 'compact';
6
- /** Controls content alignment within the container.
7
- * `none` applies no positioning, `center` centers content both vertically and horizontally.
8
- * @default 'none' */
9
- alignContent?: 'none' | 'center';
10
6
  as?: T;
11
7
  };
12
8
  export type ContainerProps<T extends ElementType = 'div'> = PropsWithChildren<ContainerOwnProps<T>> & Omit<ComponentPropsWithRef<T>, keyof ContainerOwnProps<T> | 'children'>;
@@ -15,6 +11,6 @@ export type ContainerProps<T extends ElementType = 'div'> = PropsWithChildren<Co
15
11
  *
16
12
  * **Design guidance**: <a href="https://docs.wise.design/foundations/grid" target="_blank">wise.design/foundations/grid</a>
17
13
  */
18
- declare const Container: <T extends ElementType = "div">({ size, alignContent, as, className, children, ...otherProps }: ContainerProps<T>) => import("react").JSX.Element;
14
+ declare const Container: <T extends ElementType = "div">({ size, as, className, children, ...otherProps }: ContainerProps<T>) => import("react").JSX.Element;
19
15
  export default Container;
20
16
  //# sourceMappingURL=Container.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../../src/Container/Container.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEnF,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,KAAK,iBAAiB,CAAC,CAAC,SAAS,WAAW,IAAI,WAAW,GAAG;IAC5D,gIAAgI;IAChI,IAAI,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAC;IACnD;;yBAEqB;IACrB,YAAY,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IACjC,EAAE,CAAC,EAAE,CAAC,CAAC;CACR,CAAC;AAEF,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,WAAW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