@transferwise/components 46.157.1 → 46.159.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 (68) hide show
  1. package/build/FlowNavigation/FlowNavigation.js +5 -14
  2. package/build/FlowNavigation/FlowNavigation.js.map +1 -1
  3. package/build/FlowNavigation/FlowNavigation.mjs +5 -14
  4. package/build/FlowNavigation/FlowNavigation.mjs.map +1 -1
  5. package/build/Markup/Markup.js +15 -14
  6. package/build/Markup/Markup.js.map +1 -1
  7. package/build/Markup/Markup.mjs +15 -14
  8. package/build/Markup/Markup.mjs.map +1 -1
  9. package/build/Popover/Popover.js +4 -0
  10. package/build/Popover/Popover.js.map +1 -1
  11. package/build/Popover/Popover.mjs +4 -0
  12. package/build/Popover/Popover.mjs.map +1 -1
  13. package/build/_deprecated/OverlayHeader/OverlayHeader.js +6 -41
  14. package/build/_deprecated/OverlayHeader/OverlayHeader.js.map +1 -1
  15. package/build/_deprecated/OverlayHeader/OverlayHeader.mjs +6 -41
  16. package/build/_deprecated/OverlayHeader/OverlayHeader.mjs.map +1 -1
  17. package/build/common/Panel/Panel.js +13 -4
  18. package/build/common/Panel/Panel.js.map +1 -1
  19. package/build/common/Panel/Panel.mjs +14 -5
  20. package/build/common/Panel/Panel.mjs.map +1 -1
  21. package/build/common/PropsValues/position.js +29 -0
  22. package/build/common/PropsValues/position.js.map +1 -1
  23. package/build/common/PropsValues/position.mjs +28 -1
  24. package/build/common/PropsValues/position.mjs.map +1 -1
  25. package/build/main.css +8 -34
  26. package/build/styles/FlowNavigation/FlowNavigation.css +7 -13
  27. package/build/styles/main.css +8 -34
  28. package/build/types/FlowNavigation/FlowNavigation.d.ts +2 -9
  29. package/build/types/FlowNavigation/FlowNavigation.d.ts.map +1 -1
  30. package/build/types/Markup/Markup.d.ts.map +1 -1
  31. package/build/types/Markup/Markup.types.d.ts +16 -5
  32. package/build/types/Markup/Markup.types.d.ts.map +1 -1
  33. package/build/types/Markup/index.d.ts +1 -1
  34. package/build/types/Markup/index.d.ts.map +1 -1
  35. package/build/types/Popover/Popover.d.ts +1 -1
  36. package/build/types/Popover/Popover.d.ts.map +1 -1
  37. package/build/types/_deprecated/OverlayHeader/OverlayHeader.d.ts.map +1 -1
  38. package/build/types/common/Panel/Panel.d.ts +6 -6
  39. package/build/types/common/Panel/Panel.d.ts.map +1 -1
  40. package/build/types/common/PropsValues/position.d.ts +18 -1
  41. package/build/types/common/PropsValues/position.d.ts.map +1 -1
  42. package/build/types/common/ResponsivePanel/ResponsivePanel.d.ts +2 -2
  43. package/build/types/index.d.ts +1 -1
  44. package/build/types/index.d.ts.map +1 -1
  45. package/package.json +3 -3
  46. package/src/FlowNavigation/FlowNavigation.css +7 -13
  47. package/src/FlowNavigation/FlowNavigation.less +6 -15
  48. package/src/FlowNavigation/FlowNavigation.tsx +6 -27
  49. package/src/FlowNavigation/_stories/FlowNavigation.story.tsx +0 -86
  50. package/src/Markup/Markup.test.tsx +8 -7
  51. package/src/Markup/Markup.tsx +18 -15
  52. package/src/Markup/Markup.types.ts +16 -6
  53. package/src/Markup/_stories/Markup.docs.mdx +60 -0
  54. package/src/Markup/_stories/Markup.story.tsx +7 -8
  55. package/src/Markup/index.ts +6 -1
  56. package/src/Popover/Popover.tsx +9 -2
  57. package/src/_deprecated/OverlayHeader/OverlayHeader.tsx +2 -21
  58. package/src/common/Panel/Panel.test.tsx +17 -0
  59. package/src/common/Panel/Panel.tsx +17 -8
  60. package/src/common/Panel/_stories/Panel.story.tsx +182 -0
  61. package/src/common/PropsValues/position.ts +54 -0
  62. package/src/i18n/en.json +1 -0
  63. package/src/index.ts +1 -1
  64. package/src/main.css +8 -34
  65. package/src/main.less +0 -1
  66. package/build/styles/_deprecated/OverlayHeader/OverlayHeader.css +0 -15
  67. package/src/_deprecated/OverlayHeader/OverlayHeader.css +0 -15
  68. package/src/_deprecated/OverlayHeader/OverlayHeader.less +0 -24
@@ -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;;;;"}
@@ -40,7 +40,15 @@ const fallbackPlacements = {
40
40
  [position.Position.TOP]: [position.Position.BOTTOM, position.Position.RIGHT, position.Position.LEFT],
41
41
  [position.Position.BOTTOM]: [position.Position.TOP, position.Position.RIGHT, position.Position.LEFT],
42
42
  [position.Position.LEFT]: [position.Position.RIGHT, position.Position.TOP, position.Position.BOTTOM],
43
- [position.Position.RIGHT]: [position.Position.LEFT, position.Position.TOP, position.Position.BOTTOM]
43
+ [position.Position.RIGHT]: [position.Position.LEFT, position.Position.TOP, position.Position.BOTTOM],
44
+ 'top-start': ['bottom-start', 'top-end', 'bottom-end'],
45
+ 'top-end': ['bottom-end', 'top-start', 'bottom-start'],
46
+ 'bottom-start': ['top-start', 'bottom-end', 'top-end'],
47
+ 'bottom-end': ['top-end', 'bottom-start', 'top-start'],
48
+ 'left-start': ['right-start', 'left-end', 'right-end'],
49
+ 'left-end': ['right-end', 'left-start', 'right-start'],
50
+ 'right-start': ['left-start', 'right-end', 'left-end'],
51
+ 'right-end': ['left-end', 'right-start', 'left-start']
44
52
  };
45
53
  const Panel = /*#__PURE__*/React.forwardRef(function Panel({
46
54
  arrow = false,
@@ -56,13 +64,14 @@ const Panel = /*#__PURE__*/React.forwardRef(function Panel({
56
64
  ...rest
57
65
  }, reference) {
58
66
  const arrowRef = React.useRef(null);
67
+ const floatingPlacement = position.positionToPlacement(position$1);
59
68
  const middleware = [];
60
69
  if (arrow) {
61
70
  middleware.push(react.offset(POPOVER_OFFSET));
62
71
  }
63
- if (flip && fallbackPlacements[position$1]) {
72
+ if (flip && fallbackPlacements[floatingPlacement]) {
64
73
  middleware.push(react.flip({
65
- fallbackPlacements: fallbackPlacements[position$1]
74
+ fallbackPlacements: fallbackPlacements[floatingPlacement]
66
75
  }));
67
76
  }
68
77
  if (altAxis) {
@@ -91,7 +100,7 @@ const Panel = /*#__PURE__*/React.forwardRef(function Panel({
91
100
  placement,
92
101
  middlewareData
93
102
  } = react.useFloating({
94
- placement: position$1,
103
+ placement: floatingPlacement,
95
104
  middleware,
96
105
  elements: {
97
106
  reference: anchorRef.current
@@ -1 +1 @@
1
- {"version":3,"file":"Panel.js","sources":["../../../src/common/Panel/Panel.tsx"],"sourcesContent":["import {\n arrow as arrowMiddleware,\n autoUpdate,\n flip as flipMiddleware,\n offset,\n type Placement,\n shift,\n size as sizeMiddleware,\n useFloating,\n} from '@floating-ui/react';\nimport { clsx } from 'clsx';\nimport {\n CSSProperties,\n HTMLAttributes,\n MutableRefObject,\n PropsWithChildren,\n SyntheticEvent,\n forwardRef,\n useContext,\n useRef,\n} from 'react';\n\nimport { Position, PositionBottom, PositionLeft, PositionRight, PositionTop } from '..';\nimport Dimmer from '../../Dimmer';\nimport { OverlayIdContext } from '../../Provider/overlay/OverlayIdProvider';\n\nconst POPOVER_OFFSET = 16;\n\n// By default the flip positioning explores only the opposite alternative. So if left is passed and there's no enough space\n// the right one gets chosen. If there's no space on both sides popover goes back to the initially chosen one left.\n// This mapping forces popover to try the four available positions before going back to the initial chosen one.\nconst fallbackPlacements: Record<string, Placement[]> = {\n [Position.TOP]: [Position.BOTTOM, Position.RIGHT, Position.LEFT],\n [Position.BOTTOM]: [Position.TOP, Position.RIGHT, Position.LEFT],\n [Position.LEFT]: [Position.RIGHT, Position.TOP, Position.BOTTOM],\n [Position.RIGHT]: [Position.LEFT, Position.TOP, Position.BOTTOM],\n};\n\nexport type PanelProps = PropsWithChildren<{\n arrow?: boolean;\n flip?: boolean;\n altAxis?: boolean;\n open?: boolean;\n onClose?: (event: Event | SyntheticEvent) => void;\n position?: PositionBottom | PositionLeft | PositionRight | PositionTop;\n anchorRef: MutableRefObject<Element | null>;\n anchorWidth?: boolean;\n considerHeight?: boolean;\n}> &\n HTMLAttributes<HTMLDivElement>;\n\nconst Panel = forwardRef<HTMLDivElement, PanelProps>(function Panel(\n {\n arrow = false,\n flip = true,\n altAxis = false,\n children,\n open = false,\n onClose,\n position = Position.BOTTOM,\n anchorRef,\n anchorWidth = false,\n considerHeight = false,\n ...rest\n }: PanelProps,\n reference,\n) {\n const arrowRef = useRef<HTMLDivElement | null>(null);\n\n const middleware = [];\n\n if (arrow) {\n middleware.push(offset(POPOVER_OFFSET));\n }\n\n if (flip && fallbackPlacements[position]) {\n middleware.push(\n flipMiddleware({\n fallbackPlacements: fallbackPlacements[position],\n }),\n );\n }\n\n if (altAxis) {\n middleware.push(shift());\n }\n\n if (arrow) {\n middleware.push(arrowMiddleware({ element: arrowRef, padding: 8 }));\n }\n\n if (considerHeight) {\n middleware.push(\n sizeMiddleware({\n padding: POPOVER_OFFSET,\n apply: ({ elements, availableHeight }) => {\n elements.floating.style.setProperty(\n '--np-panel-available-height',\n `${availableHeight}px`,\n );\n },\n }),\n );\n }\n\n const { refs, floatingStyles, placement, middlewareData } = useFloating({\n placement: position,\n middleware,\n elements: {\n reference: anchorRef.current,\n },\n whileElementsMounted: open ? autoUpdate : undefined,\n });\n\n const arrowStyle: CSSProperties = {\n ...(middlewareData.arrow?.x != null ? { left: middlewareData.arrow.x } : {}),\n ...(middlewareData.arrow?.y != null ? { top: middlewareData.arrow.y } : {}),\n };\n\n const contentStyle: CSSProperties = {\n ...(anchorWidth ? { width: anchorRef.current?.clientWidth } : undefined),\n };\n\n const overlayId = useContext(OverlayIdContext);\n\n return (\n <Dimmer open={open} transparent fadeContentOnEnter fadeContentOnExit onClose={onClose}>\n <div\n id={overlayId}\n {...rest}\n ref={refs.setFloating}\n role=\"dialog\"\n style={floatingStyles}\n data-popper-placement={placement}\n className={clsx('np-panel', { 'np-panel--open': open }, rest.className)}\n >\n <div ref={reference} style={contentStyle} className={clsx('np-panel__content')}>\n {children}\n {/* Arrow has to stay inside content to get the same animations as the \"dialog\" and to get hidden when panel is closed. */}\n {arrow && <div ref={arrowRef} className={clsx('np-panel__arrow')} style={arrowStyle} />}\n </div>\n </div>\n </Dimmer>\n );\n});\n\nexport default Panel;\n"],"names":["POPOVER_OFFSET","fallbackPlacements","Position","TOP","BOTTOM","RIGHT","LEFT","Panel","forwardRef","arrow","flip","altAxis","children","open","onClose","position","anchorRef","anchorWidth","considerHeight","rest","reference","arrowRef","useRef","middleware","push","offset","flipMiddleware","shift","arrowMiddleware","element","padding","sizeMiddleware","apply","elements","availableHeight","floating","style","setProperty","refs","floatingStyles","placement","middlewareData","useFloating","current","whileElementsMounted","autoUpdate","undefined","arrowStyle","x","left","y","top","contentStyle","width","clientWidth","overlayId","useContext","OverlayIdContext","_jsx","Dimmer","transparent","fadeContentOnEnter","fadeContentOnExit","id","ref","setFloating","role","className","clsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAMA,cAAc,GAAG,EAAE;AAEzB;AACA;AACA;AACA,MAAMC,kBAAkB,GAAgC;AACtD,EAAA,CAACC,iBAAQ,CAACC,GAAG,GAAG,CAACD,iBAAQ,CAACE,MAAM,EAAEF,iBAAQ,CAACG,KAAK,EAAEH,iBAAQ,CAACI,IAAI,CAAC;AAChE,EAAA,CAACJ,iBAAQ,CAACE,MAAM,GAAG,CAACF,iBAAQ,CAACC,GAAG,EAAED,iBAAQ,CAACG,K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KAAE,GAAGR,SAAS;GACxE;AAED,EAAA,MAAMS,SAAS,GAAGC,gBAAU,CAACC,kCAAgB,CAAC;EAE9C,oBACEC,cAAA,CAACC,cAAM,EAAA;AAAC9C,IAAAA,IAAI,EAAEA,IAAK;IAAC+C,WAAW,EAAA,IAAA;IAACC,kBAAkB,EAAA,IAAA;IAACC,iBAAiB,EAAA,IAAA;AAAChD,IAAAA,OAAO,EAAEA,OAAQ;AAAAF,IAAAA,QAAA,eACpF8C,cAAA,CAAA,KAAA,EAAA;AACEK,MAAAA,EAAE,EAAER,SAAU;AAAA,MAAA,GACVpC,IAAI;MACR6C,GAAG,EAAE1B,IAAI,CAAC2B,WAAY;AACtBC,MAAAA,IAAI,EAAC,QAAQ;AACb9B,MAAAA,KAAK,EAAEG,cAAe;AACtB,MAAA,uBAAA,EAAuBC,SAAU;AACjC2B,MAAAA,SAAS,EAAEC,SAAI,CAAC,UAAU,EAAE;AAAE,QAAA,gBAAgB,EAAEvD;AAAI,OAAE,EAAEM,IAAI,CAACgD,SAAS,CAAE;AAAAvD,MAAAA,QAAA,eAExEyD,eAAA,CAAA,KAAA,EAAA;AAAKL,QAAAA,GAAG,EAAE5C,SAAU;AAACgB,QAAAA,KAAK,EAAEgB,YAAa;AAACe,QAAAA,SAAS,EAAEC,SAAI,CAAC,mBAAmB,CAAE;AAAAxD,QAAAA,QAAA,EAAA,CAC5EA,QAAQ,EAERH,KAAK,iBAAIiD,cAAA,CAAA,KAAA,EAAA;AAAKM,UAAAA,GAAG,EAAE3C,QAAS;AAAC8C,UAAAA,SAAS,EAAEC,SAAI,CAAC,iBAAiB,CAAE;AAAChC,UAAAA,KAAK,EAAEW;AAAW,SAAA,CAAG;OACpF;KACF;AACP,GAAQ,CAAC;AAEb,CAAC;;;;"}
1
+ {"version":3,"file":"Panel.js","sources":["../../../src/common/Panel/Panel.tsx"],"sourcesContent":["import {\n arrow as arrowMiddleware,\n autoUpdate,\n flip as flipMiddleware,\n offset,\n type Placement,\n shift,\n size as sizeMiddleware,\n useFloating,\n} from '@floating-ui/react';\nimport { clsx } from 'clsx';\nimport {\n CSSProperties,\n HTMLAttributes,\n PropsWithChildren,\n RefObject,\n SyntheticEvent,\n forwardRef,\n useContext,\n useRef,\n} from 'react';\n\nimport { Position, type FloatingPlacement, positionToPlacement } from '..';\nimport Dimmer from '../../Dimmer';\nimport { OverlayIdContext } from '../../Provider/overlay/OverlayIdProvider';\n\nconst POPOVER_OFFSET = 16;\n\n// By default the flip positioning explores only the opposite alternative. So if left is passed and there's no enough space\n// the right one gets chosen. If there's no space on both sides popover goes back to the initially chosen one left.\n// This mapping forces popover to try the four available positions before going back to the initial chosen one.\nconst fallbackPlacements: Record<Placement, Placement[]> = {\n [Position.TOP]: [Position.BOTTOM, Position.RIGHT, Position.LEFT],\n [Position.BOTTOM]: [Position.TOP, Position.RIGHT, Position.LEFT],\n [Position.LEFT]: [Position.RIGHT, Position.TOP, Position.BOTTOM],\n [Position.RIGHT]: [Position.LEFT, Position.TOP, Position.BOTTOM],\n 'top-start': ['bottom-start', 'top-end', 'bottom-end'],\n 'top-end': ['bottom-end', 'top-start', 'bottom-start'],\n 'bottom-start': ['top-start', 'bottom-end', 'top-end'],\n 'bottom-end': ['top-end', 'bottom-start', 'top-start'],\n 'left-start': ['right-start', 'left-end', 'right-end'],\n 'left-end': ['right-end', 'left-start', 'right-start'],\n 'right-start': ['left-start', 'right-end', 'left-end'],\n 'right-end': ['left-end', 'right-start', 'left-start'],\n};\n\nexport type PanelProps = PropsWithChildren<{\n arrow?: boolean;\n flip?: boolean;\n altAxis?: boolean;\n open?: boolean;\n onClose?: (event: Event | SyntheticEvent) => void;\n position?: FloatingPlacement;\n anchorRef: RefObject<Element | null>;\n anchorWidth?: boolean;\n considerHeight?: boolean;\n}> &\n HTMLAttributes<HTMLDivElement>;\n\nconst Panel = forwardRef<HTMLDivElement, PanelProps>(function Panel(\n {\n arrow = false,\n flip = true,\n altAxis = false,\n children,\n open = false,\n onClose,\n position = Position.BOTTOM,\n anchorRef,\n anchorWidth = false,\n considerHeight = false,\n ...rest\n }: PanelProps,\n reference,\n) {\n const arrowRef = useRef<HTMLDivElement | null>(null);\n const floatingPlacement = positionToPlacement(position);\n\n const middleware = [];\n\n if (arrow) {\n middleware.push(offset(POPOVER_OFFSET));\n }\n\n if (flip && fallbackPlacements[floatingPlacement]) {\n middleware.push(\n flipMiddleware({\n fallbackPlacements: fallbackPlacements[floatingPlacement],\n }),\n );\n }\n\n if (altAxis) {\n middleware.push(shift());\n }\n\n if (arrow) {\n middleware.push(arrowMiddleware({ element: arrowRef, padding: 8 }));\n }\n\n if (considerHeight) {\n middleware.push(\n sizeMiddleware({\n padding: POPOVER_OFFSET,\n apply: ({ elements, availableHeight }) => {\n elements.floating.style.setProperty(\n '--np-panel-available-height',\n `${availableHeight}px`,\n );\n },\n }),\n );\n }\n\n const { refs, floatingStyles, placement, middlewareData } = useFloating({\n placement: floatingPlacement,\n middleware,\n elements: {\n reference: anchorRef.current,\n },\n whileElementsMounted: open ? autoUpdate : undefined,\n });\n\n const arrowStyle: CSSProperties = {\n ...(middlewareData.arrow?.x != null ? { left: middlewareData.arrow.x } : {}),\n ...(middlewareData.arrow?.y != null ? { top: middlewareData.arrow.y } : {}),\n };\n\n const contentStyle: CSSProperties = {\n ...(anchorWidth ? { width: anchorRef.current?.clientWidth } : undefined),\n };\n\n const overlayId = useContext(OverlayIdContext);\n\n return (\n <Dimmer open={open} transparent fadeContentOnEnter fadeContentOnExit onClose={onClose}>\n <div\n id={overlayId}\n {...rest}\n ref={refs.setFloating}\n role=\"dialog\"\n style={floatingStyles}\n data-popper-placement={placement}\n className={clsx('np-panel', { 'np-panel--open': open }, rest.className)}\n >\n <div ref={reference} style={contentStyle} className={clsx('np-panel__content')}>\n {children}\n {/* Arrow has to stay inside content to get the same animations as the \"dialog\" and to get hidden when panel is closed. */}\n {arrow && <div ref={arrowRef} className={clsx('np-panel__arrow')} style={arrowStyle} />}\n </div>\n </div>\n </Dimmer>\n );\n});\n\nexport default Panel;\n"],"names":["POPOVER_OFFSET","fallbackPlacements","Position","TOP","BOTTOM","RIGHT","LEFT","Panel","forwardRef","arrow","flip","altAxis","children","open","onClose","position","anchorRef","anchorWidth","considerHeight","rest","reference","arrowRef","useRef","floatingPlacement","positionToPlacement","middleware","push","offset","flipMiddleware","shift","arrowMiddleware","element","padding","sizeMiddleware","apply","elements","availableHeight","floating","style","setProperty","refs","floatingStyles","placement","middlewareData","useFloating","current","whileElementsMounted","autoUpdate","undefined","arrowStyle","x","left","y","top","contentStyle","width","clientWidth","overlayId","useContext","OverlayIdContext","_jsx","Dimmer","transparent","fadeContentOnEnter","fadeContentOnExit","id","ref","setFloating","role","className","clsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAMA,cAAc,GAAG,EAAE;AAEzB;AACA;AACA;AACA,MAAMC,kBAAkB,GAAmC;AACzD,EAAA,CAACC,iBAAQ,CAACC,GAAG,GAAG,CAACD,iBAAQ,CAACE,MAAM,EAAEF,iBAAQ,CAACG,KAAK,EAAEH,iBAAQ,CAACI,IAAI,CAAC;AAChE,EAAA,CAACJ,iBAAQ,CAACE,MAAM,GAAG,CAACF,iBAAQ,CAACC,GAAG,EAAED,iBAAQ,CAACG,KAAK,EAAEH,iBAAQ,CAACI,IAAI,CAAC;AAChE,EAAA,CAACJ,iBAAQ,CAACI,IAAI,GAAG,CAACJ,iBAAQ,CAACG,KAAK,EAAEH,iBAAQ,CAACC,GAAG,EAAED,iBAAQ,CAACE,MAAM,CAAC;AAChE,EAAA,CAACF,iBAAQ,CAACG,KAAK,GAAG,CAACH,iBAAQ,CAACI,IAAI,EAAEJ,iBAAQ,CAACC,GAAG,EAAED,iBAAQ,CAACE,MAAM,CAAC;AAChE,EAAA,WAAW,EAAE,CAAC,cAAc,EAAE,SAAS,EAAE,YAAY,CAAC;AACtD,EAAA,SAAS,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,cAAc,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F;AACP,GAAQ,CAAC;AAEb,CAAC;;;;"}
@@ -11,7 +11,7 @@ import '../PropsValues/width.mjs';
11
11
  import '../PropsValues/type.mjs';
12
12
  import '../PropsValues/dateMode.mjs';
13
13
  import '../PropsValues/monthFormat.mjs';
14
- import { Position } from '../PropsValues/position.mjs';
14
+ import { Position, positionToPlacement } from '../PropsValues/position.mjs';
15
15
  import '../PropsValues/layouts.mjs';
16
16
  import '../PropsValues/status.mjs';
17
17
  import '../PropsValues/sentiment.mjs';
@@ -36,7 +36,15 @@ const fallbackPlacements = {
36
36
  [Position.TOP]: [Position.BOTTOM, Position.RIGHT, Position.LEFT],
37
37
  [Position.BOTTOM]: [Position.TOP, Position.RIGHT, Position.LEFT],
38
38
  [Position.LEFT]: [Position.RIGHT, Position.TOP, Position.BOTTOM],
39
- [Position.RIGHT]: [Position.LEFT, Position.TOP, Position.BOTTOM]
39
+ [Position.RIGHT]: [Position.LEFT, Position.TOP, Position.BOTTOM],
40
+ 'top-start': ['bottom-start', 'top-end', 'bottom-end'],
41
+ 'top-end': ['bottom-end', 'top-start', 'bottom-start'],
42
+ 'bottom-start': ['top-start', 'bottom-end', 'top-end'],
43
+ 'bottom-end': ['top-end', 'bottom-start', 'top-start'],
44
+ 'left-start': ['right-start', 'left-end', 'right-end'],
45
+ 'left-end': ['right-end', 'left-start', 'right-start'],
46
+ 'right-start': ['left-start', 'right-end', 'left-end'],
47
+ 'right-end': ['left-end', 'right-start', 'left-start']
40
48
  };
41
49
  const Panel = /*#__PURE__*/forwardRef(function Panel({
42
50
  arrow: arrow$1 = false,
@@ -52,13 +60,14 @@ const Panel = /*#__PURE__*/forwardRef(function Panel({
52
60
  ...rest
53
61
  }, reference) {
54
62
  const arrowRef = useRef(null);
63
+ const floatingPlacement = positionToPlacement(position);
55
64
  const middleware = [];
56
65
  if (arrow$1) {
57
66
  middleware.push(offset(POPOVER_OFFSET));
58
67
  }
59
- if (flip$1 && fallbackPlacements[position]) {
68
+ if (flip$1 && fallbackPlacements[floatingPlacement]) {
60
69
  middleware.push(flip({
61
- fallbackPlacements: fallbackPlacements[position]
70
+ fallbackPlacements: fallbackPlacements[floatingPlacement]
62
71
  }));
63
72
  }
64
73
  if (altAxis) {
@@ -87,7 +96,7 @@ const Panel = /*#__PURE__*/forwardRef(function Panel({
87
96
  placement,
88
97
  middlewareData
89
98
  } = useFloating({
90
- placement: position,
99
+ placement: floatingPlacement,
91
100
  middleware,
92
101
  elements: {
93
102
  reference: anchorRef.current
@@ -1 +1 @@
1
- {"version":3,"file":"Panel.mjs","sources":["../../../src/common/Panel/Panel.tsx"],"sourcesContent":["import {\n arrow as arrowMiddleware,\n autoUpdate,\n flip as flipMiddleware,\n offset,\n type Placement,\n shift,\n size as sizeMiddleware,\n useFloating,\n} from '@floating-ui/react';\nimport { clsx } from 'clsx';\nimport {\n CSSProperties,\n HTMLAttributes,\n MutableRefObject,\n PropsWithChildren,\n SyntheticEvent,\n forwardRef,\n useContext,\n useRef,\n} from 'react';\n\nimport { Position, PositionBottom, PositionLeft, PositionRight, PositionTop } from '..';\nimport Dimmer from '../../Dimmer';\nimport { OverlayIdContext } from '../../Provider/overlay/OverlayIdProvider';\n\nconst POPOVER_OFFSET = 16;\n\n// By default the flip positioning explores only the opposite alternative. So if left is passed and there's no enough space\n// the right one gets chosen. If there's no space on both sides popover goes back to the initially chosen one left.\n// This mapping forces popover to try the four available positions before going back to the initial chosen one.\nconst fallbackPlacements: Record<string, Placement[]> = {\n [Position.TOP]: [Position.BOTTOM, Position.RIGHT, Position.LEFT],\n [Position.BOTTOM]: [Position.TOP, Position.RIGHT, Position.LEFT],\n [Position.LEFT]: [Position.RIGHT, Position.TOP, Position.BOTTOM],\n [Position.RIGHT]: [Position.LEFT, Position.TOP, Position.BOTTOM],\n};\n\nexport type PanelProps = PropsWithChildren<{\n arrow?: boolean;\n flip?: boolean;\n altAxis?: boolean;\n open?: boolean;\n onClose?: (event: Event | SyntheticEvent) => void;\n position?: PositionBottom | PositionLeft | PositionRight | PositionTop;\n anchorRef: MutableRefObject<Element | null>;\n anchorWidth?: boolean;\n considerHeight?: boolean;\n}> &\n HTMLAttributes<HTMLDivElement>;\n\nconst Panel = forwardRef<HTMLDivElement, PanelProps>(function Panel(\n {\n arrow = false,\n flip = true,\n altAxis = false,\n children,\n open = false,\n onClose,\n position = Position.BOTTOM,\n anchorRef,\n anchorWidth = false,\n considerHeight = false,\n ...rest\n }: PanelProps,\n reference,\n) {\n const arrowRef = useRef<HTMLDivElement | null>(null);\n\n const middleware = [];\n\n if (arrow) {\n middleware.push(offset(POPOVER_OFFSET));\n }\n\n if (flip && fallbackPlacements[position]) {\n middleware.push(\n flipMiddleware({\n fallbackPlacements: fallbackPlacements[position],\n }),\n );\n }\n\n if (altAxis) {\n middleware.push(shift());\n }\n\n if (arrow) {\n middleware.push(arrowMiddleware({ element: arrowRef, padding: 8 }));\n }\n\n if (considerHeight) {\n middleware.push(\n sizeMiddleware({\n padding: POPOVER_OFFSET,\n apply: ({ elements, availableHeight }) => {\n elements.floating.style.setProperty(\n '--np-panel-available-height',\n `${availableHeight}px`,\n );\n },\n }),\n );\n }\n\n const { refs, floatingStyles, placement, middlewareData } = useFloating({\n placement: position,\n middleware,\n elements: {\n reference: anchorRef.current,\n },\n whileElementsMounted: open ? autoUpdate : undefined,\n });\n\n const arrowStyle: CSSProperties = {\n ...(middlewareData.arrow?.x != null ? { left: middlewareData.arrow.x } : {}),\n ...(middlewareData.arrow?.y != null ? { top: middlewareData.arrow.y } : {}),\n };\n\n const contentStyle: CSSProperties = {\n ...(anchorWidth ? { width: anchorRef.current?.clientWidth } : undefined),\n };\n\n const overlayId = useContext(OverlayIdContext);\n\n return (\n <Dimmer open={open} transparent fadeContentOnEnter fadeContentOnExit onClose={onClose}>\n <div\n id={overlayId}\n {...rest}\n ref={refs.setFloating}\n role=\"dialog\"\n style={floatingStyles}\n data-popper-placement={placement}\n className={clsx('np-panel', { 'np-panel--open': open }, rest.className)}\n >\n <div ref={reference} style={contentStyle} className={clsx('np-panel__content')}>\n {children}\n {/* Arrow has to stay inside content to get the same animations as the \"dialog\" and to get hidden when panel is closed. */}\n {arrow && <div ref={arrowRef} className={clsx('np-panel__arrow')} style={arrowStyle} />}\n </div>\n </div>\n </Dimmer>\n );\n});\n\nexport default Panel;\n"],"names":["POPOVER_OFFSET","fallbackPlacements","Position","TOP","BOTTOM","RIGHT","LEFT","Panel","forwardRef","arrow","flip","altAxis","children","open","onClose","position","anchorRef","anchorWidth","considerHeight","rest","reference","arrowRef","useRef","middleware","push","offset","flipMiddleware","shift","arrowMiddleware","element","padding","sizeMiddleware","apply","elements","availableHeight","floating","style","setProperty","refs","floatingStyles","placement","middlewareData","useFloating","current","whileElementsMounted","autoUpdate","undefined","arrowStyle","x","left","y","top","contentStyle","width","clientWidth","overlayId","useContext","OverlayIdContext","_jsx","Dimmer","transparent","fadeContentOnEnter","fadeContentOnExit","id","ref","setFloating","role","className","clsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAMA,cAAc,GAAG,EAAE;AAEzB;AACA;AACA;AACA,MAAMC,kBAAkB,GAAgC;AACtD,EAAA,CAACC,QAAQ,CAACC,GAAG,GAAG,CAACD,QAAQ,CAACE,MAAM,EAAEF,QAAQ,CAACG,KAAK,EAAEH,QAAQ,CAACI,IAAI,CAAC;AAChE,EAAA,CAACJ,QAAQ,CAACE,MAAM,GAAG,CAACF,QAAQ,CAACC,GAAG,EAAED,QAAQ,CAACG,KAAK,EAAEH,QAAQ,CAACI,IAAI,CAAC;AAChE,EAAA,CAACJ,QAAQ,CAACI,IAAI,GAAG,CAACJ,QAAQ,CAACG,KAAK,EAAEH,QAAQ,CAACC,GAAG,EAAED,QAAQ,CAACE,MAAM,CAAC;AAChE,EAAA,CAACF,QAAQ,CAACG,KAAK,GAAG,CAACH,QAAQ,CAACI,IAAI,EAAEJ,QAAQ,CAACC,GAAG,EAAED,QAAQ,CAACE,MAAM;CAChE;AAeD,MAAM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AA;AACEK,MAAAA,EAAE,EAAER,SAAU;AAAA,MAAA,GACVpC,IAAI;MACR6C,GAAG,EAAE1B,IAAI,CAAC2B,WAAY;AACtBC,MAAAA,IAAI,EAAC,QAAQ;AACb9B,MAAAA,KAAK,EAAEG,cAAe;AACtB,MAAA,uBAAA,EAAuBC,SAAU;AACjC2B,MAAAA,SAAS,EAAEC,IAAI,CAAC,UAAU,EAAE;AAAE,QAAA,gBAAgB,EAAEvD;AAAI,OAAE,EAAEM,IAAI,CAACgD,SAAS,CAAE;AAAAvD,MAAAA,QAAA,eAExEyD,IAAA,CAAA,KAAA,EAAA;AAAKL,QAAAA,GAAG,EAAE5C,SAAU;AAACgB,QAAAA,KAAK,EAAEgB,YAAa;AAACe,QAAAA,SAAS,EAAEC,IAAI,CAAC,mBAAmB,CAAE;AAAAxD,QAAAA,QAAA,EAAA,CAC5EA,QAAQ,EAERH,OAAK,iBAAIiD,GAAA,CAAA,KAAA,EAAA;AAAKM,UAAAA,GAAG,EAAE3C,QAAS;AAAC8C,UAAAA,SAAS,EAAEC,IAAI,CAAC,iBAAiB,CAAE;AAAChC,UAAAA,KAAK,EAAEW;AAAW,SAAA,CAAG;OACpF;KACF;AACP,GAAQ,CAAC;AAEb,CAAC;;;;"}
1
+ {"version":3,"file":"Panel.mjs","sources":["../../../src/common/Panel/Panel.tsx"],"sourcesContent":["import {\n arrow as arrowMiddleware,\n autoUpdate,\n flip as flipMiddleware,\n offset,\n type Placement,\n shift,\n size as sizeMiddleware,\n useFloating,\n} from '@floating-ui/react';\nimport { clsx } from 'clsx';\nimport {\n CSSProperties,\n HTMLAttributes,\n PropsWithChildren,\n RefObject,\n SyntheticEvent,\n forwardRef,\n useContext,\n useRef,\n} from 'react';\n\nimport { Position, type FloatingPlacement, positionToPlacement } from '..';\nimport Dimmer from '../../Dimmer';\nimport { OverlayIdContext } from '../../Provider/overlay/OverlayIdProvider';\n\nconst POPOVER_OFFSET = 16;\n\n// By default the flip positioning explores only the opposite alternative. So if left is passed and there's no enough space\n// the right one gets chosen. If there's no space on both sides popover goes back to the initially chosen one left.\n// This mapping forces popover to try the four available positions before going back to the initial chosen one.\nconst fallbackPlacements: Record<Placement, Placement[]> = {\n [Position.TOP]: [Position.BOTTOM, Position.RIGHT, Position.LEFT],\n [Position.BOTTOM]: [Position.TOP, Position.RIGHT, Position.LEFT],\n [Position.LEFT]: [Position.RIGHT, Position.TOP, Position.BOTTOM],\n [Position.RIGHT]: [Position.LEFT, Position.TOP, Position.BOTTOM],\n 'top-start': ['bottom-start', 'top-end', 'bottom-end'],\n 'top-end': ['bottom-end', 'top-start', 'bottom-start'],\n 'bottom-start': ['top-start', 'bottom-end', 'top-end'],\n 'bottom-end': ['top-end', 'bottom-start', 'top-start'],\n 'left-start': ['right-start', 'left-end', 'right-end'],\n 'left-end': ['right-end', 'left-start', 'right-start'],\n 'right-start': ['left-start', 'right-end', 'left-end'],\n 'right-end': ['left-end', 'right-start', 'left-start'],\n};\n\nexport type PanelProps = PropsWithChildren<{\n arrow?: boolean;\n flip?: boolean;\n altAxis?: boolean;\n open?: boolean;\n onClose?: (event: Event | SyntheticEvent) => void;\n position?: FloatingPlacement;\n anchorRef: RefObject<Element | null>;\n anchorWidth?: boolean;\n considerHeight?: boolean;\n}> &\n HTMLAttributes<HTMLDivElement>;\n\nconst Panel = forwardRef<HTMLDivElement, PanelProps>(function Panel(\n {\n arrow = false,\n flip = true,\n altAxis = false,\n children,\n open = false,\n onClose,\n position = Position.BOTTOM,\n anchorRef,\n anchorWidth = false,\n considerHeight = false,\n ...rest\n }: PanelProps,\n reference,\n) {\n const arrowRef = useRef<HTMLDivElement | null>(null);\n const floatingPlacement = positionToPlacement(position);\n\n const middleware = [];\n\n if (arrow) {\n middleware.push(offset(POPOVER_OFFSET));\n }\n\n if (flip && fallbackPlacements[floatingPlacement]) {\n middleware.push(\n flipMiddleware({\n fallbackPlacements: fallbackPlacements[floatingPlacement],\n }),\n );\n }\n\n if (altAxis) {\n middleware.push(shift());\n }\n\n if (arrow) {\n middleware.push(arrowMiddleware({ element: arrowRef, padding: 8 }));\n }\n\n if (considerHeight) {\n middleware.push(\n sizeMiddleware({\n padding: POPOVER_OFFSET,\n apply: ({ elements, availableHeight }) => {\n elements.floating.style.setProperty(\n '--np-panel-available-height',\n `${availableHeight}px`,\n );\n },\n }),\n );\n }\n\n const { refs, floatingStyles, placement, middlewareData } = useFloating({\n placement: floatingPlacement,\n middleware,\n elements: {\n reference: anchorRef.current,\n },\n whileElementsMounted: open ? autoUpdate : undefined,\n });\n\n const arrowStyle: CSSProperties = {\n ...(middlewareData.arrow?.x != null ? { left: middlewareData.arrow.x } : {}),\n ...(middlewareData.arrow?.y != null ? { top: middlewareData.arrow.y } : {}),\n };\n\n const contentStyle: CSSProperties = {\n ...(anchorWidth ? { width: anchorRef.current?.clientWidth } : undefined),\n };\n\n const overlayId = useContext(OverlayIdContext);\n\n return (\n <Dimmer open={open} transparent fadeContentOnEnter fadeContentOnExit onClose={onClose}>\n <div\n id={overlayId}\n {...rest}\n ref={refs.setFloating}\n role=\"dialog\"\n style={floatingStyles}\n data-popper-placement={placement}\n className={clsx('np-panel', { 'np-panel--open': open }, rest.className)}\n >\n <div ref={reference} style={contentStyle} className={clsx('np-panel__content')}>\n {children}\n {/* Arrow has to stay inside content to get the same animations as the \"dialog\" and to get hidden when panel is closed. */}\n {arrow && <div ref={arrowRef} className={clsx('np-panel__arrow')} style={arrowStyle} />}\n </div>\n </div>\n </Dimmer>\n );\n});\n\nexport default Panel;\n"],"names":["POPOVER_OFFSET","fallbackPlacements","Position","TOP","BOTTOM","RIGHT","LEFT","Panel","forwardRef","arrow","flip","altAxis","children","open","onClose","position","anchorRef","anchorWidth","considerHeight","rest","reference","arrowRef","useRef","floatingPlacement","positionToPlacement","middleware","push","offset","flipMiddleware","shift","arrowMiddleware","element","padding","sizeMiddleware","apply","elements","availableHeight","floating","style","setProperty","refs","floatingStyles","placement","middlewareData","useFloating","current","whileElementsMounted","autoUpdate","undefined","arrowStyle","x","left","y","top","contentStyle","width","clientWidth","overlayId","useContext","OverlayIdContext","_jsx","Dimmer","transparent","fadeContentOnEnter","fadeContentOnExit","id","ref","setFloating","role","className","clsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAMA,cAAc,GAAG,EAAE;AAEzB;AACA;AACA;AACA,MAAMC,kBAAkB,GAAmC;AACzD,EAAA,CAACC,QAAQ,CAACC,GAAG,GAAG,CAACD,QAAQ,CAACE,MAAM,EAAEF,QAAQ,CAACG,KAAK,EAAEH,QAAQ,CAACI,IAAI,CAAC;AAChE,EAAA,CAACJ,QAAQ,CAACE,MAAM,GAAG,CAACF,QAAQ,CAACC,GAAG,EAAED,QAAQ,CAACG,KAAK,EAAEH,QAAQ,CAACI,IAAI,CAAC;AAChE,EAAA,CAACJ,QAAQ,CAACI,IAAI,GAAG,CAACJ,QAAQ,CAACG,KAAK,EAAEH,QAAQ,CAACC,GAAG,EAAED,QAAQ,CAACE,MAAM,CAAC;AAChE,EAAA,CAACF,QAAQ,CAACG,KAAK,GAAG,CAACH,QAAQ,CAACI,IAAI,EAAEJ,QAAQ,CAACC,GAAG,EAAED,QAAQ,CAACE,MAAM,CAAC;AAChE,EAAA,WAAW,EAAE,CAAC,cAAc,EAAE,SAAS,EAAE,YAAY,CAAC;AACtD,EAAA,SAAS,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,cAAc,CAAC;AACtD,EAAA,cAAc,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,SAAS,CAAC;AACtD,EAAA,YAAY,EAAE,CAAC,SAAS,EAAE,cAAc,EAAE,WAAW,CAAC;AACtD,EAAA,YAAY,EAAE,CAAC,aAAa,EAAE,UAAU,EAAE,WAAW,CAAC;AACtD,EAAA,UAAU,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,aAAa,CAAC;AACtD,EAAA,aAAa,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,UAAU,CAAC;AACtD,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A,IAAA;IAACC,kBAAkB,EAAA,IAAA;IAACC,iBAAiB,EAAA,IAAA;AAAClD,IAAAA,OAAO,EAAEA,OAAQ;AAAAF,IAAAA,QAAA,eACpFgD,GAAA,CAAA,KAAA,EAAA;AACEK,MAAAA,EAAE,EAAER,SAAU;AAAA,MAAA,GACVtC,IAAI;MACR+C,GAAG,EAAE1B,IAAI,CAAC2B,WAAY;AACtBC,MAAAA,IAAI,EAAC,QAAQ;AACb9B,MAAAA,KAAK,EAAEG,cAAe;AACtB,MAAA,uBAAA,EAAuBC,SAAU;AACjC2B,MAAAA,SAAS,EAAEC,IAAI,CAAC,UAAU,EAAE;AAAE,QAAA,gBAAgB,EAAEzD;AAAI,OAAE,EAAEM,IAAI,CAACkD,SAAS,CAAE;AAAAzD,MAAAA,QAAA,eAExE2D,IAAA,CAAA,KAAA,EAAA;AAAKL,QAAAA,GAAG,EAAE9C,SAAU;AAACkB,QAAAA,KAAK,EAAEgB,YAAa;AAACe,QAAAA,SAAS,EAAEC,IAAI,CAAC,mBAAmB,CAAE;AAAA1D,QAAAA,QAAA,EAAA,CAC5EA,QAAQ,EAERH,OAAK,iBAAImD,GAAA,CAAA,KAAA,EAAA;AAAKM,UAAAA,GAAG,EAAE7C,QAAS;AAACgD,UAAAA,SAAS,EAAEC,IAAI,CAAC,iBAAiB,CAAE;AAAChC,UAAAA,KAAK,EAAEW;AAAW,SAAA,CAAG;OACpF;KACF;AACP,GAAQ,CAAC;AAEb,CAAC;;;;"}
@@ -7,9 +7,38 @@ exports.Position = void 0;
7
7
  Position["BOTTOM_RIGHT"] = "bottom-right";
8
8
  Position["CENTER"] = "center";
9
9
  Position["LEFT"] = "left";
10
+ Position["LEFT_BOTTOM"] = "left-bottom";
10
11
  Position["LEFT_TOP"] = "left-top";
11
12
  Position["RIGHT"] = "right";
13
+ Position["RIGHT_BOTTOM"] = "right-bottom";
12
14
  Position["RIGHT_TOP"] = "right-top";
13
15
  Position["TOP"] = "top";
16
+ Position["TOP_LEFT"] = "top-left";
17
+ Position["TOP_RIGHT"] = "top-right";
14
18
  })(exports.Position || (exports.Position = {}));
19
+ /** Maps Neptune position values to floating-ui Placement */
20
+ const positionToPlacement = position => {
21
+ switch (position) {
22
+ case 'top-left':
23
+ return 'top-start';
24
+ case 'top-right':
25
+ return 'top-end';
26
+ case 'bottom-left':
27
+ return 'bottom-start';
28
+ case 'bottom-right':
29
+ return 'bottom-end';
30
+ case 'left-top':
31
+ return 'left-start';
32
+ case 'left-bottom':
33
+ return 'left-end';
34
+ case 'right-top':
35
+ return 'right-start';
36
+ case 'right-bottom':
37
+ return 'right-end';
38
+ default:
39
+ return position;
40
+ }
41
+ };
42
+
43
+ exports.positionToPlacement = positionToPlacement;
15
44
  //# sourceMappingURL=position.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"position.js","sources":["../../../src/common/PropsValues/position.ts"],"sourcesContent":["export enum Position {\n BOTTOM = 'bottom',\n BOTTOM_LEFT = 'bottom-left',\n BOTTOM_RIGHT = 'bottom-right',\n CENTER = 'center',\n LEFT = 'left',\n LEFT_TOP = 'left-top',\n RIGHT = 'right',\n RIGHT_TOP = 'right-top',\n TOP = 'top',\n}\n\nexport type PositionCenter = 'center';\nexport type PositionTop = 'top';\nexport type PositionRight = 'right';\nexport type PositionBottom = 'bottom';\nexport type PositionLeft = 'left';\n"],"names":["Position"],"mappings":";;AAAYA;AAAZ,CAAA,UAAYA,QAAQ,EAAA;AAClBA,EAAAA,QAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjBA,EAAAA,QAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC3BA,EAAAA,QAAA,CAAA,cAAA,CAAA,GAAA,cAA6B;AAC7BA,EAAAA,QAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjBA,EAAAA,QAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACbA,EAAAA,QAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrBA,EAAAA,QAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACfA,EAAAA,QAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACvBA,EAAAA,QAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACb,CAAC,EAVWA,gBAAQ,KAARA,gBAAQ,GAAA,EAAA,CAAA,CAAA;;"}
1
+ {"version":3,"file":"position.js","sources":["../../../src/common/PropsValues/position.ts"],"sourcesContent":["import type { Placement } from '@floating-ui/react';\n\nexport enum Position {\n BOTTOM = 'bottom',\n BOTTOM_LEFT = 'bottom-left',\n BOTTOM_RIGHT = 'bottom-right',\n CENTER = 'center',\n LEFT = 'left',\n LEFT_BOTTOM = 'left-bottom',\n LEFT_TOP = 'left-top',\n RIGHT = 'right',\n RIGHT_BOTTOM = 'right-bottom',\n RIGHT_TOP = 'right-top',\n TOP = 'top',\n TOP_LEFT = 'top-left',\n TOP_RIGHT = 'top-right',\n}\n\nexport type PositionCenter = 'center';\nexport type PositionTop = 'top';\nexport type PositionRight = 'right';\nexport type PositionBottom = 'bottom';\nexport type PositionLeft = 'left';\n\nexport type PositionTopLeft = 'top-left';\nexport type PositionTopRight = 'top-right';\nexport type PositionBottomLeft = 'bottom-left';\nexport type PositionBottomRight = 'bottom-right';\nexport type PositionLeftTop = 'left-top';\nexport type PositionLeftBottom = 'left-bottom';\nexport type PositionRightTop = 'right-top';\nexport type PositionRightBottom = 'right-bottom';\n\n/** Neptune position values that can be converted to floating-ui Placement */\nexport type FloatingPlacement =\n | PositionTop\n | PositionRight\n | PositionBottom\n | PositionLeft\n | PositionTopLeft\n | PositionTopRight\n | PositionRightTop\n | PositionRightBottom\n | PositionBottomLeft\n | PositionBottomRight\n | PositionLeftTop\n | PositionLeftBottom;\n\n/** Maps Neptune position values to floating-ui Placement */\nexport const positionToPlacement = (position: FloatingPlacement): Placement => {\n switch (position) {\n case 'top-left':\n return 'top-start';\n case 'top-right':\n return 'top-end';\n case 'bottom-left':\n return 'bottom-start';\n case 'bottom-right':\n return 'bottom-end';\n case 'left-top':\n return 'left-start';\n case 'left-bottom':\n return 'left-end';\n case 'right-top':\n return 'right-start';\n case 'right-bottom':\n return 'right-end';\n default:\n return position;\n }\n};\n"],"names":["Position","positionToPlacement","position"],"mappings":";;AAEYA;AAAZ,CAAA,UAAYA,QAAQ,EAAA;AAClBA,EAAAA,QAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjBA,EAAAA,QAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC3BA,EAAAA,QAAA,CAAA,cAAA,CAAA,GAAA,cAA6B;AAC7BA,EAAAA,QAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjBA,EAAAA,QAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACbA,EAAAA,QAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC3BA,EAAAA,QAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrBA,EAAAA,QAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACfA,EAAAA,QAAA,CAAA,cAAA,CAAA,GAAA,cAA6B;AAC7BA,EAAAA,QAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACvBA,EAAAA,QAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACXA,EAAAA,QAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrBA,EAAAA,QAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACzB,CAAC,EAdWA,gBAAQ,KAARA,gBAAQ,GAAA,EAAA,CAAA,CAAA;AA8CpB;AACO,MAAMC,mBAAmB,GAAIC,QAA2B,IAAe;AAC5E,EAAA,QAAQA,QAAQ;AACd,IAAA,KAAK,UAAU;AACb,MAAA,OAAO,WAAW;AACpB,IAAA,KAAK,WAAW;AACd,MAAA,OAAO,SAAS;AAClB,IAAA,KAAK,aAAa;AAChB,MAAA,OAAO,cAAc;AACvB,IAAA,KAAK,cAAc;AACjB,MAAA,OAAO,YAAY;AACrB,IAAA,KAAK,UAAU;AACb,MAAA,OAAO,YAAY;AACrB,IAAA,KAAK,aAAa;AAChB,MAAA,OAAO,UAAU;AACnB,IAAA,KAAK,WAAW;AACd,MAAA,OAAO,aAAa;AACtB,IAAA,KAAK,cAAc;AACjB,MAAA,OAAO,WAAW;AACpB,IAAA;AACE,MAAA,OAAOA,QAAQ;AACnB;AACF;;;;"}
@@ -5,11 +5,38 @@ var Position;
5
5
  Position["BOTTOM_RIGHT"] = "bottom-right";
6
6
  Position["CENTER"] = "center";
7
7
  Position["LEFT"] = "left";
8
+ Position["LEFT_BOTTOM"] = "left-bottom";
8
9
  Position["LEFT_TOP"] = "left-top";
9
10
  Position["RIGHT"] = "right";
11
+ Position["RIGHT_BOTTOM"] = "right-bottom";
10
12
  Position["RIGHT_TOP"] = "right-top";
11
13
  Position["TOP"] = "top";
14
+ Position["TOP_LEFT"] = "top-left";
15
+ Position["TOP_RIGHT"] = "top-right";
12
16
  })(Position || (Position = {}));
17
+ /** Maps Neptune position values to floating-ui Placement */
18
+ const positionToPlacement = position => {
19
+ switch (position) {
20
+ case 'top-left':
21
+ return 'top-start';
22
+ case 'top-right':
23
+ return 'top-end';
24
+ case 'bottom-left':
25
+ return 'bottom-start';
26
+ case 'bottom-right':
27
+ return 'bottom-end';
28
+ case 'left-top':
29
+ return 'left-start';
30
+ case 'left-bottom':
31
+ return 'left-end';
32
+ case 'right-top':
33
+ return 'right-start';
34
+ case 'right-bottom':
35
+ return 'right-end';
36
+ default:
37
+ return position;
38
+ }
39
+ };
13
40
 
14
- export { Position };
41
+ export { Position, positionToPlacement };
15
42
  //# sourceMappingURL=position.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"position.mjs","sources":["../../../src/common/PropsValues/position.ts"],"sourcesContent":["export enum Position {\n BOTTOM = 'bottom',\n BOTTOM_LEFT = 'bottom-left',\n BOTTOM_RIGHT = 'bottom-right',\n CENTER = 'center',\n LEFT = 'left',\n LEFT_TOP = 'left-top',\n RIGHT = 'right',\n RIGHT_TOP = 'right-top',\n TOP = 'top',\n}\n\nexport type PositionCenter = 'center';\nexport type PositionTop = 'top';\nexport type PositionRight = 'right';\nexport type PositionBottom = 'bottom';\nexport type PositionLeft = 'left';\n"],"names":["Position"],"mappings":"IAAYA;AAAZ,CAAA,UAAYA,QAAQ,EAAA;AAClBA,EAAAA,QAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjBA,EAAAA,QAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC3BA,EAAAA,QAAA,CAAA,cAAA,CAAA,GAAA,cAA6B;AAC7BA,EAAAA,QAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjBA,EAAAA,QAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACbA,EAAAA,QAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrBA,EAAAA,QAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACfA,EAAAA,QAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACvBA,EAAAA,QAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACb,CAAC,EAVWA,QAAQ,KAARA,QAAQ,GAAA,EAAA,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"position.mjs","sources":["../../../src/common/PropsValues/position.ts"],"sourcesContent":["import type { Placement } from '@floating-ui/react';\n\nexport enum Position {\n BOTTOM = 'bottom',\n BOTTOM_LEFT = 'bottom-left',\n BOTTOM_RIGHT = 'bottom-right',\n CENTER = 'center',\n LEFT = 'left',\n LEFT_BOTTOM = 'left-bottom',\n LEFT_TOP = 'left-top',\n RIGHT = 'right',\n RIGHT_BOTTOM = 'right-bottom',\n RIGHT_TOP = 'right-top',\n TOP = 'top',\n TOP_LEFT = 'top-left',\n TOP_RIGHT = 'top-right',\n}\n\nexport type PositionCenter = 'center';\nexport type PositionTop = 'top';\nexport type PositionRight = 'right';\nexport type PositionBottom = 'bottom';\nexport type PositionLeft = 'left';\n\nexport type PositionTopLeft = 'top-left';\nexport type PositionTopRight = 'top-right';\nexport type PositionBottomLeft = 'bottom-left';\nexport type PositionBottomRight = 'bottom-right';\nexport type PositionLeftTop = 'left-top';\nexport type PositionLeftBottom = 'left-bottom';\nexport type PositionRightTop = 'right-top';\nexport type PositionRightBottom = 'right-bottom';\n\n/** Neptune position values that can be converted to floating-ui Placement */\nexport type FloatingPlacement =\n | PositionTop\n | PositionRight\n | PositionBottom\n | PositionLeft\n | PositionTopLeft\n | PositionTopRight\n | PositionRightTop\n | PositionRightBottom\n | PositionBottomLeft\n | PositionBottomRight\n | PositionLeftTop\n | PositionLeftBottom;\n\n/** Maps Neptune position values to floating-ui Placement */\nexport const positionToPlacement = (position: FloatingPlacement): Placement => {\n switch (position) {\n case 'top-left':\n return 'top-start';\n case 'top-right':\n return 'top-end';\n case 'bottom-left':\n return 'bottom-start';\n case 'bottom-right':\n return 'bottom-end';\n case 'left-top':\n return 'left-start';\n case 'left-bottom':\n return 'left-end';\n case 'right-top':\n return 'right-start';\n case 'right-bottom':\n return 'right-end';\n default:\n return position;\n }\n};\n"],"names":["Position","positionToPlacement","position"],"mappings":"IAEYA;AAAZ,CAAA,UAAYA,QAAQ,EAAA;AAClBA,EAAAA,QAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjBA,EAAAA,QAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC3BA,EAAAA,QAAA,CAAA,cAAA,CAAA,GAAA,cAA6B;AAC7BA,EAAAA,QAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjBA,EAAAA,QAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACbA,EAAAA,QAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC3BA,EAAAA,QAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrBA,EAAAA,QAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACfA,EAAAA,QAAA,CAAA,cAAA,CAAA,GAAA,cAA6B;AAC7BA,EAAAA,QAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACvBA,EAAAA,QAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACXA,EAAAA,QAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrBA,EAAAA,QAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACzB,CAAC,EAdWA,QAAQ,KAARA,QAAQ,GAAA,EAAA,CAAA,CAAA;AA8CpB;AACO,MAAMC,mBAAmB,GAAIC,QAA2B,IAAe;AAC5E,EAAA,QAAQA,QAAQ;AACd,IAAA,KAAK,UAAU;AACb,MAAA,OAAO,WAAW;AACpB,IAAA,KAAK,WAAW;AACd,MAAA,OAAO,SAAS;AAClB,IAAA,KAAK,aAAa;AAChB,MAAA,OAAO,cAAc;AACvB,IAAA,KAAK,cAAc;AACjB,MAAA,OAAO,YAAY;AACrB,IAAA,KAAK,UAAU;AACb,MAAA,OAAO,YAAY;AACrB,IAAA,KAAK,aAAa;AAChB,MAAA,OAAO,UAAU;AACnB,IAAA,KAAK,WAAW;AACd,MAAA,OAAO,aAAa;AACtB,IAAA,KAAK,cAAc;AACjB,MAAA,OAAO,WAAW;AACpB,IAAA;AACE,MAAA,OAAOA,QAAQ;AACnB;AACF;;;;"}
package/build/main.css CHANGED
@@ -29013,7 +29013,13 @@ button.np-option {
29013
29013
  justify-content: center;
29014
29014
  width: 100%;
29015
29015
  box-sizing: border-box;
29016
- min-height: 96px;
29016
+ min-height: 80px;
29017
+ }
29018
+
29019
+ @media (min-width: 320.02px) {
29020
+ .np-flow-navigation {
29021
+ min-height: 128px;
29022
+ }
29017
29023
  }
29018
29024
 
29019
29025
  .np-flow-navigation--border-bottom {
@@ -29024,7 +29030,7 @@ button.np-option {
29024
29030
  .np-flow-navigation__content {
29025
29031
  width: 100%;
29026
29032
  min-width: 320px;
29027
- max-width: calc(1160px - 36px);
29033
+ max-width: none;
29028
29034
  }
29029
29035
 
29030
29036
  .np-flow-navigation__stepper {
@@ -29101,20 +29107,6 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
29101
29107
  visibility: hidden;
29102
29108
  }
29103
29109
 
29104
- .np-flow-navigation--composable {
29105
- min-height: 80px;
29106
- }
29107
-
29108
- @media (min-width: 320.02px) {
29109
- .np-flow-navigation--composable {
29110
- min-height: 128px;
29111
- }
29112
- }
29113
-
29114
- .np-flow-navigation--composable .np-flow-navigation__content {
29115
- max-width: none;
29116
- }
29117
-
29118
29110
  .np-theme-personal--forest-green .np-flow-navigation .np-flow-header__left path,
29119
29111
  .np-theme-personal--bright-green .np-flow-navigation .np-flow-header__left path,
29120
29112
  .np-theme-personal--dark .np-flow-navigation .np-flow-header__left path {
@@ -31650,24 +31642,6 @@ html:not([dir="rtl"]) .np-navigation-option {
31650
31642
  text-decoration: var(--nudge-link-text-decoration);
31651
31643
  }
31652
31644
 
31653
- .np-overlay-header .np-overlay-header__content {
31654
- min-height: 97px;
31655
- width: 100%;
31656
- min-width: 320px;
31657
- max-width: calc(1160px - 36px);
31658
- }
31659
-
31660
- .np-theme-personal .np-overlay-header {
31661
- border-bottom: 1px solid rgba(0,0,0,0.10196);
31662
- border-bottom: 1px solid var(--color-border-neutral);
31663
- }
31664
-
31665
- .np-theme-personal--forest-green .np-overlay-header .np-flow-header__left path,
31666
- .np-theme-personal--bright-green .np-overlay-header .np-flow-header__left path,
31667
- .np-theme-personal--dark .np-overlay-header .np-flow-header__left path {
31668
- fill: var(--color-interactive-primary);
31669
- }
31670
-
31671
31645
  .tw-telephone {
31672
31646
  display: flex;
31673
31647
  }
@@ -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 {
@@ -29013,7 +29013,13 @@ button.np-option {
29013
29013
  justify-content: center;
29014
29014
  width: 100%;
29015
29015
  box-sizing: border-box;
29016
- min-height: 96px;
29016
+ min-height: 80px;
29017
+ }
29018
+
29019
+ @media (min-width: 320.02px) {
29020
+ .np-flow-navigation {
29021
+ min-height: 128px;
29022
+ }
29017
29023
  }
29018
29024
 
29019
29025
  .np-flow-navigation--border-bottom {
@@ -29024,7 +29030,7 @@ button.np-option {
29024
29030
  .np-flow-navigation__content {
29025
29031
  width: 100%;
29026
29032
  min-width: 320px;
29027
- max-width: calc(1160px - 36px);
29033
+ max-width: none;
29028
29034
  }
29029
29035
 
29030
29036
  .np-flow-navigation__stepper {
@@ -29101,20 +29107,6 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
29101
29107
  visibility: hidden;
29102
29108
  }
29103
29109
 
29104
- .np-flow-navigation--composable {
29105
- min-height: 80px;
29106
- }
29107
-
29108
- @media (min-width: 320.02px) {
29109
- .np-flow-navigation--composable {
29110
- min-height: 128px;
29111
- }
29112
- }
29113
-
29114
- .np-flow-navigation--composable .np-flow-navigation__content {
29115
- max-width: none;
29116
- }
29117
-
29118
29110
  .np-theme-personal--forest-green .np-flow-navigation .np-flow-header__left path,
29119
29111
  .np-theme-personal--bright-green .np-flow-navigation .np-flow-header__left path,
29120
29112
  .np-theme-personal--dark .np-flow-navigation .np-flow-header__left path {
@@ -31650,24 +31642,6 @@ html:not([dir="rtl"]) .np-navigation-option {
31650
31642
  text-decoration: var(--nudge-link-text-decoration);
31651
31643
  }
31652
31644
 
31653
- .np-overlay-header .np-overlay-header__content {
31654
- min-height: 97px;
31655
- width: 100%;
31656
- min-width: 320px;
31657
- max-width: calc(1160px - 36px);
31658
- }
31659
-
31660
- .np-theme-personal .np-overlay-header {
31661
- border-bottom: 1px solid rgba(0,0,0,0.10196);
31662
- border-bottom: 1px solid var(--color-border-neutral);
31663
- }
31664
-
31665
- .np-theme-personal--forest-green .np-overlay-header .np-flow-header__left path,
31666
- .np-theme-personal--bright-green .np-overlay-header .np-flow-header__left path,
31667
- .np-theme-personal--dark .np-overlay-header .np-flow-header__left path {
31668
- fill: var(--color-interactive-primary);
31669
- }
31670
-
31671
31645
  .tw-telephone {
31672
31646
  display: flex;
31673
31647
  }